/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;500;700&display=swap');

/* Custom Font Definitions */
@font-face {
    font-family: 'Open Dyslexic';
    src: url('fonts/Open Dyslexic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Braille';
    src: url('fonts/Braille.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'American Sign Language';
    src: url('fonts/American Sign Lenguage.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Cursive';
    src: url('fonts/Cursive.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --btn-color: #333;
    --btn-color-hover: #000;
    --btn-color-text-hover: #fff;
    --text-color-emphasis: #333;
    --view-color-hover: #f5f5f5;
    --view-color-text-hover: #222;
    
    /* Light mode colors */
    --bg-primary: #f5f5f5;
    --bg-secondary: white;
    --bg-tertiary: #f8f9fa;
    --text-primary: #000;
    --text-secondary: #7f8c8d;
    --text-muted: #95a5a6;
    --border-color: #dedede;
    --border-light: #e0e0e0;
    --accent-color: #3498db;

    --text-style: Poppins, Arial, sans-serif;
}

body.dark-mode {
    /* --bg-primary: #1a1a1a; */
    /* --bg-secondary: #2d2d2d; */
    /* --bg-tertiary: #363636; */
    --bg-primary: #000;
    --bg-secondary: #000;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --border-color: #555555;
    --border-light: #444444;
    --accent-color: #5dade2;
    --btn-color: #555;
    --btn-color-hover: #777;
}

/* Dark mode specific slider styling */
body.dark-mode .control-group input[type="range"]::-webkit-slider-thumb {
    background: #888;
}

body.dark-mode .control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #aaa;
}

body.dark-mode .control-group input[type="range"]::-moz-range-thumb {
    background: #888;
}

body.dark-mode .control-group input[type="range"]::-moz-range-thumb:hover {
    background: #aaa;
}

/* Ensure dark mode text content overrides any inline styles */
body.dark-mode .container .text-content,
body.dark-mode .container .font-content,
body.dark-mode .container .chart-content,
body.dark-mode .test-display * {
    color: var(--text-primary) !important;
}

body.dark-mode .test-display {
    color: var(--text-primary) !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure all text content inherits dark mode colors */
.container * {
    color: inherit;
}

.container .text-content,
.container .font-content,
.container .chart-content {
    color: var(--text-primary) !important;
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg-primary);
    padding: 10px;
    line-height: 1.6;
    margin: 0;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 15px;
    min-height: 100vh;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.header-text {
    flex: 1;
}

h1 {
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 1.5em;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.9em;
}

.view-controls {
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 100;
    justify-content: flex-end;
}

.view-toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9em;
    padding: 5px 10px;
    transition: color 0.3s ease;
    width: 9em;
    min-width: 9em;
    max-width: 9em;
}

.view-toggle-btn:hover {
    color: var(--text-primary);
}

.header-container.hidden,
.tabs.hidden {
    display: none;
}

@media (min-width: 768px) {
    body {
        padding: 20px;
    }
    .container {
        padding: 25px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    h1 {
        font-size: 2em;
    }
    .subtitle {
        font-size: 1em;
    }
    .view-controls {
        top: 25px;
        right: 25px;
    }
}

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
    overflow-x: auto;
}

.tabs::-webkit-scrollbar {
    height: 0;
}

.tab {
    padding: 10px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85em;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 8px 8px 0 0;
    transition: color 0.3s ease;
}

@media (min-width: 768px) {
    .tabs {
        gap: 10px;
    }
    .tab {
        padding: 12px 20px;
        font-size: 0.95em;
    }
}

.tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    font-weight: bold;
    border-radius: 8px 8px 0 0;
}

.tab:hover {
    color: var(--bg-secondary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Test Display Area */
.test-display {
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 300px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 20px;
    padding: 20px;
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.test-display::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.test-display::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.test-display::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .test-display {
        min-height: 400px;
        padding: 24px;
    }
}

.test-display.centered {
    text-align: center;
}

.test-display.left-aligned {
    text-align: left;
}

/* Timer Display in controls */
.timer-display {
    background: #3498db;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
}

/* Info Box */
.info-box {
    /* background: #e8f4f8; */
    /* border-left: 4px solid #3498db; */
    padding: 12px 15px 12px 0;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Reading instruction */
.reading-instruction {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2em;
    padding: 40px 20px;
    font-style: italic;
}

/* Result display */
.result-display {
    background: #d5f4e6;
    border: 2px solid #27ae60;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.result-display h3 {
    color: #27ae60;
    margin-bottom: 10px;
}

.result-display p {
    margin: 5px 0;
}

.result-value {
    color: #2c3e50;
    font-weight: bold;
}

/* Full Width Text Rows */
.text-row {
    width: fit-content;
    padding: 20px;
    margin: 10px 0;
    border: none;
    outline: 3px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: outline-color 0.2s;
    line-height: 1.4;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.text-row:hover {
    outline-color: var(--accent-color);
}

.text-row.selected {
    outline-color: var(--accent-color);
    outline-width: 4px;
}

.text-row.hidden-text {
    display: none !important;
}

.font-row.hidden-text {
    display: none !important;
}

.chart-line.hidden-line {
    display: none !important;
}

.text-row .size-label {
    font-size: 12pt;
    color: var(--text-secondary);
    font-weight: bold;
    margin-right: 20px;
    min-width: 50px;
    flex-shrink: 0;
}

.text-row .font-label {
    font-size: 12pt;
    color: var(--text-secondary);
    font-weight: bold;
    margin-right: 20px;
    min-width: 150px;
    flex-shrink: 0;
    text-align: left;
}

.text-row .text-content {
    flex: 1;
    min-width: 0;
}

/* Font row styling */
.font-row {
    padding: 20px;
    margin: 15px 0;
    outline: 3px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.font-row:hover {
    outline-color: var(--accent-color);
}

.font-row.selected {
    outline-color: var(--accent-color);
    outline-width: 4px;
}

.font-row.hidden-text {
    display: none;
}

.font-row .font-label {
    font-size: 12pt;
    color: var(--text-secondary);
    font-weight: bold;
    margin-right: 20px;
    min-width: 150px;
    flex-shrink: 0;
    text-align: left;
}

.font-row .font-content {
    flex: 1;
    min-width: 0;
}

/* Chart Line */
.chart-line {
    padding: 20px;
    margin: 15px 0;
    cursor: pointer;
    transition: all 0.2s;
    outline: 3px solid transparent;
    border-radius: 6px;
    position: relative;
    white-space: nowrap;
}

.chart-line:hover {
    outline-color: var(--accent-color);
}

.chart-line.outlined {
    outline-color: var(--accent-color);
    outline-width: 4px;
}

.chart-line.hidden-line {
    display: none;
}

.chart-line .chart-content {
    display: inline-block;
    letter-spacing: 0.3em;
}

.chart-line .size-label {
    margin-left: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: normal;
}

/* Direction E styling */
.direction-e {
    display: inline-block;
    font-family: Roboto, sans-serif, monospace;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1;
}

/* Grid Test - 6x6 Grid Layout System */
.grid-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding: 20px;
    overflow: auto;
    box-sizing: border-box;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 equal columns */
    grid-template-rows: repeat(6, 1fr); /* 6 equal rows */
    gap: 0.2em; /* Scale gap with font size */
    width: auto; /* 6 cells * 3em each - scales with font size */
    height: auto;
    max-width: 90vw; /* Viewport constraints */
    max-height: 90vh;
    font-size: 48pt; /* Default font size, will be overridden by JS */
}

/* Target positions in 6x6 grid */
.grid-target-box.position-top {
    grid-column: 4; /* Center column (column 4 of 6) */
    grid-row: 1;    /* Top row */
}

.grid-target-box.position-bottom {
    grid-column: 4; /* Center column (column 4 of 6) */
    grid-row: 6;    /* Bottom row */
}

.grid-target-box.position-left {
    grid-column: 1; /* Left column */
    grid-row: 4;    /* Center row (row 4 of 6) */
}

.grid-target-box.position-right {
    grid-column: 6; /* Right column */
    grid-row: 4;    /* Center row (row 4 of 6) */
}

/* Hide targets that aren't in use */
.grid-target-box:not(.position-top):not(.position-bottom):not(.position-left):not(.position-right) {
    display: none;
}

/* Game grid cells and target cells - same styling */
.grid-cell,
.grid-target-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 0.04em solid var(--text-muted); /* Scale border with font size */
    border-radius: 0.2em; /* Scale border radius with font size */
    cursor: pointer;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
    font-weight: bold;
    width: 2.5em; /* Em-based sizing that scales with font */
    height: 2.5em;
    min-width: 1em; /* Minimum for small fonts */
    min-height: 1em;
    max-width: 1em; /* Maximum for large fonts */
    max-height: 1em;
    box-sizing: border-box;
    color: var(--text-primary);
}

/* Target box specific styling */
.grid-target-box {
    border-color: var(--accent-color);
    cursor: default; /* Target is not clickable */
}

.grid-cell:hover {
    outline: 3px solid var(--accent-color);
}

.grid-cell.correct {
    background: #2ecc71;
    color: white;
    border-color: #27ae60;
}

.grid-cell.incorrect {
    background: #e74c3c;
    color: white;
    border-color: #c0392b;
}

/* Controls */
.controls {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    transition: background-color 0.3s ease;
}

.controls.hidden {
    display: none;
}

.control-group {
    margin-bottom: 15px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9em;
}

.control-group select,
.control-group input[type="range"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9em;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.control-group input[type="range"] {
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--border-color);
    outline: none;
}

/* Range slider thumb styling */
.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #666;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #888;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #666;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}

.control-group input[type="range"]::-moz-range-thumb:hover {
    background: #888;
}

/* Select dropdown styling */
.control-group select:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.slider-value {
    display: inline-block;
    margin-left: 10px;
    font-weight: bold;
    color: var(--text-color-emphasis);
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--btn-color-text-hover);
}

button {
    padding: 10px 18px;
    background: var(--btn-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s ease;
    flex: 1;
    min-width: 120px;
}

button:hover {
    background: var(--btn-color-hover);
}

button:active {
    transform: scale(0.98);
}

button.secondary {
    background: var(--text-muted);
}

button.secondary:hover {
    background: var(--text-secondary);
}

.hidden {
    display: none;
}

/* Quick test comparison */
.comparison-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
}

.comparison-option {
    width: 100%;
    padding: 30px;
    border: 4px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.comparison-option:hover {
    border-color: #3498db;
}

.comparison-label {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: bold;
}

@media (max-width: 767px) {
    .button-group {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        min-width: 0;
    }

    .grid-wrapper {
        min-height: 400px;
        padding: 15px;
    }

    .grid-layout {
        gap: 0.15em; /* Smaller gap on mobile */
        width: 15em; /* Smaller grid on mobile */
        height: 15em;
        max-width: min(320px, 90vw);
        max-height: min(320px, 70vh);
    }
    
    .grid-cell,
    .grid-target-box {
        width: 2em; /* Smaller cells on mobile */
        height: 2em;
        min-width: 35px; /* Smaller minimum on mobile */
        min-height: 35px;
        max-width: 60px; /* Smaller maximum on mobile */
        max-height: 60px;
    }
}

.view-toggle-btn:hover {
    background: var(--view-color-hover);
}

/* ============ FOOTER STYLES ============ */
#footer {
    font-size: 10pt;
    opacity: 0.5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 10px 0;
    color: var(--text-muted);
    transition: opacity 0.3s ease;
}

#footer img {
    height: 2em;
}

#footer.hidden {
    display: none;
}

/* ============ PRINT STYLES ============ */
@media print {
    /* Hide everything by default */
    * {
        visibility: hidden;
    }
    
    /* Only show the body and html */
    html, body {
        visibility: visible;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
        height: auto !important;
    }
    
    /* Always show footer and its children on print */
    #footer,
    #footer * {
        visibility: visible !important;
    }
    
    /* Show only the active display element when printing */
    .print-active {
        visibility: visible !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        margin: 0 !important;
        padding: 15pt !important;
        background: white !important;
        color: black !important;
        border: none !important;
        box-shadow: none !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Ensure all children of print-active are visible */
    .print-active * {
        visibility: visible !important;
        color: black !important;
        background: white !important;
        border-color: black !important;
    }
    
    /* Print-specific text styling */
    .print-active .text-content,
    .print-active .font-content,
    .print-active .chart-content {
        color: black !important;
        background: white !important;
        page-break-inside: avoid;
    }
    
    /* Print-specific row styling */
    .print-active .text-row,
    .print-active .font-row,
    .print-active .chart-line {
        outline: none !important;
        border: none !important;
        margin: 8pt 0 !important;
        padding: 4pt 0 !important;
        page-break-inside: avoid;
        border-radius: 0 !important;
    }
    
    /* Grid print styling */
    .print-active .grid-layout {
        page-break-inside: avoid;
    }
    
    .print-active .grid-cell,
    .print-active .grid-target-box {
        border: 1pt solid black !important;
        background: white !important;
        color: black !important;
    }
    
    /* Labels for print */
    .print-active .size-label,
    .print-active .font-label {
        color: black !important;
        font-weight: bold !important;
    }
    
    /* Reading content for print */
    .print-active .reading-instruction {
        display: none !important;
    }
    
    /* Hide interactive elements in print */
    .print-active .grid-cell {
        cursor: default !important;
    }
    
    /* Ensure proper font sizes are maintained in print */
    .print-active [style*="font-size"] {
        font-size: inherit;
    }
    
    /* Show footer on printed pages */
    #footer {
        visibility: visible !important;
        display: flex !important;
        position: fixed !important;
        bottom: 10pt !important;
        left: 15pt !important;
        right: 15pt !important;
        justify-content: space-between !important;
        align-items: center !important;
        font-size: 9pt !important;
        color: #666 !important;
        opacity: 0.7 !important;
        border-top: 1pt solid #eee !important;
        padding-top: 5pt !important;
        background: white !important;
        z-index: 1000 !important;
    }
    
    #footer img {
        height: 12pt !important;
        opacity: 0.7 !important;
    }
}

/* Reading Level Controls */
#size-reading-level-group,
#font-reading-level-group {
    display: none;
}

#size-content, #font-content {
    width: fit-content;
}

/* Font Weight Override for Poppins Extra Bold */
.poppins-extra-bold {
    font-family: Poppins, Arial, sans-serif !important;
    font-weight: 800 !important;
}

/* Privacy Modal and Banner Styles */
.privacy-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.privacy-modal-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
    margin: 5% auto;
    border-radius: 4px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    border: 1px solid var(--border-color);
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.privacy-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px 24px;
    border-bottom: 1px solid var(--border-light);
}

.privacy-modal-header h2 {
    margin: 0;
    color: var(--text-color-emphasis);
    font-size: 24px;
    font-weight: 600;
    font-family: var(--text-style);
}

.privacy-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.privacy-close:hover {
    background: var(--view-color-hover);
    color: var(--view-color-text-hover);
}

.privacy-modal-body {
    padding: 20px 24px;
    line-height: 1.6;
    color: var(--text-primary);
}

.privacy-modal-body h3 {
    color: var(--text-color-emphasis);
    margin: 24px 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    font-family: var(--text-style);
}

.privacy-modal-body ul {
    margin: 12px 0;
    padding-left: 20px;
}

.privacy-modal-body li {
    margin: 8px 0;
}

.privacy-modal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.privacy-modal-footer {
    padding: 16px 24px 20px 24px;
    border-top: 1px solid var(--border-light);
    text-align: right;
    background-color: var(--bg-secondary);
}

.privacy-accept-btn {
    background-color: var(--btn-color);
    color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--text-style);
    transition: all 0.3s ease;
    min-width: 120px;
}

.privacy-accept-btn:hover {
    background-color: var(--btn-color-hover);
    color: var(--btn-color-text-hover);
}

.privacy-decline-btn {
    background-color: transparent;
    color: #666;
    border: 1px solid #ccc;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 12px;
    transition: all 0.2s ease;
}

.privacy-decline-btn:hover {
    background-color: #f5f5f5;
    border-color: #999;
}

.privacy-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #007cba, #0056b3);
    color: white;
    padding: 16px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: bannerSlideUp 0.4s ease-out;
}

@keyframes bannerSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.privacy-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.privacy-banner-content span {
    font-size: 14px;
    line-height: 1.4;
}

.privacy-banner-content a {
    color: #fff;
    text-decoration: underline;
    font-weight: 500;
}

.privacy-banner-content a:hover {
    text-decoration: none;
}

.privacy-banner-buttons {
    display: flex;
    gap: 10px;
}

.privacy-banner .privacy-accept-btn {
    padding: 8px 16px;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.privacy-banner .privacy-accept-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.privacy-banner .privacy-decline-btn {
    padding: 8px 16px;
    font-size: 14px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    margin-right: 0;
}

.privacy-banner .privacy-decline-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#footer .privacy-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

#footer .privacy-link:hover {
    color: #005a87;
    text-decoration: underline;
}

.privacy-overview {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #007cba;
}

/* Promotional Modal Styles */
.promo-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    font-family: var(--text-style);
}

.promo-modal-content {
    background: var(--bg-secondary);
    margin: 3% auto;
    border-radius: 4px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: promoSlideIn 0.4s ease-out;
    border: 1px solid var(--border-color);
}

@keyframes promoSlideIn {
    from { opacity: 0; transform: scale(0.9) translateY(-30px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.promo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 12px 16px 12px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-color-emphasis);
    border-radius: 4px 4px 0 0;
}

.promo-modal-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    text-shadow: none;
    font-family: var(--text-style);
    color: var(--text-color-emphasis);
}

.promo-modal-header img {
    height: 36px;
    max-width: 50%;
}

img.promo-screenshot {
    max-width: 100%;
    box-shadow: 0 4px 8px rgb(0, 0, 0, 0.1);
    /* outline: 1px solid var(--border-light); */
    margin: 12px 0 24px;
}

.promo-product h4 {
    font-size: 22px;
    font-weight: 800;
}

.promo-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: bold;
    min-width: 48px;
    flex: 0 1;
}

.promo-close:hover {
    background: var(--bg-primary);
}

.promo-modal-body {
    padding: 24px 28px;
    line-height: 1.6;
    color: var(--text-primary);
}

.promo-intro {
    text-align: center;
    margin-bottom: 28px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 4px;
    border-bottom: 1px solid var(--border-color);
}

.promo-intro p {
    font-size: 18px;
    color: var(--text-color-emphasis);
    margin: 0 0 12px 0;
    font-weight: 600;
    font-family: var(--text-style);
    text-align: left;
}

.promo-intro h3 {
    text-align: left;
}

.promo-section {
    margin-bottom: 28px;
    text-align: left;
}

.promo-section h3 {
    color: var(--text-color-emphasis);
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 600;
    text-align: left;
    font-family: var(--text-style);
}

.promo-products {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.promo-product {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease;
}

.promo-product:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.promo-product h4 {
    color: var(--text-color-emphasis);
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 800;
    font-family: var(--text-style);
}

.promo-product p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--text-primary);
    min-height: 3lh;
}

.promo-btn {
    display: inline-block;
    text-decoration: none;
    font-family: var(--text-style);
    min-width: 120px;
    background: var(--btn-color-text-hover);
    color: var(--btn-color);
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-size: 16px;
    width: 100%;
    text-align: center;
    text-decoration: underline 2px solid;
}

.promo-btn:hover {
    background: var(--bg-primary);
    color: var(--btn-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.social-btn {
    display: inline-block;
    min-width: 48px;
    max-width: 48px;
    cursor: pointer;
}

.social-btn:hover {
    text-decoration: none;
}

.social-btn.youtube {
    background: var(--btn-color);
    /* color: var(--text-primary); */
    border: 1px solid var(--border-color);
}

.social-btn.youtube:hover {
    background: var(--btn-color-hover);
    color: var(--btn-color-text-hover);
}

.social-icon {
    font-size: 16px;
}

.promo-footer-text {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    display: none;
}

.promo-footer-text p {
    font-size: 16px;
    color: var(--text-color-emphasis);
    margin: 0;
    font-family: var(--text-style);
}

.promo-modal-footer {
    padding: 16px 28px 24px 28px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    background-color: var(--bg-secondary);
}

.promo-continue-btn {
    background: var(--btn-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--text-style);
    transition: all 0.3s ease;
    min-width: 120px;
    color: var(--bg-primary);
}

.promo-continue-btn:hover {
    background: var(--btn-color-hover);
    color: var(--btn-color-text-hover);
}

.promo-dismiss-btn {
    background: transparent;
    color: var(--text-primary);
    font-family: var(--text-style);
    border: 1px solid #ccc;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
font-size: 16px;
    font-weight: 500;
    font-family: var(--text-style);
    transition: all 0.2s ease;
}

.promo-dismiss-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .promo-modal-content {
        margin: 5px;
        width: calc(100% - 10px);
        max-height: 95vh;
    }
    
    .promo-modal-header,
    .promo-modal-body,
    .promo-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .promo-modal-header h2 {
        font-size: 20px;
    }
    
    .promo-products {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .social-links {
        align-items: center;
    }
    
    .social-btn {
        width: 200px;
        justify-content: center;
    }
    
    .promo-modal-footer {
        flex-direction: column;
        align-items: center;
    }
}

/* Share URL Styles */
.share-url-container {
    display: flex;
    gap: 8px;
    margin: 6px 0 12px 0;
    align-items: stretch;
}

.share-url-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: #f9f9f9;
    color: #555;
    font-family: monospace;
    transition: border-color 0.2s ease;
}

.share-url-input:focus {
    outline: none;
    border-color: #007cba;
    background: white;
}

.copy-url-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-size: 16px;
    border: 1px solid var(--text-primary);
}

.copy-url-btn:hover {
    background: var(--bg-primary);
}

.copy-url-btn:active {
    transform: translateY(0);
}

.copy-success-message {
    display: none;
    text-align: center;
    color: var(--bg-secondary);
    font-weight: 500;
    margin-top: 8px;
    padding: 8px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 4px;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Mobile responsive for share container */
@media (max-width: 480px) {
    .share-url-container {
        flex-direction: column;
    }
    
    .copy-url-btn {
        width: 100%;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .privacy-modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        max-height: 90vh;
    }
    
    .privacy-modal-header,
    .privacy-modal-body,
    .privacy-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .privacy-banner-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .privacy-banner-buttons {
        justify-content: center;
    }
}

