.image-splitter-wrapper {
   max-width: 1200px;
   margin: 0 auto;
   padding: 20px;
}

/* アップロードセクション */
.upload-section {
   display: flex;
   align-items: center;
   gap: 10px;
   margin: 20px 0;
}

.file-input-wrapper {
   flex: 1;
   display: flex;
   align-items: center;
   padding: 8px;
   border: 1px solid #ddd;
   border-radius: 4px;
   background: #f8f9fa;
}

/* file inputを非表示にする */
.file-input-wrapper input[type="file"] {
   display: none;
}

.file-name {
   margin-left: 10px;
   color: #666;
}

.upload-button {
   padding: 8px 16px;
   background: #007bff;
   color: white;
   border: none;
   border-radius: 4px;
   cursor: pointer;
   display: flex;
   align-items: center;
   gap: 5px;
}

.upload-button:hover {
   background: #0056b3;
}

.upload-button .icon {
   font-size: 1.2em;
}

/* 設定グリッド */
.settings-grid {
   display: grid;
   grid-template-columns: 1fr 1fr 1fr;
   gap: 20px;
   margin: 20px 0;
}

.resize-options,
.split-options,
.compress-options {
   background: #f8f9fa;
   padding: 20px;
   border-radius: 8px;
   box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.resize-options h3,
.split-options h3,
.compress-options h3 {
   margin-top: 0;
   margin-bottom: 15px;
   font-size: 1.1em;
   color: #333;
}

/* 幅縮小オプション */
.resize-controls {
   display: flex;
   flex-direction: column;
   gap: 10px;
}

.resize-option {
   display: flex;
   align-items: center;
   padding: 8px;
   border: 2px solid #ddd;
   border-radius: 4px;
   cursor: pointer;
   transition: all 0.3s;
}

.resize-option:hover {
   background: #e9ecef;
   border-color: #007bff;
}

.resize-option input[type="radio"] {
   margin-right: 10px;
   cursor: pointer;
}

.resize-option input[type="radio"]:checked + span {
   font-weight: bold;
   color: #007bff;
}

.resize-note {
   margin-top: 10px;
   font-size: 0.9em;
   color: #666;
   font-style: italic;
}

.control-row {
   display: flex;
   gap: 10px;
   align-items: center;
   margin-top: 10px;
}

.split-height-select,
.compression-select {
   flex: 1;
   padding: 8px;
   border: 1px solid #ddd;
   border-radius: 4px;
}

.button {
   padding: 8px 16px;
   background: #007bff;
   color: white;
   border: none;
   border-radius: 4px;
   cursor: pointer;
   white-space: nowrap;
}

.button:hover {
   background: #0056b3;
}

/* ダウンロードボタンセクション */
.download-buttons {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 20px;
   margin: 10px 0;
}

.download-buttons .button {
   width: 100%;
   padding: 10px;
   background: #28a745;
   color: white;
   border: none;
   border-radius: 4px;
   cursor: pointer;
}

.download-buttons .button:hover {
   background: #218838;
}

.download-buttons .button:disabled {
   background: #6c757d;
   cursor: not-allowed;
}

/* プレビューグリッド */
.preview-grid {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 20px;
   margin: 20px 0;
}

.preview-section,
.result-section {
   background: #fff;
   padding: 20px;
   border-radius: 8px;
   box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 画像グリッド */
.image-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
   gap: 15px;
}

.image-item {
   background: #fff;
   border-radius: 4px;
   overflow: hidden;
   box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.image-item img {
   width: 100%;
   height: auto;
   display: block;
}

.image-item a {
   display: block;
   text-align: center;
   padding: 8px;
   background: #f8f9fa;
   color: #007bff;
   text-decoration: none;
}

.image-item a:hover {
   background: #e9ecef;
}

/* 処理中の表示 */
.processing {
   text-align: center;
   padding: 20px;
}

.spinner {
   display: inline-block;
   width: 40px;
   height: 40px;
   border: 4px solid #f3f3f3;
   border-top: 4px solid #007bff;
   border-radius: 50%;
   animation: spin 1s linear infinite;
   margin-top: 10px;
}

@keyframes spin {
   0% { transform: rotate(0deg); }
   100% { transform: rotate(360deg); }
}

/* エラーメッセージ */
.error {
   color: #dc3545;
   padding: 10px;
   background: #f8d7da;
   border-radius: 4px;
   margin: 10px 0;
   text-align: center;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
   .settings-grid {
      grid-template-columns: 1fr;
   }
   
   .preview-grid {
      grid-template-columns: 1fr;
   }
}
