:root {
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-hover: #252525;
    --beige-light: #d4c5b9;
    --beige-medium: #c4b5a9;
    --beige-dark: #b8a99d;
    --text-primary: #f5f5f5;
    --text-secondary: #b8a99d;
    --text-muted: #8a7d72;
    --border-color: rgba(212, 197, 185, 0.1);
    --accent: #d4c5b9;
    --accent-hover: #e4d5c9;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 40px 0 30px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.header-content {
    text-align: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--beige-light);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Upload Section */
.upload-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow);
}

.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(212, 197, 185, 0.02);
    cursor: pointer;
}

.dropzone:hover {
    border-color: var(--beige-medium);
    background: rgba(212, 197, 185, 0.05);
}

.dropzone.dragover {
    border-color: var(--beige-light);
    background: rgba(212, 197, 185, 0.08);
    transform: scale(1.02);
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--beige-medium);
    stroke-width: 1.5;
}

.dropzone h2 {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 600;
}

.hint {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--beige-light), var(--beige-medium));
    color: var(--bg-dark);
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 197, 185, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 197, 185, 0.3);
    background: linear-gradient(135deg, var(--accent-hover), var(--beige-light));
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--beige-light);
    border: 1px solid var(--border-color);
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(212, 197, 185, 0.1);
    border-color: var(--beige-medium);
}

/* Conversion Options */
.conversion-options {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.conversion-options h3 {
    font-size: 1.2rem;
    color: var(--beige-light);
    margin-bottom: 20px;
    font-weight: 600;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.select-input {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-input:hover {
    border-color: var(--beige-medium);
}

.select-input:focus {
    outline: none;
    border-color: var(--beige-light);
    box-shadow: 0 0 0 3px rgba(212, 197, 185, 0.1);
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Files Section */
.files-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow);
    max-height: 800px;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.3rem;
    color: var(--beige-light);
    font-weight: 600;
}

.file-count {
    background: rgba(212, 197, 185, 0.1);
    color: var(--beige-light);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.files-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.files-list::-webkit-scrollbar {
    width: 8px;
}

.files-list::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 4px;
}

.files-list::-webkit-scrollbar-thumb {
    background: var(--beige-dark);
    border-radius: 4px;
}

.files-list::-webkit-scrollbar-thumb:hover {
    background: var(--beige-medium);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* File Item */
.file-item {
    background: rgba(212, 197, 185, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: rgba(212, 197, 185, 0.06);
    border-color: var(--beige-dark);
    transform: translateX(4px);
}

.file-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(212, 197, 185, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--beige-medium);
    font-size: 1.5rem;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-details {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.file-status {
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.file-status.idle {
    background: rgba(212, 197, 185, 0.1);
    color: var(--beige-medium);
}

.file-status.processing {
    background: rgba(212, 197, 185, 0.15);
    color: var(--beige-light);
}

.file-status.completed {
    background: rgba(212, 197, 185, 0.2);
    color: var(--beige-light);
}

.file-status.error {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b7a;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(212, 197, 185, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--beige-light), var(--beige-medium));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-small {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-download {
    background: var(--beige-light);
    color: var(--bg-dark);
}

.btn-download:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-remove {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-remove:hover {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: #ff6b7a;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.overlay-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px var(--shadow-lg);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--beige-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.overlay-content h3 {
    color: var(--beige-light);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.overlay-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(212, 197, 185, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--beige-light), var(--beige-medium));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }
    
    .upload-section,
    .files-section {
        padding: 20px;
    }
    
    .dropzone {
        padding: 40px 20px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}