/* アップロードエリアのスタイル - オフホワイトベースデザイン */
.upload-area {
    border: 3px dashed #bdc3c7;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-area:hover {
    border-color: #95a5a6;
    background: #ecf0f1;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #27ae60;
    background: #f0f8f0;
    box-shadow: 0 0 20px rgba(39, 174, 96, 0.15);
}

.upload-area.uploading {
    border-color: #e67e22;
    background: #fdf6e3;
    pointer-events: none;
}

.upload-area.error {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
    color: #7f8c8d;
}

.upload-area h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 500;
}

.upload-area p {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.file-info {
    margin-top: 20px;
}

.file-info small {
    color: #95a5a6;
    font-size: 0.85rem;
}

/* ファイル情報表示 */
.file-selected {
    margin-top: 20px;
    padding: 15px;
    background: #f0f8f0;
    border: 1px solid #27ae60;
    border-radius: 6px;
    display: none;
}

.file-selected.show {
    display: block;
}

.file-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.file-name {
    font-weight: 500;
    color: #27ae60;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-name::before {
    content: "📄";
}

.file-size {
    color: #16a085;
    font-size: 0.9rem;
}

.file-remove {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.file-remove:hover {
    background: #c0392b;
}

/* アップロード状態のアニメーション */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.upload-area.uploading .upload-icon {
    animation: pulse 2s infinite;
}

/* ドラッグオーバー時のエフェクト */
.upload-area.dragover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(39, 174, 96, 0.08);
    border-radius: 12px;
    pointer-events: none;
}

/* エラーメッセージ */
.upload-error {
    margin-top: 15px;
    padding: 10px 15px;
    background: #fdf2f2;
    border: 1px solid #e74c3c;
    border-radius: 4px;
    color: #c0392b;
    font-size: 0.9rem;
    display: none;
}

.upload-error.show {
    display: block;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .upload-area h2 {
        font-size: 1.3rem;
    }
    
    .upload-area p {
        font-size: 1rem;
    }
    
    .file-details {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 30px 10px;
    }

    .upload-icon {
        font-size: 2.5rem;
    }

    .upload-area h2 {
        font-size: 1.2rem;
    }
}

/* 入力方法選択タブ */
.input-method-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.input-tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: #f8f9fa;
    border: none;
    border-bottom: 3px solid transparent;
    color: #7f8c8d;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.input-tab-btn:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

.input-tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

.input-tab-btn i {
    font-size: 1.2rem;
}

/* 入力タブコンテンツ */
.input-tab-content {
    display: none;
}

.input-tab-content.active {
    display: block;
}

/* テキスト入力エリア */
.text-input-area {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    border: 2px solid #ecf0f1;
}

.text-input-header {
    margin-bottom: 20px;
}

.text-input-header label {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1rem;
}

.text-input-header label i {
    color: #667eea;
    margin-right: 5px;
}

.document-title-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.document-title-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.text-input-body {
    margin-bottom: 15px;
}

.text-input-body label {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1rem;
}

.text-input-body label i {
    color: #667eea;
    margin-right: 5px;
}

.markdown-textarea {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    background: white;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.markdown-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.markdown-textarea::placeholder {
    color: #95a5a6;
    font-size: 0.9rem;
}

.text-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clear-text-btn {
    padding: 10px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-text-btn:hover {
    background: #c0392b;
}

.char-count {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 変換実行セクション */
.convert-action-section {
    margin: 30px 0;
    text-align: center;
}

.convert-action-section .convert-btn {
    min-width: 250px;
}

/* レスポンシブ対応 - タブとテキスト入力 */
@media (max-width: 768px) {
    .input-tab-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .text-input-area {
        padding: 20px;
    }

    .markdown-textarea {
        min-height: 300px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .input-method-tabs {
        flex-direction: column;
        gap: 5px;
    }

    .input-tab-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .text-input-area {
        padding: 15px;
    }

    .markdown-textarea {
        min-height: 250px;
        font-size: 0.85rem;
    }

    .text-input-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .clear-text-btn {
        width: 100%;
        justify-content: center;
    }
}
