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

/* Inter, self-hosted. This is the variable font, so one file covers every
   weight from 400 to 800. Serving it from our own origin removes the
   fonts.googleapis.com -> fonts.gstatic.com request chain entirely.
   latin-ext is only downloaded if a character in its range is used. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Metric-matched stand-in for Inter. Text first paints in the local system
   font; these adjustments make that font occupy the same space Inter will,
   so the swap causes no layout shift. */
@font-face {
    font-family: 'Inter Fallback';
    src: local('Arial');
    ascent-override: 90%;
    descent-override: 22.43%;
    line-gap-override: 0%;
    size-adjust: 107.4%;
}

:root {
    --primary-color: #8B5CF6;
    --primary-dark: #6D28D9;
    --primary-light: #C4B5FD;
    --primary-muted: #F5F3FF;
    --secondary-color: #EC4899;
    --success-color: #10b981;
    --success-muted: #ecfdf5;
    --warning-color: #f59e0b;
    --warning-muted: #fffbeb;
    --danger-color: #ef4444;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --gray-lighter: #f1f5f9;
    --white: #ffffff;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 2px 8px -1px rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.04);
    --shadow-lg: 0 8px 20px -4px rgb(0 0 0 / 0.1), 0 2px 6px -2px rgb(0 0 0 / 0.05);
    --shadow-xl: 0 16px 32px -6px rgb(0 0 0 / 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
}

body {
    font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--gray-lighter);
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ======================== */
/* NAVIGATION — App-like    */
/* ======================== */
.navbar {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: env(safe-area-inset-top, 0);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo svg {
    color: var(--primary-color);
    width: 28px;
    height: 28px;
}

.logo:hover {
    color: var(--primary-dark);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.8rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.92rem;
    transition: var(--transition);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    touch-action: manipulation;
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ======================== */
/* HERO — App-like, compact */
/* ======================== */
.hero-section {
    padding: 48px 0 40px;
    background: var(--primary-color);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.hero-subtitle {
    font-size: 1.05rem;
    opacity: 0.88;
    max-width: 520px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.5;
}

/* ======================== */
/* TOOL CARD — The "App"    */
/* ======================== */
.tool-container {
    position: relative;
    z-index: 1;
}

.tool-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-xl);
    max-width: 660px;
    margin: 0 auto;
}

.tool-header {
    text-align: center;
    margin-bottom: 22px;
}

.tool-header h2 {
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 700;
}

.tool-header p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* Mode Selection — horizontal pills */
.mode-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 14px 8px;
    background: var(--gray-lighter);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.82rem;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.mode-btn:hover {
    background: var(--gray-light);
}

.mode-btn:active {
    transform: scale(0.96);
}

.mode-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-dark);
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.25);
}

.mode-btn svg {
    width: 24px;
    height: 24px;
}

/* Mode buttons rendered as links to their own mode page */
a.mode-btn {
    text-decoration: none;
    text-align: center;
}

/* Speaker Selection — horizontal pills */
.speaker-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.speaker-btn {
    padding: 10px 8px;
    background: var(--gray-lighter);
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.speaker-btn:hover {
    border-color: var(--primary-light);
}

.speaker-btn:active {
    transform: scale(0.96);
}

.speaker-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-dark);
}

/* Progress Bar */
.progress-container {
    margin-bottom: 18px;
}

.progress-bar {
    height: 8px;
    background: var(--gray-lighter);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    border-radius: 20px;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

#progressPercent {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95rem;
}

#statusText {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Control Buttons — always 2-col */
.control-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
    touch-action: manipulation;
    min-height: 48px;
    -webkit-user-select: none;
    user-select: none;
}

.btn:active:not(:disabled) {
    transform: scale(0.97) !important;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gray-lighter);
    color: var(--text-primary);
    border: 2px solid var(--gray-light);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-light);
}

.btn-large {
    padding: 15px 32px;
    font-size: 1rem;
}

/* Warning Box */
.warning-box {
    display: flex;
    gap: 10px;
    padding: 11px 14px;
    background: var(--warning-muted);
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    color: #92400e;
}

.warning-box svg {
    flex-shrink: 0;
    margin-top: 1px;
    width: 16px;
    height: 16px;
}

.warning-box p {
    font-size: 0.78rem;
    line-height: 1.4;
}

/* ======================== */
/* AD CONTAINERS            */
/* ======================== */
.ad-container {
    margin: 28px auto;
    max-width: 660px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.ad-container-section {
    margin: 0 auto 20px;
    max-width: 800px;
    overflow: hidden;
}

/* Reserve the slot height up front. Responsive AdSense units render at 0px
   until the ad arrives, then push everything below them down — that late
   expansion was the main source of layout shift. */
.ad-container .adsbygoogle,
.ad-container-section .adsbygoogle {
    min-height: 280px;
}

/* Extra separation between the tool card and the ad below it,
   so the ad is never mistaken for part of the tool */
.ad-container.under-tool {
    margin-top: 44px;
}

.ad-label {
    display: block;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 6px;
}

/* ======================== */
/* NEXT-STEP POPUP          */
/* ======================== */
body.modal-open {
    overflow: hidden;
}

.next-step-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: overlayFadeIn 0.2s ease-out;
}

.next-step-modal {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 28px 22px 22px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    text-align: center;
    animation: modalPopIn 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.next-step-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: var(--gray-lighter);
    color: var(--gray);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.next-step-close:hover {
    background: var(--gray-light);
    color: var(--text-primary);
}

.next-step-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--success-color);
    color: var(--white);
    margin-bottom: 10px;
}

.next-step-modal.stopped .next-step-check {
    background: var(--warning-color);
}

.next-step-modal h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.next-step-modal p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.next-step-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.next-step-actions .btn {
    text-decoration: none;
    justify-content: center;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(12px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 32px;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: var(--surface);
    border: 1px solid rgba(139, 92, 246, 0.15);
    padding: 20px 14px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 2px;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ======================== */
/* SECTIONS — Tighter       */
/* ======================== */
.content-section,
.benefits-section,
.use-cases-section,
.comparison-section,
.faq-section,
.tips-section,
.prevention-section,
.cta-section {
    padding: 64px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.content-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-muted);
    border-radius: 11px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

.content-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.content-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 0.92rem;
}

.content-card p:last-child {
    margin-bottom: 0;
}

/* Steps */
.step-by-step {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius-lg);
    margin-top: 40px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: var(--shadow);
}

.step-by-step h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 28px;
    color: var(--text-primary);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.step {
    background: var(--gray-lighter);
    padding: 20px;
    border-radius: var(--radius);
    position: relative;
}

.step-number {
    width: 38px;
    height: 38px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.step h4 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.step p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.88rem;
}

/* Benefits Grid */
.benefits-section {
    background: var(--white);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.benefit-card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
    border: 1px solid var(--gray-light);
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.08), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.benefit-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 32px -8px rgba(139, 92, 246, 0.22);
    border-color: var(--primary-color);
}

.benefit-card:hover::before {
    left: 100%;
}

.benefit-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 14px;
    margin: 0 auto 14px;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, color 0.3s ease;
}

.benefit-card:hover .benefit-icon {
    transform: scale(1.15) rotate(5deg);
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35);
}

.benefit-icon svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.benefit-card h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.benefit-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Use Cases */
.use-cases-container {
    display: grid;
    gap: 14px;
}

.use-case {
    background: var(--white);
    padding: 22px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.use-case:hover {
    box-shadow: var(--shadow-lg);
}

.use-case h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.use-case h3 svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.use-case p {
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: 0.9rem;
}

/* Comparison Table */
.comparison-section {
    background: var(--gray-lighter);
}

.comparison-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--primary-color);
    color: var(--white);
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

th {
    font-weight: 600;
    font-size: 0.88rem;
}

td {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

td:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.positive {
    color: var(--success-color) !important;
    font-weight: 600;
}

.negative {
    color: var(--danger-color) !important;
}

.neutral {
    color: var(--warning-color) !important;
}

tbody tr:hover {
    background: var(--gray-lighter);
}

/* FAQ Section */
.faq-container {
    max-width: 760px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    font-family: inherit;
    touch-action: manipulation;
    gap: 12px;
}

.faq-question:hover {
    background: var(--gray-lighter);
}

.faq-question:active {
    background: var(--gray-light);
}

.faq-question svg {
    transition: transform 0.25s ease;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 18px 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.88rem;
}

/* Tips Section */
.tips-section {
    background: var(--white);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.tip-card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-light);
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.tip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(217, 119, 6, 0.08), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.tip-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 32px -8px rgba(217, 119, 6, 0.22);
    border-color: #d97706;
}

.tip-card:hover::before {
    left: 100%;
}

.tip-number {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--warning-muted);
    border-radius: 12px;
    margin-bottom: 14px;
    color: #d97706;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.tip-card:hover .tip-number {
    transform: scale(1.15) rotate(6deg);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.35);
}

.tip-number svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.tip-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--text-primary);
    transition: color 0.25s ease;
}

.tip-card:hover h3 {
    color: #d97706;
}

.tip-card p {
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: 0.88rem;
}

[data-theme="dark"] .tip-card {
    background: #111827;
    border-color: #1f2937;
}

[data-theme="dark"] .tip-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 16px 35px -8px rgba(245, 158, 11, 0.28);
}

[data-theme="dark"] .tip-card::before {
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.12), transparent);
}

/* Prevention Section */
.prevention-content {
    display: grid;
    gap: 14px;
    max-width: 760px;
    margin: 0 auto;
}

.prevention-card {
    background: var(--white);
    padding: 22px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--success-color);
}

.prevention-card h3 {
    font-size: 1.08rem;
    margin-bottom: 6px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.prevention-card h3 svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--success-color);
}

.prevention-card p {
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cta-content p {
    font-size: 1rem;
    margin-bottom: 24px;
    opacity: 0.9;
}

.cta-section .btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.cta-section .btn-primary:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 44px 0 20px;
}

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

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.footer-section h4 {
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: var(--primary-light);
}

.footer-section p {
    color: var(--gray-light);
    line-height: 1.55;
    font-size: 0.88rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 7px;
}

.footer-section ul li a {
    color: var(--gray-light);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.88rem;
}

.footer-section ul li a:hover {
    color: var(--primary-light);
    padding-left: 3px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--dark-light);
    color: var(--gray);
    font-size: 0.82rem;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ======================== */
/* MOBILE — App Feel        */
/* ======================== */
@media (max-width: 768px) {
    .container {
        padding: 0 14px;
    }

    /* Nav */
    .mobile-menu-btn {
        display: flex;
    }

    .nav-wrapper {
        padding: 8px 0;
    }

    .logo {
        font-size: 1rem;
        gap: 8px;
    }

    .logo svg {
        width: 24px;
        height: 24px;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 12px 14px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-110%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        gap: 0;
        z-index: 1000;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-links li {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid var(--gray-light);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    /* Hero — ultra compact, tool-first */
    .hero-section {
        padding: 20px 0 22px;
    }

    .hero-content {
        margin-bottom: 16px;
    }

    .hero-title {
        font-size: 1.35rem;
        margin-bottom: 6px;
        letter-spacing: -0.02em;
    }

    .hero-subtitle {
        font-size: 0.82rem;
        line-height: 1.4;
        opacity: 0.85;
    }

    /* Tool card — compact app interface */
    .tool-card {
        padding: 16px;
        border-radius: 14px;
    }

    .tool-header {
        margin-bottom: 14px;
    }

    .tool-header h2 {
        font-size: 1rem;
        margin-bottom: 2px;
    }

    .tool-header p {
        font-size: 0.75rem;
    }

    /* Mode buttons — always 3 across */
    .mode-selection {
        gap: 7px;
        margin-bottom: 12px;
    }

    .mode-btn {
        padding: 10px 4px;
        gap: 3px;
        font-size: 0.7rem;
        border-radius: 10px;
        border-width: 1.5px;
    }

    .mode-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Speaker buttons — always 3 across */
    .speaker-selection {
        gap: 6px;
        margin-bottom: 12px;
    }

    .speaker-btn {
        padding: 8px 6px;
        font-size: 0.75rem;
        border-radius: 10px;
        border-width: 1.5px;
    }

    /* Progress */
    .progress-container {
        margin-bottom: 12px;
    }

    .progress-bar {
        height: 6px;
        margin-bottom: 6px;
    }

    .progress-text {
        font-size: 0.75rem;
    }

    #progressPercent {
        font-size: 0.85rem;
    }

    /* Buttons */
    .control-buttons {
        gap: 8px;
        margin-bottom: 10px;
    }

    .btn {
        padding: 11px 12px;
        font-size: 0.82rem;
        gap: 5px;
        min-height: 44px;
        border-radius: 10px;
    }

    .btn svg {
        width: 16px;
        height: 16px;
    }

    /* Warning */
    .warning-box {
        padding: 9px 10px;
        gap: 8px;
        border-radius: 10px;
    }

    .warning-box svg {
        width: 14px;
        height: 14px;
    }

    .warning-box p {
        font-size: 0.72rem;
        line-height: 1.35;
    }

    /* Ad containers */
    .ad-container {
        margin: 18px auto;
    }

    .ad-container-section {
        margin: 0 auto 14px;
    }

    /* Mobile responsive units land at 300x250 far more often than desktop,
       so reserve less here and waste less screen when a slot goes unfilled */
    .ad-container .adsbygoogle,
    .ad-container-section .adsbygoogle {
        min-height: 250px;
    }

    /* Stats */
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 18px;
    }

    .stat-card {
        padding: 14px 10px;
        border-radius: 10px;
    }

    .stat-number {
        font-size: 1.35rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    /* All sections */
    .content-section,
    .benefits-section,
    .use-cases-section,
    .comparison-section,
    .faq-section,
    .tips-section,
    .prevention-section,
    .cta-section {
        padding: 36px 0;
    }

    .section-header {
        margin-bottom: 22px;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .section-header p {
        font-size: 0.85rem;
    }

    /* Content cards */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 24px;
    }

    .content-card {
        padding: 18px;
    }

    .card-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .card-icon svg {
        width: 20px;
        height: 20px;
    }

    .content-card h3 {
        font-size: 1.05rem;
        margin-bottom: 8px;
    }

    .content-card p {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    /* Steps */
    .step-by-step {
        padding: 20px 14px;
        margin-top: 24px;
        border-radius: 14px;
    }

    .step-by-step h3 {
        font-size: 1.15rem;
        margin-bottom: 16px;
    }

    .steps-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .step {
        padding: 14px;
        border-radius: 10px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .step h4 {
        font-size: 0.92rem;
        margin-bottom: 4px;
    }

    .step p {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    /* Benefits — 2-col grid */
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .benefit-card {
        padding: 14px 10px;
        border-radius: 10px;
    }

    .benefit-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        margin-bottom: 8px;
    }

    .benefit-icon svg {
        width: 20px;
        height: 20px;
    }

    .benefit-card h3 {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .benefit-card p {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    /* Use cases */
    .use-cases-container {
        gap: 10px;
    }

    .use-case {
        padding: 16px;
        border-left-width: 3px;
        border-radius: 10px;
    }

    .use-case h3 {
        font-size: 0.98rem;
        gap: 8px;
    }

    .use-case h3 svg {
        width: 18px;
        height: 18px;
    }

    .use-case p {
        font-size: 0.82rem;
    }

    /* Table */
    table {
        font-size: 0.78rem;
    }

    th, td {
        padding: 10px 8px;
    }

    /* FAQ */
    .faq-item {
        margin-bottom: 8px;
        border-radius: 10px;
    }

    .faq-question {
        padding: 13px 14px;
        font-size: 0.88rem;
        gap: 10px;
    }

    .faq-question svg {
        width: 16px;
        height: 16px;
    }

    .faq-answer p {
        padding: 0 14px 12px;
        font-size: 0.82rem;
    }

    /* Tips */
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tip-card {
        padding: 16px;
        border-radius: 10px;
    }

    .tip-number {
        width: 34px;
        height: 34px;
        margin-bottom: 8px;
    }

    .tip-number svg {
        width: 18px;
        height: 18px;
    }

    .tip-card h3 {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }

    .tip-card p {
        font-size: 0.82rem;
    }

    /* Prevention */
    .prevention-content {
        gap: 10px;
    }

    .prevention-card {
        padding: 16px;
        border-left-width: 3px;
        border-radius: 10px;
    }

    .prevention-card h3 {
        font-size: 0.95rem;
        gap: 8px;
    }

    .prevention-card h3 svg {
        width: 18px;
        height: 18px;
    }

    .prevention-card p {
        font-size: 0.82rem;
    }

    /* CTA */
    .cta-content h2 {
        font-size: 1.35rem;
    }

    .cta-content p {
        font-size: 0.88rem;
        margin-bottom: 18px;
    }

    .btn-large {
        padding: 13px 28px;
        font-size: 0.92rem;
    }

    /* Footer */
    .footer {
        padding: 32px 0 14px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }

    .footer-section h3 {
        font-size: 1rem;
    }

    .footer-section h4 {
        font-size: 0.85rem;
    }

    .footer-section p,
    .footer-section ul li a {
        font-size: 0.8rem;
    }

    .footer-bottom {
        font-size: 0.75rem;
        padding-top: 16px;
    }
}

@media (max-width: 380px) {
    .container {
        padding: 0 12px;
    }

    .hero-title {
        font-size: 1.2rem;
    }

    .hero-subtitle {
        font-size: 0.78rem;
    }

    .tool-card {
        padding: 14px;
    }

    .tool-header h2 {
        font-size: 0.92rem;
    }

    .mode-btn {
        padding: 8px 3px;
        font-size: 0.65rem;
    }

    .mode-btn svg {
        width: 18px;
        height: 18px;
    }

    .speaker-btn {
        padding: 7px 4px;
        font-size: 0.7rem;
    }

    .stat-card {
        padding: 12px 8px;
    }

    .stat-number {
        font-size: 1.15rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .benefits-grid {
        gap: 8px;
    }

    .benefit-card {
        padding: 12px 8px;
    }

    .benefit-card h3 {
        font-size: 0.8rem;
    }

    .benefit-card p {
        font-size: 0.72rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ======================== */
/* ANIMATIONS               */
/* ======================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeInUp 0.4s ease-out;
}

.stat-card {
    animation: fadeInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

/* Selection */
::selection {
    background: var(--primary-color);
    color: var(--white);
}
/* ======================== */
/* APP INSTALL CTA (Google Play), shown in the completion modal */
/* ======================== */
.next-step-app {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.next-step-app-hint {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Deliberately styled unlike an AdSense unit — a dark pill, not a boxed
   ad — so it can never be mistaken for or confused with an ad. */
.app-install-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #202124;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
}

.app-install-btn:hover {
    background: #000;
    transform: translateY(-1px);
}

.app-install-icon {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border-radius: 4px;
    padding: 4px;
    line-height: 0;
}

/* --- NEW PREMIUM ANIMATIONS & FAQ REDESIGN --- */

/* Website fade-in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* FAQ Premium Redesign */
.faq-item {
    background: var(--surface);
    border: 1px solid var(--gray-light);
    border-radius: 16px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.faq-item.active {
    background: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: scale(1.02);
    border-color: transparent;
}

.faq-question {
    padding: 20px 24px;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.faq-item.active .faq-question {
    color: var(--white);
    font-weight: 700;
}

.faq-item.active .faq-question svg {
    color: var(--white);
    transform: rotate(-180deg) scale(1.2); /* Turns the chevron/plus into an X */
}

.faq-answer {
    max-height: 0;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-10px);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
}

.faq-answer p {
    color: var(--white);
    opacity: 0.9;
    padding: 0 24px 24px;
    font-size: 0.95rem;
}

/* --- PREMIUM COMPARISON TABLE REDESIGN --- */
.comparison-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 10px 40px -10px rgba(139, 92, 246, 0.2);
    border: 1px solid var(--primary-light);
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

th {
    padding: 20px 16px;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: none;
}

th:first-child { border-top-left-radius: 18px; }
th:last-child { border-top-right-radius: 18px; }

td {
    padding: 18px 16px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--gray-light);
    transition: all 0.2s ease;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover td {
    background: var(--primary-muted);
}

td:first-child {
    font-weight: 700;
    color: var(--text-primary);
}

/* Highlight 'Our Tool' Column */
td:nth-child(2) {
    background: rgba(139, 92, 246, 0.06);
    color: var(--primary-dark);
    font-size: 1rem;
}
tbody tr:hover td:nth-child(2) {
    background: rgba(139, 92, 246, 0.12);
}

.positive {
    color: var(--success-color);
    font-weight: 800;
}
.negative {
    color: var(--danger-color);
    font-weight: 600;
}
.neutral {
    color: var(--warning-color);
    font-weight: 600;
}

/* --- PREMIUM TOOL CARD UI / UX --- */
.tool-card {
    background: var(--surface);
    border: 1px solid rgba(139, 92, 246, 0.3); /* Subtle Violet Border */
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 20px 50px -15px rgba(139, 92, 246, 0.25);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Optional soft glow behind the tool card */
.tool-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139,92,246,0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.tool-header, .mode-selection, .speaker-selection, .progress-container, .control-buttons, .warning-box {
    position: relative;
    z-index: 1;
}

.tool-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mode-btn, .speaker-btn {
    background: var(--surface-alt);
    border: 1px solid var(--gray-light);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-btn:hover, .speaker-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.05);
    border-color: var(--primary-light);
}

.mode-btn.active, .speaker-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    box-shadow: 0 10px 20px -5px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px) scale(1.02);
}

.mode-btn.active svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Animated Progress Bar */
.progress-bar {
    height: 12px;
    background: var(--gray-light);
    border-radius: 20px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.progress-fill {
    background: linear-gradient(
        -45deg, 
        var(--primary-color) 25%, 
        var(--secondary-color) 25%, 
        var(--secondary-color) 50%, 
        var(--primary-color) 50%, 
        var(--primary-color) 75%, 
        var(--secondary-color) 75%, 
        var(--secondary-color)
    );
    background-size: 20px 20px;
    animation: moveStripes 1s linear infinite;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(139,92,246,0.5);
}

@keyframes moveStripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

/* Start Button Glowing */
#startBtn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.5);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#startBtn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px -5px rgba(139, 92, 246, 0.6);
}

#startBtn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

/* Fix hover background for active FAQ questions */
.faq-item.active .faq-question:hover, .faq-item.active .faq-question:active { background: transparent; }

.mode-btn, .speaker-btn { color: var(--text-primary); font-weight: 600; }
.mode-btn.active, .speaker-btn.active { color: var(--white); }

/* --- DARK MODE THEME --- */
[data-theme="dark"] {
    --white: #111827;           /* Very dark gray background */
    --surface: #1f2937;         /* Slightly lighter for cards */
    --surface-alt: #374151;     /* Even lighter for inputs/items */
    --gray-lighter: #0f172a;    /* Body background */
    --gray-light: #4b5563;      /* Borders */
    --gray: #9ca3af;            
    --text-primary: #f9fafb;    /* White text */
    --text-secondary: #d1d5db;  /* Light gray text */
    --primary-muted: rgba(139, 92, 246, 0.15);
    --dark: #f8fafc;            /* Inverse dark */
    --dark-light: #e2e8f0;
}

[data-theme="dark"] body {
    background: var(--white);
}

[data-theme="dark"] .hero-section {
    background: #0f172a;
}
[data-theme="dark"] .hero-section::before, 
[data-theme="dark"] .hero-section::after {
    background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 60%);
}

[data-theme="dark"] .contact-section,
[data-theme="dark"] .tips-section {
    background: var(--white);
}

/* Theme Toggle Button Styles */
.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin: 0;
}
.theme-toggle-btn:hover {
    background: var(--surface-alt);
    transform: scale(1.1);
}
.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* --- DARK MODE FIXES --- */
[data-theme="dark"] .navbar { background: rgba(31, 41, 55, 0.97); }
[data-theme="dark"] .nav-links { background: var(--surface); }
[data-theme="dark"] .hero-section { color: #f9fafb !important; }
[data-theme="dark"] .mode-btn.active, [data-theme="dark"] .speaker-btn.active, [data-theme="dark"] #startBtn, [data-theme="dark"] .form-submit { color: #ffffff !important; }
[data-theme="dark"] .warning-box { background: var(--surface-alt); color: var(--text-primary); border-color: var(--warning-color); }

[data-theme="dark"] .footer { background: #0b0f19; color: #f8fafc; }
[data-theme="dark"] .footer-section p, [data-theme="dark"] .footer-section ul li a, [data-theme="dark"] .footer-bottom { color: #9ca3af !important; }

/* --- PREMIUM PREVENTION CARDS (PRO TIPS) --- */
.prevention-card {
    background: var(--surface);
    padding: 24px 28px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    border: 1px solid var(--gray-light);
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.prevention-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(139,92,246,0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prevention-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.prevention-card:hover::before {
    opacity: 1;
}

.prevention-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 700;
}

.prevention-card h3 svg {
    color: var(--primary-color);
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 2px 4px rgba(139,92,246,0.3));
}

.prevention-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .prevention-card {
    background: var(--surface);
    border-color: var(--gray-light);
}

/* --- NEW TOOLS UI --- */
#freqSlider {
    -webkit-appearance: none;
    height: 8px;
    background: var(--gray-light);
    border-radius: 4px;
    outline: none;
}
#freqSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}
#recordBtn.recording {
    background: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    animation: pulseRed 1.5s infinite;
}
@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* --- DROPDOWN MENU FOR TOOLS --- */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-menu {
    display: none;
    position: absolute;
    background-color: var(--surface);
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    z-index: 1000;
    list-style: none;
    padding: 10px 0;
    margin-top: 5px;
    border: 1px solid var(--gray-light);
}
.dropdown-menu li a {
    color: var(--text-primary);
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.dropdown-menu li a:hover {
    background-color: var(--primary-muted);
    color: var(--primary-color);
}
.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

/* Fix mobile menu display */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 20px;
    }
    .dropdown.active .dropdown-menu {
        display: block;
    }
}

/* --- OVERRIDES BASED ON USER FEEDBACK --- */
.footer-section h3 {
    color: var(--primary-color) !important;
    font-weight: 700;
}
.content-card {
    background: var(--surface);
    padding: 35px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-light);
    max-width: 850px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}
.content-card p {
    margin-bottom: 1.2rem;
}
.content-card p:last-child {
    margin-bottom: 0;
}
.faq-section .section-header {
    margin-bottom: 60px !important;
}
[data-theme="dark"] .content-card {
    background: #111827;
    border-color: #1f2937;
}

/* --- EMERGENCY STEPS COMPONENT --- */
.emergency-steps-card {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 14px;
    padding: 18px 20px;
    text-align: left;
    margin-bottom: 5px;
}
.emergency-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ef4444;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 14px;
}
.emergency-header svg {
    flex-shrink: 0;
}
.emergency-step-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.emergency-step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.step-badge {
    background: #ef4444;
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}
.step-text strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.92rem;
    margin-bottom: 2px;
}
.step-text p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.4;
    margin: 0;
}
[data-theme="dark"] .emergency-steps-card {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
}

/* --- PWA INSTALL BANNER & PROMPT --- */
.pwa-install-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(140%);
    z-index: 99999;
    width: calc(100% - 32px);
    max-width: 480px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

.pwa-install-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.pwa-install-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border-color, rgba(139, 92, 246, 0.3));
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.25), 0 0 20px rgba(139, 92, 246, 0.15);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

[data-theme="dark"] .pwa-install-card {
    background: rgba(17, 24, 39, 0.95);
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.7), 0 0 25px rgba(139, 92, 246, 0.25);
}

.pwa-app-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.pwa-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 3px;
}

.pwa-subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.pwa-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-pwa-install {
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-pwa-install:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.45);
}

.btn-pwa-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    line-height: 1;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.btn-pwa-close:hover {
    background: var(--gray-light);
    color: var(--text-primary);
}

.ios-share-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(139, 92, 246, 0.18);
    color: var(--primary-color);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
}

.nav-install-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-install-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
}

@media (max-width: 480px) {
    .pwa-install-banner {
        bottom: 16px;
        width: calc(100% - 24px);
    }
    .pwa-install-card {
        padding: 10px 12px;
        gap: 10px;
    }
    .pwa-app-icon {
        width: 40px;
        height: 40px;
    }
    .pwa-title {
        font-size: 0.88rem;
    }
    .pwa-subtitle {
        font-size: 0.74rem;
    }
    .btn-pwa-install {
        padding: 7px 11px;
        font-size: 0.78rem;
    }
}

