* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0a0a1e 0%, #1a1a35 50%, #2a2a4a 100%);
    min-height: 100vh;
    color: #f0f4f8;
    font-weight: 400;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(99, 179, 237, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(129, 140, 248, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(52, 211, 153, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 179, 237, 0.08) 0%, rgba(129, 140, 248, 0.08) 100%);
    z-index: -1;
}

header h1 {
    color: #ffffff;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #63b3ed 0%, #34d399 50%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.language-selector label {
    color: #f0f4f8;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

#languageSelect {
    background: rgba(15, 15, 30, 0.9);
    color: #f0f4f8;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

#languageSelect:hover {
    border-color: rgba(99, 179, 237, 0.6);
    background: rgba(15, 15, 30, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#languageSelect:focus {
    outline: none;
    border-color: #63b3ed;
    box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.2);
}

#languageSelect option {
    background: #1a1a35;
    color: #f0f4f8;
    padding: 8px;
}

section {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #63b3ed 0%, #34d399 50%, #818cf8 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

section:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.18);
}

section:hover::before {
    opacity: 1;
}

section h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* File Upload Styles */
.file-upload {
    margin-bottom: 24px;
}

.upload-area {
    border: 2px dashed rgba(52, 211, 153, 0.4);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(52, 211, 153, 0.06);
    color: #f0f4f8;
}

.upload-area:hover {
    border-color: rgba(52, 211, 153, 0.7);
    background: rgba(52, 211, 153, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 211, 153, 0.2);
}

.upload-area.dragover {
    border-color: #34d399;
    background: rgba(52, 211, 153, 0.18);
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(52, 211, 153, 0.3);
}

.upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
    opacity: 0.8;
}

.upload-area p {
    margin: 12px 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: #cbd5e1;
}

.file-types {
    color: #94a3b8 !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    opacity: 0.9;
}

/* Audio Controls */
.audio-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f0f4f8;
    transition: all 0.3s ease;
}

.file-info:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(52, 211, 153, 0.3);
}

.playback-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    justify-content: center;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #63b3ed 0%, #818cf8 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(99, 179, 237, 0.4);
}

.btn-secondary {
    background: rgba(148, 163, 184, 0.2);
    color: #f0f4f8;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.3);
    border-color: rgba(52, 211, 153, 0.5);
    box-shadow: 0 8px 25px rgba(52, 211, 153, 0.2);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-warning:hover {
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-success:hover {
    box-shadow: 0 8px 25px rgba(52, 211, 153, 0.4);
}

/* Waveform Styles */
.waveform-container {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    margin: 24px 0;
    overflow: hidden;
    height: 200px;
    transition: all 0.3s ease;
}

.waveform-container:hover {
    border-color: rgba(52, 211, 153, 0.3);
    box-shadow: 0 8px 25px rgba(52, 211, 153, 0.1);
}

#waveformCanvas {
    width: 100%;
    height: 200px;
    display: block;
    cursor: crosshair;
}

.selection-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.selection-marker {
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(135deg, #63b3ed 0%, #34d399 100%);
    cursor: ew-resize;
    pointer-events: all;
    z-index: 10;
    transform: translateX(-1px);
    display: none;
    box-shadow: 0 0 10px rgba(99, 179, 237, 0.6);
    border-radius: 2px;
}

.selection-marker::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #63b3ed 0%, #34d399 100%);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 12px rgba(99, 179, 237, 0.6);
    transition: all 0.3s ease;
}

.selection-marker:hover::before {
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(99, 179, 237, 0.8);
    border-color: rgba(255, 255, 255, 0.7);
}

.selection-area {
    position: absolute;
    top: 0;
    height: 100%;
    background: rgba(52, 211, 153, 0.15);
    border-left: 2px solid #34d399;
    border-right: 2px solid #34d399;
    pointer-events: none;
    display: none;
    backdrop-filter: blur(2px);
}

.time-info {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
}

.time-info:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(52, 211, 153, 0.3);
}

.time-info div {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.time-info label {
    font-weight: 500;
    color: #cbd5e1;
    font-size: 14px;
}

.time-info span {
    color: #34d399;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    text-shadow: 0 0 8px rgba(52, 211, 153, 0.3);
}

.edit-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* Export Section */
.export-info {
    background: rgba(52, 211, 153, 0.08);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid rgba(52, 211, 153, 0.3);
    transition: all 0.3s ease;
}

.export-info:hover {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.4);
}

.export-info p {
    color: #cbd5e1;
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 1.1rem;
}

.export-info ul {
    list-style: none;
    padding-left: 0;
}

.export-info li {
    margin: 12px 0;
    position: relative;
    padding-left: 30px;
    color: #f0f4f8;
    font-weight: 500;
    line-height: 1.5;
}

.export-info li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #34d399;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Progress Overlay */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 30, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.progress-content {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 300px;
}

.progress-content p {
    color: #f0f4f8;
    font-size: 1.1rem;
    margin-top: 20px;
    font-weight: 500;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #34d399;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }
    
    header {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    header h1 {
        font-size: clamp(1.5rem, 4vw, 2rem);
        margin-bottom: 16px;
    }
    
    .language-selector {
        flex-direction: column;
        gap: 12px;
    }
    
    .language-selector label {
        font-size: 14px;
    }
    
    #languageSelect {
        min-width: 100%;
        font-size: 14px;
        padding: 12px 16px;
    }
    
    section {
        padding: 24px 20px;
        margin-bottom: 24px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .file-info {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .playback-controls,
    .edit-controls {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        padding: 16px 24px;
    }
    
    .time-info div {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .waveform-container {
        height: 150px;
        margin: 20px 0;
    }
    
    #waveformCanvas {
        height: 150px;
    }
    
    .progress-content {
        padding: 40px 30px;
        margin: 20px;
        min-width: auto;
        width: calc(100% - 40px);
    }
}

/* Hidden elements */
.hidden {
    display: none !important;
}
