/* ==========================================================================
   ConvertAudioFast - Main Stylesheet
   Free Audio Converter - Fast, Private, Browser-Based Audio Conversion
   ========================================================================== */

/* ===== Base Styles ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fa;
    background-image: radial-gradient(circle at 20% 30%, rgba(120, 119, 198, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.04) 0%, transparent 50%);
    min-height: 100vh;
    padding: 40px 20px 60px;
    color: #1e293b;
    letter-spacing: -0.025em;
}

.container { max-width: 1280px; margin: 0 auto; }

/* ===== Header ===== */
header { text-align: center; margin-bottom: 48px; }
header a { text-decoration: none; color: inherit; }
h1 { font-size: 3.5rem; font-weight: 700; margin-bottom: 12px; color: #0f172a; line-height: 1.1; letter-spacing: -0.04em; }
.subtitle { font-size: 1.25rem; color: #64748b; font-weight: 400; letter-spacing: -0.02em; }

/* ===== Main Content Grid ===== */
.main-content { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 1024px) { .main-content { grid-template-columns: 1fr 340px; } }

/* ===== Conversion Section ===== */
.conversion-section {
    background: white;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 20px 40px rgba(0,0,0,0.03);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.conversion-section h2 {
    margin-bottom: 32px;
    color: #0f172a;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* ===== Upload Area ===== */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 24px;
    padding: 64px 32px;
    text-align: center;
    background: #f8fafc;
    margin-bottom: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.upload-area:hover { border-color: #94a3b8; background: #f1f5f9; }
.upload-area.drag-over { background: #f1f5f9; border-color: #64748b; }
.upload-icon { font-size: 4rem; margin-bottom: 20px; opacity: 0.6; }
.upload-text { font-size: 1.25rem; color: #475569; margin-bottom: 12px; font-weight: 500; }

.browse-btn {
    padding: 14px 32px;
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    transition: all 0.2s ease;
}
.browse-btn:hover { background: #1e293b; transform: translateY(-1px); }

/* ===== File Info ===== */
.file-info {
    background: #f1f5f9;
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 28px;
    display: none;
    border: 1px solid #e2e8f0;
    color: #475569;
}
.file-info.active { display: block; }

/* ===== Format Selection ===== */
.format-selection {
    margin-bottom: 32px;
}
.format-selection label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1e293b;
    font-size: 1.1rem;
}
.format-selection select {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.05rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    color: #1e293b;
    font-weight: 500;
}

/* ===== Convert Button ===== */
.convert-btn {
    width: 100%;
    padding: 18px 32px;
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.15);
}
.convert-btn:hover:not(:disabled) { background: #1e293b; transform: translateY(-1px); }
.convert-btn:disabled { background: #cbd5e1; cursor: not-allowed; box-shadow: none; }

/* ===== Progress Bar ===== */
.progress-container { margin: 24px 0; display: none; }
.progress-container.active { display: block; }
.progress-bar {
    width: 100%; height: 48px; background: #f1f5f9;
    border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0;
    position: relative;
}
.progress-fill {
    height: 100%; background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    width: 0%; transition: width 0.3s ease;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 600; font-size: 1.05rem;
}

/* ===== Result Section ===== */
.result-section { display: none; text-align: center; margin-top: 28px; }
.result-section.active { display: block; }
.result-card {
    background: #f8fef9;
    padding: 28px;
    border-radius: 16px;
    border: 2px solid #86efac;
}
.success-icon { font-size: 3.5rem; margin-bottom: 16px; }
.result-text { font-size: 1.25rem; color: #166534; margin-bottom: 24px; font-weight: 600; }

.download-btn {
    width: 100%; padding: 18px; background: #166534; color: white;
    border: none; border-radius: 12px; font-weight: 600; font-size: 1.1rem;
    cursor: pointer; margin-bottom: 16px; transition: all 0.2s ease;
}
.download-btn:hover { background: #15803d; transform: translateY(-1px); }

.new-conversion-btn {
    background: white;
    color: #0f172a;
    border: 2px solid #e2e8f0;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
}
.new-conversion-btn:hover { background: #f8f9fa; }

/* ===== Error Message ===== */
.error-message {
    background: #fef2f2; color: #991b1b; padding: 16px 20px;
    border-radius: 12px; margin-bottom: 20px; display: none;
    border: 2px solid #fca5a5; font-weight: 500;
}
.error-message.active { display: block; }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.info-card, .features-box {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 10px 20px rgba(0,0,0,0.02);
    border: 1px solid rgba(226, 232, 240, 0.8);
}
.info-card h3, .features-box h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #0f172a;
    font-weight: 700;
}
.feature-list {
    list-style: none;
}
.feature-list li {
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    font-size: 1rem;
    line-height: 1.6;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
    content: "✓";
    color: #22c55e;
    font-weight: bold;
    margin-right: 12px;
    font-size: 1.2rem;
}

/* ===== Educational Content ===== */
.educational-content {
    background: white;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 20px 40px rgba(0,0,0,0.03);
    border: 1px solid rgba(226, 232, 240, 0.8);
    margin-top: 32px;
}
.educational-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}
.educational-content h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1e293b;
    margin-top: 28px;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.educational-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 20px;
}
.educational-content ul {
    margin: 20px 0;
    padding-left: 28px;
}
.educational-content li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 12px;
}

/* ===== Use Case Grid ===== */
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}
.use-case-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
}
.use-case-card h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 12px;
}
.use-case-card p {
    font-size: 0.98rem;
    line-height: 1.7;
    color: #64748b;
    margin-bottom: 0;
}

/* ===== Ad Container ===== */
.ad-container {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Footer ===== */
footer {
    max-width: 1280px;
    margin: 60px auto 0;
    padding: 32px 20px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* ===== Info Bar Navigation ===== */
.info-bar {
    background: white;
    padding: 16px 0;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 32px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.info-bar-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.info-bar-link {
    color: #475569;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    padding: 10px 20px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.info-bar-link:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-decoration: none;
}

.info-bar-icon {
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    justify-content: center;
}
.nav-links a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}
.nav-links a:hover { color: #0f172a; }

/* ===== GDPR Cookie Banner ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #0f172a;
    color: white;
    padding: 20px;
    display: none; /* Hidden by default, JS shows it */
    justify-content: center;
    align-items: center;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    z-index: 9999;
    flex-wrap: wrap;
    gap: 15px;
    border-top: 1px solid #334155;
}
.cookie-text {
    font-size: 0.95rem;
    max-width: 800px;
    line-height: 1.5;
    color: #e2e8f0;
}
.cookie-buttons {
    display: flex;
    gap: 10px;
}
.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.cookie-accept {
    background: #22c55e;
    color: white;
}
.cookie-accept:hover { background: #16a34a; }
.cookie-decline {
    background: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
}
.cookie-decline:hover { border-color: #cbd5e1; color: white; }

/* ===== Responsive (Mobile) ===== */
@media (max-width: 768px) {
    body { padding: 24px 16px 40px; }
    h1 { font-size: 2.5rem; }
    .subtitle { font-size: 1.1rem; }
    .conversion-section, .info-card, .educational-content { padding: 32px 24px; }
    .upload-area { padding: 48px 20px; }
    .use-case-grid { grid-template-columns: 1fr; }
    .info-bar-links { gap: 8px; }
    .info-bar-link {
        font-size: 0.85rem;
        padding: 8px 14px;
    }
    .cookie-banner { flex-direction: column; text-align: center; }
}
