/* Voice Transcriber - theme adapted from sample QuoteVerdict styling */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;

    --red-500: #ef4444;
    --red-600: #dc2626;
    --green-500: #22c55e;

    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;

    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --transition-normal: 0.3s ease-out;
}

html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 50%, #dbeafe 100%);
    color: var(--gray-900);
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 6rem 1rem 3rem;
}

/* ===== TOP NAV ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(to right, var(--primary-600), var(--primary-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: var(--gray-700);
    text-decoration: none;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition: all var(--transition-normal);
}

.nav-link:hover {
    color: var(--primary-600);
    background: var(--primary-50);
}

.nav-link.active {
    color: var(--primary-700);
    background: var(--primary-100);
}

/* ===== CARD CONTAINER ===== */
.container {
    width: 70%;
    max-width: 70%;
    background: #ffffff;
    border: 1px solid var(--primary-100);
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .container {
        width: 92%;
        max-width: 92%;
    }
}

/* ===== HEADINGS ===== */
h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    background: linear-gradient(to right, var(--primary-600), var(--primary-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--gray-600);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* ===== BADGE ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--primary-100);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-700);
    margin-bottom: 1.5rem;
}

.badge .dot {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--primary-500);
    border-radius: var(--radius-full);
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

/* ===== CONTROLS ===== */
.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
}

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

a.btn {
    text-decoration: none;
}

.btn-record {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
    color: #fff;
    box-shadow: var(--shadow);
}

.btn-record:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-900) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-record.recording {
    background: linear-gradient(135deg, var(--red-500) 0%, var(--red-600) 100%);
}

.btn-stop {
    background: #fff;
    color: var(--primary-600);
    border: 2px solid var(--gray-200);
}

.btn-stop:hover:not(:disabled) {
    background: var(--primary-50);
    border-color: var(--primary-300);
    transform: translateY(-1px);
}

/* ===== STATUS ===== */
.status {
    min-height: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: var(--gray-600);
}

.status.error {
    color: var(--red-600);
}

/* ===== RESULT ===== */
.result-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.transcript {
    min-height: 140px;
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    background: var(--primary-50);
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--gray-700);
    box-shadow: var(--shadow);
}

.accuracy-result {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-700);
    line-height: 1.6;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .container {
        padding: 1.75rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .controls {
        flex-direction: column;
    }
}
