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

body {
    font-family: 'American Typewriter', 'Courier New', monospace;
    background: #1a202c;
    min-height: 100vh;
    color: #1a202c;
    overflow-x: hidden;
}

/* Full Page Container */
.container {
    max-width: 100%;
    min-height: 100vh;
    margin: 0;
    background: #fffff4;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

/* Header - Full Width */
header {
    text-align: center;
    padding: 30px 40px;
    background: #fffff4;
    border-bottom: 3px solid #2d3748;
}

.main-logo {
    max-width: 350px;
    width: 100%;
    height: auto;
    margin-bottom: 12px;
}

.tagline {
    font-size: 16px;
    color: #2d3748;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.tagline .highlight {
    background: #c53030;
    color: #fffff4;
    padding: 2px 8px;
    border-radius: 2px;
}

/* Main Content Area - Two Columns */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
    min-height: calc(100vh - 200px);
}

/* LEFT COLUMN - Book Excerpt */
.left-column {
    background: #ffffff;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    border-right: 3px solid #2d3748;
    position: relative;
}

.mascot-container {
    text-align: center;
    margin-top: 30px;
}

.mascot {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.excerpt-container {
    background: #fffff4;
    border-radius: 4px;
    padding: 40px;
    flex: 1;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    margin-top: 12px;
}

.excerpt-label {
    font-size: 24px;
    font-weight: medium;
    color: #c53030;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.excerpt-label .highlight {
    font-size: 24px;
    background: #1a202c;
    color: #fffff4;
    padding: 2px 8px;
    border-radius: 4px;
}

.excerpt {
    font-size: 18px;
    font-weight: medium;
    line-height: 2;
    color: #1a202c;
    font-family: 'American Typewriter', 'Courier New', serif;
    white-space: pre-line;  /* Preserves line breaks from excerpts */
    flex: 1;
}

.redacted {
    background: #1a202c;
    color: transparent;
    border-radius: 2px;
    padding: 2px 5px;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* RIGHT COLUMN - Game Controls */
.right-column {
    background: #fffff4;
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
}

/* Game Info */
.game-info {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.attempts {
    background: #1a202c;
    color: #fffff4;
    padding: 15px 30px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 20px;
}

.attempts .label {
    opacity: 0.9;
}

.attempts .value {
    font-weight: bold;
    margin-left: 8px;
}

/* Guess Input Section */
.guess-container {
    position: relative;
    margin-bottom: 35px;
}

.guess-label {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 12px;
}

#guess-input {
    width: 100%;
    padding: 18px;
    font-size: 17px;
    font-family: 'American Typewriter', 'Courier New', monospace;
    border: 3px solid #2d3748;
    border-radius: 4px;
    outline: none;
    transition: all 0.3s;
    background: #fffff4;
}

#guess-input:focus {
    border-color: #c53030;
    box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.1);
}

.autocomplete-list {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    background: #fffff4;
    border: 3px solid #2d3748;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    margin-top: -3px;
}

.autocomplete-list.show {
    display: block;
}

.autocomplete-item {
    padding: 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #e2e8f0;
    font-family: 'American Typewriter', 'Courier New', monospace;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: #edf2f7;
}

.autocomplete-item.selected {
    border-left: 4px solid #c53030;
}

.btn-submit {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: bold;
    color: #fffff4;
    background: #c53030;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
    font-family: 'American Typewriter', 'Courier New', monospace;
    box-shadow: 0 4px 6px rgba(197, 48, 48, 0.3);
}

.btn-submit:hover {
    background: #9b2c2c;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(197, 48, 48, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Hint Button - Secondary Style */
.btn-hint {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    background: transparent;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
    font-family: 'American Typewriter', 'Courier New', monospace;
}

.btn-hint:hover {
    border-color: #a0aec0;
    background: #f7fafc;
    color: #2d3748;
}

.btn-hint:active {
    transform: scale(0.98);
}

/* Hint Display Area */
.hint-display {
    margin-top: 20px;
    padding: 20px;
    background: #fffaf0;
    border: 2px solid #fbd38d;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.hint-display.hidden {
    display: none;
}

.hint-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.hint-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.hint-text {
    color: #744210;
    line-height: 1.6;
    font-size: 15px;
}

.btn-submit:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
}

/* Guesses Container */
.guesses-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guess-result {
    border-radius: 4px;
    padding: 20px;
    background: #fffff4;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

/* Collapsed state */
.guess-result.collapsed .guess-details {
    display: none;
}

.guess-result.collapsed {
    padding: 15px 20px;
}

.guess-header {
    cursor: pointer;
    user-select: none;
}

.guess-header:hover {
    opacity: 0.8;
}

.guess-title {
    font-weight: bold;
    margin-bottom: 15px;
    color: #1a202c;
    font-size: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.attribute {
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.attribute:hover {
    transform: scale(1.05);
}

.attribute-label {
    font-size: 10px;
    opacity: 0.8;
    margin-bottom: 6px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.attribute-value {
    font-weight: bold;
    font-size: 14px;
}

.correct {
    background: #48bb78;
    color: #fffff4;
    border-color: #38a169;
}

.incorrect {
    background: #c53030;
    color: #fffff4;
    border-color: #9b2c2c;
}

.close {
    background: #ecc94b;
    color: #1a202c;
    border-color: #d69e2e;
}

/* Game Over Screen - Overlay */
.game-over {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 32, 44, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.game-over.hidden {
    display: none;
}

.game-over-content {
    background: #fffff4;
    border-radius: 4px;
    padding: 40px 50px;
    max-width: 560px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    text-align: center;
    border: 3px solid #2d3748;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    position: relative;
    animation: slideUp 0.4s ease;
    -webkit-overflow-scrolling: touch;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close Button */
.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e2e8f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s;
    color: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.close-modal:hover {
    background: #cbd5e0;
    transform: rotate(90deg);
}

.close-modal:active {
    transform: rotate(90deg) scale(0.9);
}

.game-over h2 {
    margin-bottom: 20px;
    color: #1a202c;
    font-size: 36px;
}

.game-over p {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2d3748;
}

.correct-answer {
    background: #edf2f7;
    padding: 25px;
    border-radius: 4px;
    margin: 25px 0;
    border: 2px solid #cbd5e0;
}

.btn-share {
    width: 100%;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    color: #fffff4;
    background: #2d3748;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.3s;
    font-family: 'American Typewriter', 'Courier New', monospace;
    box-shadow: 0 4px 6px rgba(45, 55, 72, 0.3);
}

.btn-share:hover {
    background: #1a202c;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(45, 55, 72, 0.4);
}

.btn-play-again {
    width: 100%;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    color: #fffff4;
    background: #c53030;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'American Typewriter', 'Courier New', monospace;
    box-shadow: 0 4px 6px rgba(197, 48, 48, 0.3);
}

.btn-play-again:hover {
    background: #9b2c2c;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(197, 48, 48, 0.4);
}

/* Countdown Timer */
.countdown {
    margin-top: 25px;
    padding: 20px;
    background: #edf2f7;
    border-radius: 4px;
    text-align: center;
    border: 2px solid #cbd5e0;
}

.countdown-label {
    font-size: 14px;
    color: #718096;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.countdown-time {
    font-size: 32px;
    font-weight: bold;
    color: #2d3748;
    font-family: 'American Typewriter', 'Courier New', monospace;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background: #1a202c;
    border-top: 3px solid #2d3748;
}

.footer-text {
    color: #fffff4;
    font-size: 14px;
}

.footer-links {
    color: #fffff4;
}

.footer-links a{
    color: #c53030;
}

.footer-copyright {
    color: #fffff4;
}

/* RESPONSIVE DESIGN */

/* Tablet */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .left-column {
        border-right: none;
        border-bottom: 3px solid #2d3748;
        min-height: 60vh;
    }
    
    .right-column {
        max-height: none;
    }
    
    .mascot {
        width: 120px;
        height: 120px;
    }
    
    .left-column,
    .right-column {
        padding: 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    header {
        padding: 20px;
    }
    
    .main-logo {
        max-width: 250px;
    }
    
    .tagline {
        font-size: 14px;
    }
    
    .left-column,
    .right-column {
        padding: 25px;
    }
    
    .mascot {
        width: 100px;
        height: 100px;
    }
    
    .excerpt-container {
        padding: 25px;
    }
    
    .excerpt {
        font-size: 16px;
        line-height: 1.8;
    }
    
    .attributes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .game-over-content {
        padding: 30px;
    }
    
    .game-over h2 {
        font-size: 28px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .main-logo {
        max-width: 200px;
    }
    
    .left-column,
    .right-column {
        padding: 20px;
    }
    
    .mascot {
        width: 80px;
        height: 80px;
    }
    
    .attributes-grid {
        grid-template-columns: 1fr;
    }
    
    .excerpt {
        font-size: 15px;
    }
    
    .game-over-content {
        padding: 25px;
    }
}

/* Scrollbar Styling */
.right-column::-webkit-scrollbar,
.autocomplete-list::-webkit-scrollbar,
.guesses-container::-webkit-scrollbar {
    width: 8px;
}

.right-column::-webkit-scrollbar-track,
.autocomplete-list::-webkit-scrollbar-track,
.guesses-container::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 4px;
}

.right-column::-webkit-scrollbar-thumb,
.autocomplete-list::-webkit-scrollbar-thumb,
.guesses-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.right-column::-webkit-scrollbar-thumb:hover,
.autocomplete-list::-webkit-scrollbar-thumb:hover,
.guesses-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* ========================================
   INSTRUCTION MODAL
   ======================================== */

.instruction-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 32, 44, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    animation: fadeIn 0.4s ease;
    overflow-y: auto; /* Enable scrolling */
}

.instruction-modal.hidden {
    display: none;
}

.instruction-content {
    background: white;
    border-radius: 4px;
    padding: 50px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh; /* Limit height to 90% of viewport */
    overflow-y: auto; /* Make content scrollable */
    text-align: center;
    border: 3px solid #2d3748;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: slideUp 0.5s ease;
    margin: auto; /* Center vertically when scrolling */
}

.instruction-logo {
    max-width: 300px;
    width: 100%;
    margin-bottom: 20px;
}

.instruction-content h2 {
    font-size: 32px;
    color: #1a202c;
    margin-bottom: 10px;
}

.instruction-content .highlight2 {
    font-size: 24px;
    background: #1a202c;
    color: #fffff4;
    padding: 2px 8px;
    border-radius: 4px;
}

.instruction-subtitle {
    font-size: 18px;
    color: #718096;
    margin-bottom: 30px;
    margin-top: 20px; 
}

.instruction-rules {
    text-align: left;
    margin: 30px 0;
}

.rule {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 4px;
    border-left: 4px solid #c53030;
}

.rule-emoji {
    font-size: 28px;
    flex-shrink: 0;
    background: #1a202c;
    color: #fffff4;
    padding: 2px 8px;
    font-weight: bold;
}

.rule-text {
    flex: 1;
}

.rule-text strong {
    display: block;
    font-size: 16px;
    color: #1a202c;
    margin-bottom: 5px;
}

.rule-text p {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.5;
}

.color-box {
    font-size: 16px;
    margin: 0 5px;
}

.instruction-note {
    font-size: 14px;
    color: #718096;
    font-style: italic;
    margin: 25px 0;
    padding: 15px;
    background: #edf2f7;
    border-radius: 2px;
}

.btn-start-game {
    width: 100%;
    padding: 20px;
    font-size: 22px;
    font-weight: bold;
    color: white;
    background: #c53030;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'American Typewriter', 'Courier New', monospace;
    box-shadow: 0 6px 12px rgba(197, 48, 48, 0.4);
    margin-top: 10px;
    position: relative;
    pointer-events: auto;
}

.btn-start-game:hover {
    background: #9b2c2c;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(197, 48, 48, 0.5);
}

.btn-start-game:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .instruction-modal {
        padding: 10px;
        align-items: flex-start; /* Align to top on mobile */
    }
    
    .instruction-content {
        padding: 30px 25px;
        max-height: 95vh; /* More height on mobile */
        margin-top: 10px; /* Small top margin */
    }
    
    .instruction-logo {
        max-width: 220px;
    }
    
    .instruction-content h2 {
        font-size: 24px;
    }
    
    .instruction-subtitle {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .instruction-rules {
        margin: 20px 0;
    }
    
    .rule {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .rule-emoji {
        font-size: 24px;
    }
    
    .rule-text strong {
        font-size: 14px;
    }
    
    .rule-text p {
        font-size: 13px;
    }
    
    .instruction-note {
        margin: 15px 0;
        padding: 12px;
        font-size: 13px;
    }
    
    .btn-start-game {
        font-size: 18px;
        padding: 16px;
    }
}

/* Small mobile - very compact */
@media (max-width: 480px) {
    .instruction-content {
        padding: 20px 15px;
        max-height: 98vh;
    }
    
    .instruction-logo {
        max-width: 180px;
    }
    
    .instruction-content h2 {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .instruction-subtitle {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .instruction-rules {
        margin: 15px 0;
    }
    
    .rule {
        padding: 10px;
        margin-bottom: 12px;
        gap: 10px;
    }
    
    .rule-emoji {
        font-size: 20px;
    }
    
    .rule-text strong {
        font-size: 13px;
        margin-bottom: 3px;
    }
    
    .rule-text p {
        font-size: 12px;
    }
    
    .instruction-note {
        margin: 12px 0;
        padding: 10px;
        font-size: 12px;
    }
    
    .btn-start-game {
        font-size: 16px;
        padding: 14px;
    }
}

/* Custom scrollbar for instruction modal */
.instruction-content::-webkit-scrollbar {
    width: 8px;
}

.instruction-content::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 4px;
}

.instruction-content::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.instruction-content::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Header Icons */
.header-icons {
    position: absolute;
    top: 30px;
    right: 40px;
    display: flex;
    gap: 15px;
}

.icon-btn {
    background: transparent;
    border: 2px solid #1a202c;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: #1a202c;
    transform: scale(1.1);
}

.icon-btn svg {
    fill: #1a202c;
    transition: fill 0.3s;
}

.icon-btn:hover svg {
    fill: #ffffff;
}

/* Stats Modal */
.stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    pointer-events: auto;
}

.stats-modal.hidden {
    display: none;
}

.stats-content {
    background: #fffff4;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 3px solid #2d3748;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stats-content h2 {
    color: #1a202c;
    margin-bottom: 25px;
    font-size: 28px;
    text-align: center;
}

.stats-content h3 {
    color: #2d3748;
    margin: 30px 0 15px 0;
    font-size: 18px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-box {
    text-align: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #c53030;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Streak Section */
.streak-section {
    background: #edf2f7;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.streak-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 16px;
}

.streak-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.streak-label {
    color: #2d3748;
    font-weight: 600;
}

.streak-value {
    color: #c53030;
    font-weight: bold;
    font-size: 18px;
}

/* Distribution Chart */
.distribution-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dist-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dist-label {
    width: 20px;
    text-align: center;
    font-weight: bold;
    color: #2d3748;
}

.dist-bar-container {
    flex: 1;
    height: 30px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.dist-bar {
    height: 100%;
    background: #48bb78;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    transition: width 0.3s ease;
    min-width: 30px;
}

.dist-bar-fail {
    background: #f56565;
}

.dist-count {
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-icons {
        top: 20px;
        right: 20px;
    }
    
    .icon-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .stats-content {
        padding: 30px 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-value {
        font-size: 24px;
    }
}
/* end @media 768px stats */

/* ================================================
   TUTORIAL MODAL
   ================================================ */

.tutorial-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 32, 44, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1300;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    animation: fadeIn 0.4s ease;
    overflow-y: auto;
}

.tutorial-modal.hidden {
    display: none;
}

.tutorial-content {
    background: #fffff4;
    border-radius: 4px;
    padding: 40px 50px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    border: 3px solid #2d3748;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: slideUp 0.5s ease;
    margin: auto;
    position: relative;
}

/* Progress dots */
.tutorial-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.tutorial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e0;
    transition: all 0.3s;
}

.tutorial-dot.active {
    background: #c53030;
    transform: scale(1.3);
}

.tutorial-dot.completed {
    background: #2d3748;
}

/* Slide */
.tutorial-slide {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tutorial-slide.active {
    display: block;
}

.tutorial-slide h2 {
    font-size: 28px;
    color: #1a202c;
    margin-bottom: 10px;
}

.tutorial-slide .tutorial-subtitle {
    font-size: 16px;
    color: #718096;
    margin-bottom: 25px;
}

/* Redaction demo */
.redaction-demo {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    padding: 20px 25px;
    text-align: left;
    margin: 20px 0;
    font-size: 15px;
    line-height: 1.9;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.redacted-word {
    display: inline-block;
    background: #1a202c;
    color: transparent;
    border-radius: 2px;
    padding: 0 4px;
    user-select: none;
    min-width: 40px;
}

.revealed-word {
    color: #c53030;
    font-weight: bold;
}

/* Attribute boxes demo */
.attributes-demo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.attr-demo-box {
    padding: 12px 8px;
    border-radius: 4px;
    text-align: center;
}

.attr-demo-box .attr-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    opacity: 0.8;
}

.attr-demo-box .attr-value {
    font-size: 13px;
    font-weight: bold;
}

.attr-demo-box.correct {
    background: #48bb78;
    color: white;
}

.attr-demo-box.incorrect {
    background: #f56565;
    color: white;
}

.attr-demo-box.close {
    background: #ecc94b;
    color: #2d3748;
}

.attr-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    font-size: 13px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-dot.green { background: #48bb78; }
.legend-dot.red { background: #f56565; }
.legend-dot.yellow { background: #ecc94b; }

/* Strategy tips */
.strategy-list {
    text-align: left;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.strategy-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f7fafc;
    border-left: 4px solid #c53030;
    border-radius: 0 4px 4px 0;
    padding: 12px 15px;
}

.strategy-tip .tip-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.strategy-tip .tip-text {
    font-size: 14px;
    color: #2d3748;
    line-height: 1.5;
}

.strategy-tip .tip-text strong {
    display: block;
    margin-bottom: 2px;
    color: #1a202c;
}

/* Hint demo */
.hint-demo-box {
    background: #fffaf0;
    border: 2px solid #fbd38d;
    border-radius: 4px;
    padding: 15px 20px;
    margin: 20px 0;
    text-align: left;
    font-size: 14px;
    color: #2d3748;
    line-height: 1.6;
}

.hint-demo-box .hint-demo-label {
    font-weight: bold;
    color: #c53030;
    margin-bottom: 6px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navigation buttons */
.tutorial-nav {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    align-items: center;
}

.btn-tutorial-prev {
    padding: 12px 24px;
    font-size: 15px;
    color: #4a5568;
    background: transparent;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'American Typewriter', 'Courier New', monospace;
    transition: all 0.2s;
}

.btn-tutorial-prev:hover {
    background: #edf2f7;
}

.btn-tutorial-next {
    flex: 1;
    padding: 14px 24px;
    font-size: 17px;
    font-weight: bold;
    color: white;
    background: #c53030;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'American Typewriter', 'Courier New', monospace;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(197, 48, 48, 0.3);
}

.btn-tutorial-next:hover {
    background: #9b2c2c;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(197, 48, 48, 0.4);
}

/* Mobile */
@media (max-width: 768px) {
    .tutorial-content {
        padding: 30px 20px;
    }

    .tutorial-slide h2 {
        font-size: 22px;
    }

    .attributes-demo {
        grid-template-columns: repeat(2, 1fr);
    }

    .attr-legend {
        gap: 12px;
        font-size: 12px;
    }
}

/* =============================================
   SHARE PANEL
   ============================================= */

.share-panel {
    margin-top: 15px;
    animation: slideUp 0.3s ease;
}

.share-panel-inner {
    background: #1a202c;
    border-radius: 4px;
    padding: 20px;
    border: 2px solid #2d3748;
}

.share-preview {
    font-family: 'American Typewriter', 'Courier New', monospace;
    font-size: 13px;
    color: #fffff4;
    line-height: 1.8;
    text-align: center;
    padding: 15px;
    background: #2d3748;
    border-radius: 4px;
    margin-bottom: 15px;
    letter-spacing: 0.3px;
}

.share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.share-btn {
    padding: 12px;
    font-size: 14px;
    font-weight: bold;
    font-family: 'American Typewriter', 'Courier New', monospace;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn-copy {
    background: #fffff4;
    color: #1a202c;
}

.share-btn-copy:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.share-btn-image {
    background: #c53030;
    color: #fffff4;
}

.share-btn-image:hover {
    background: #9b2c2c;
    transform: translateY(-1px);
}

.share-platforms {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.share-platform-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: bold;
    font-family: 'American Typewriter', 'Courier New', monospace;
    border: 2px solid #4a5568;
    border-radius: 4px;
    background: transparent;
    color: #fffff4;
    cursor: pointer;
    transition: all 0.2s;
}

.share-platform-btn:hover {
    background: #2d3748;
    border-color: #718096;
    transform: translateY(-1px);
}

.share-platform-fb:hover {
    border-color: #1877f2;
    color: #1877f2;
}

.share-platform-fb:hover svg {
    fill: #1877f2;
}

.share-platform-x:hover {
    border-color: #fffff4;
    color: #fffff4;
}

/* Mobile */
@media (max-width: 480px) {
    .share-buttons { grid-template-columns: 1fr; }
    .share-platforms { grid-template-columns: 1fr 1fr 1fr; }
    .share-platform-btn { font-size: 11px; padding: 10px 4px; }
}
