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

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

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

/* Header */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

nav {
    display: flex;
    gap: 32px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    cursor: pointer;
}

nav a:hover, nav a.active {
    color: var(--primary);
}

/* Page Sections */
.page-section {
    display: none;
    min-height: calc(100vh - 200px);
}

.page-section.active {
    display: block;
}

/* HERO */
.hero {
    padding: 120px 0;
    text-align: center;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(37,99,235,0.2), transparent 40%),
        radial-gradient(circle at 70% 20%, rgba(16,185,129,0.15), transparent 45%);
    z-index: -1;
}

.hero h1 {
    font-size: 56px;
    font-weight: 900;
}

.hero p {
    font-size: 22px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 16px auto 0;
}

/* SECTIONS */
.page-section {
    display: none;
}

.page-section.active {
    display: block;
}

.card {
    background: var(--surface);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow);
}

.workflow {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.workflow-step {
    background: rgba(255,255,255,0.85);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid var(--border);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-weight: 700;
}

/* Upload Section */
.upload-section {
    margin-bottom: 32px;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: var(--background);
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--secondary);
}

.upload-text {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-subtext {
    color: var(--text-secondary);
    font-size: 14px;
}

#audioFile {
    display: none;
}

.file-name {
    margin-top: 16px;
    text-align: center;
    color: var(--success);
    font-weight: 600;
}

/* Microphone Section */
.mic-section {
    margin-bottom: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.mic-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

.mic-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mic-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.mic-button.recording {
    background: var(--error);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.mic-status {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Options Section */
.options-section {
    margin-bottom: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.option-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.3s;
}

select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Process Button */
.process-button {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.process-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.process-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results Section */
.results-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: none;
}

.results-section.active {
    display: block;
}

.result-content {
    background: var(--background);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.transcription-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
    white-space: pre-wrap;
}

.download-button {
    padding: 12px 24px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.download-button:hover {
    background: #059669;
}

/* Loading Spinner */
.loading {
    display: none;
    text-align: center;
    padding: 24px;
}

.loading.active {
    display: block;
}

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

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

/* Content Pages (Features & About) */
.content-wrapper {
    padding: 80px 0;
}

.page-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 32px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 48px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    min-height: 400px;
}

.content-card p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ===== SECONDARY PAGE ENHANCEMENTS ===== */

.content-wrapper {
    padding: 120px 0;
    position: relative;
}

.content-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(37,99,235,0.12), transparent 45%),
        radial-gradient(circle at 80% 30%, rgba(16,185,129,0.10), transparent 40%);
    z-index: -1;
}

.page-title {
    font-size: 52px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 16px;
}

.page-subtitle {
    text-align: center;
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto 64px;
}

.content-card {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 56px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: fadeUp 0.6s ease;
}

.content-card p {
    font-size: 19px;
    line-height: 1.9;
}

/* Footer */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 80px;
    text-align: center;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1, .page-title {
        font-size: 36px;
    }

    .hero p {
        font-size: 18px;
    }

    .card, .content-card {
        padding: 24px;
    }

    nav {
        gap: 16px;
    }

    nav a {
        font-size: 14px;
    }
}

.feature_list {
    font-size: 50;
}

/* Add these styles to your existing styles.css */

/* TTS Toggle Option */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    color: var(--text);
    padding: 12px;
    border-radius: 8px;
    transition: background 0.3s;
}

.checkbox-label:hover {
    background: var(--background);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-label span {
    flex: 1;
}

/* Audio Container */
.audio-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 16px;
}

.audio-option {
    background: var(--background);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.audio-option h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: var(--text);
    font-weight: 600;
}

.audio-option audio {
    width: 100%;
    margin-bottom: 12px;
}

.audio-option .download-button {
    width: 100%;
}

/* Responsive layout for audio options */
@media (min-width: 768px) {
    .audio-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}