* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Interaction Widget (Like/Dislike & Views) */
.interaction-widget {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 12px 15px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.interaction-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}

.views-count {
    color: #fff;
    font-size: 0.9em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.like-dislike-buttons {
    display: flex;
    gap: 8px;
}

.like-btn,
.dislike-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-size: 0.85em;
    color: #fff;
    font-weight: bold;
    min-height: 32px;
}

.like-btn:hover {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4caf50;
    transform: scale(1.05);
}

.dislike-btn:hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: #f44336;
    transform: scale(1.05);
}

.like-btn.active {
    background: rgba(76, 175, 80, 0.5);
    border-color: #4caf50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

.dislike-btn.active {
    background: rgba(244, 67, 54, 0.5);
    border-color: #f44336;
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.5);
}

.btn-icon {
    font-size: 1.1em;
    line-height: 1;
}

.btn-count {
    font-size: 0.9em;
    min-width: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .interaction-widget {
        top: 10px;
        left: 10px;
        padding: 10px 12px;
        gap: 8px;
        border-radius: 15px;
    }
    
    .views-count {
        font-size: 0.8em;
    }
    
    .like-btn,
    .dislike-btn {
        padding: 5px 10px;
        font-size: 0.8em;
        min-height: 30px;
        gap: 5px;
    }
    
    .btn-icon {
        font-size: 1em;
    }
    
    .btn-count {
        font-size: 0.85em;
        min-width: 18px;
    }
}

@media (max-width: 480px) {
    .interaction-widget {
        top: 8px;
        left: 8px;
        padding: 8px 10px;
        gap: 6px;
        border-radius: 12px;
    }
    
    .views-count {
        font-size: 0.75em;
    }
    
    .like-btn,
    .dislike-btn {
        padding: 4px 8px;
        font-size: 0.75em;
        min-height: 28px;
        gap: 4px;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    direction: rtl;
    -webkit-overflow-scrolling: touch;
    min-height: 100vh;
    position: relative;
}

/* Champagne sparkles background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        radial-gradient(circle at 50% 60%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 20% 70%, rgba(255, 255, 255, 0.13) 1px, transparent 1px),
        radial-gradient(circle at 60% 10%, rgba(255, 255, 255, 0.11) 1px, transparent 1px),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 
        200px 200px,
        250px 250px,
        180px 180px,
        220px 220px,
        190px 190px,
        210px 210px,
        240px 240px,
        200px 200px;
    background-position: 
        0% 0%,
        25% 25%,
        50% 50%,
        75% 10%,
        10% 80%,
        40% 60%,
        60% 20%,
        90% 70%;
    animation: champagneSparkles 20s linear infinite;
    opacity: 0.6;
}

@keyframes champagneSparkles {
    0% {
        background-position: 
            0% 0%,
            25% 25%,
            50% 50%,
            75% 10%,
            10% 80%,
            40% 60%,
            60% 20%,
            90% 70%;
        opacity: 0.6;
    }
    25% {
        opacity: 0.8;
    }
    50% {
        background-position: 
            10% 10%,
            35% 35%,
            60% 60%,
            85% 20%,
            20% 90%,
            50% 70%,
            70% 30%,
            100% 80%;
        opacity: 0.7;
    }
    75% {
        opacity: 0.9;
    }
    100% {
        background-position: 
            0% 0%,
            25% 25%,
            50% 50%,
            75% 10%,
            10% 80%,
            40% 60%,
            60% 20%,
            90% 70%;
        opacity: 0.6;
    }
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .screen {
        padding: 10px;
    }
}

.screen.active {
    display: block;
}

/* Main Menu */
.menu-container {
    max-width: 600px;
    margin: 100px auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 50px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 10;
}

.menu-container h1 {
    font-size: 4em;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: glow 2s ease-in-out infinite alternate;
}

.menu-container h2 {
    font-size: 1.5em;
    margin-bottom: 40px;
    color: #ffd700;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
    to { text-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 40px rgba(255, 215, 0, 0.8); }
}

/* Buttons */
button {
    padding: 15px 30px;
    font-size: 1.2em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.6);
}

/* Game Screen */
.game-header {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-display {
    display: flex;
    justify-content: space-around;
    font-size: 1.3em;
    font-weight: bold;
    gap: 10px;
}

.score-display span {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-display span:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

#gameCanvas {
    display: block;
    margin: 0 auto;
    background: linear-gradient(to bottom, #87ceeb 0%, #e0f6ff 50%, #ffffff 100%);
    border: 4px solid #ffd700;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.game-controls {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-controls p {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.9);
}

/* Modal (Quiz) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 30px;
    font-size: 2em;
    color: #ffd700;
}

#quizQuestion {
    font-size: 1.4em;
    margin-bottom: 30px;
    line-height: 1.6;
}

#quizAnswers {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quiz-answer {
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.quiz-answer:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

.quiz-answer.correct {
    background: #4caf50;
    border-color: #2e7d32;
}

.quiz-answer.incorrect {
    background: #f44336;
    border-color: #c62828;
}

.explanation {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    font-size: 1.1em;
    line-height: 1.6;
    display: none;
}

.explanation.show {
    display: block;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Screens */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.content-container h1 {
    text-align: center;
    font-size: 3em;
    margin-bottom: 40px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.content-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    margin: 30px 0;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-section h2 {
    color: #4ecdc4;
    margin-bottom: 20px;
    font-size: 2em;
}

.content-section h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.content-section p {
    line-height: 1.8;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.content-section ul {
    list-style: none;
    padding: 0;
}

.content-section li {
    padding: 10px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.05);
    border-right: 4px solid #4ecdc4;
    border-radius: 5px;
    font-size: 1.1em;
    line-height: 1.6;
}

/* Character Cards */
.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.character-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    text-align: center;
    transition: transform 0.3s ease;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.character-card h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.character-card p {
    color: #fff;
    line-height: 1.6;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.comparison-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.comparison-card h2 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.8em;
    text-align: center;
}

.comparison-card h3 {
    color: #4ecdc4;
    margin-bottom: 20px;
    font-size: 1.2em;
    text-align: center;
    font-style: italic;
}

.comparison-card ul {
    list-style: none;
    padding: 0;
}

.comparison-card li {
    padding: 12px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.05);
    border-right: 4px solid #ff6b6b;
    border-radius: 5px;
    line-height: 1.6;
}

.comparison-card li strong {
    color: #ffd700;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table th {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    font-weight: bold;
    font-size: 1.1em;
}

.comparison-table tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Quiz Screen */
#quizProgress {
    text-align: center;
    font-size: 1.3em;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    color: #ffd700;
}

#standaloneQuizContent {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.results {
    text-align: center;
    padding: 30px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 15px;
    font-size: 1.5em;
    margin-top: 20px;
}

/* Snow Animation */
.snowflake {
    position: fixed;
    color: white;
    font-size: 1em;
    animation: fall linear infinite;
    pointer-events: none;
    z-index: 1000;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Mobile/Desktop Control Display */
.desktop-controls {
    display: block;
}

.mobile-controls {
    display: none;
}

/* Responsive Design - Mobile Improvements */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .menu-container {
        padding: 25px 15px;
        margin: 15px 5px;
        border-radius: 15px;
    }

    .menu-container h1 {
        font-size: 2.2em;
        margin-bottom: 15px;
        word-break: break-word;
    }

    .menu-container h2 {
        font-size: 1.1em;
        margin-bottom: 25px;
    }

    button {
        padding: 14px 25px;
        font-size: 1.05em;
        width: 100%;
        max-width: 100%;
        margin: 8px 0;
        border-radius: 12px;
        min-height: 48px; /* Better touch target */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .content-container {
        padding: 12px;
        margin: 5px;
        border-radius: 15px;
    }

    .content-container h1 {
        font-size: 1.8em;
        margin-bottom: 15px;
        line-height: 1.3;
    }

    .content-section {
        padding: 15px 12px;
        margin: 15px 0;
        border-radius: 12px;
    }

    .content-section h2 {
        font-size: 1.4em;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .content-section h3 {
        font-size: 1.15em;
        margin-bottom: 10px;
    }

    .content-section p,
    .content-section li {
        font-size: 0.95em;
        line-height: 1.7;
        margin-bottom: 10px;
    }

    .content-section ul {
        margin: 10px 0;
    }

    .content-section li {
        padding: 10px 8px;
        margin: 8px 0;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .comparison-card {
        padding: 18px 15px;
        border-radius: 12px;
    }

    .comparison-card h2 {
        font-size: 1.35em;
        margin-bottom: 12px;
    }

    .comparison-card h3 {
        font-size: 1.05em;
        margin-bottom: 15px;
    }

    .comparison-card li {
        padding: 10px;
        margin: 8px 0;
        font-size: 0.9em;
        line-height: 1.6;
    }

    .character-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .character-card {
        padding: 18px;
        border-radius: 12px;
    }

    .character-card h3 {
        font-size: 1.25em;
        margin-bottom: 12px;
    }

    .character-card p {
        font-size: 0.95em;
        line-height: 1.6;
    }

    #gameCanvas {
        width: 100% !important;
        max-width: 100%;
        height: auto !important;
        border: 4px solid #ffd700;
        border-radius: 10px;
        display: block;
        box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    }

    .game-header {
        padding: 10px 8px;
        margin-bottom: 8px;
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.75);
    }

    .score-display {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        font-size: 0.95em;
        justify-content: space-between;
        font-weight: bold;
    }

    .score-display span {
        padding: 8px 8px;
        flex: 1;
        min-width: 0;
        text-align: center;
        border-radius: 8px;
        font-size: 0.9em;
        background: rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 215, 0, 0.3);
    }

    .game-controls {
        padding: 12px 8px;
        margin-top: 8px;
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.6);
    }

    .game-controls p {
        font-size: 1em;
        margin-bottom: 12px;
        padding: 10px;
        background: rgba(255, 215, 0, 0.15);
        border-radius: 10px;
        border: 2px solid rgba(255, 215, 0, 0.3);
        font-weight: bold;
    }

    .game-controls button {
        padding: 14px 20px;
        font-size: 1em;
        margin: 8px 0;
        width: 100%;
        min-height: 50px;
        font-weight: bold;
    }

    .desktop-controls {
        display: none;
    }

    .mobile-controls {
        display: block;
        font-weight: bold;
        color: #ffd700;
        text-align: center;
        line-height: 1.5;
    }

    .modal-content {
        padding: 20px 15px;
        margin: 10px 5px;
        width: calc(100% - 10px);
        max-width: none;
        border-radius: 15px;
    }

    .modal-content h2 {
        font-size: 1.4em;
        margin-bottom: 20px;
        line-height: 1.3;
    }

    #quizQuestion {
        font-size: 1.05em;
        line-height: 1.6;
        margin-bottom: 20px;
    }

    .quiz-answer {
        padding: 14px 18px;
        font-size: 0.95em;
        min-height: 48px;
        display: flex;
        align-items: center;
        text-align: right;
    }

    .comparison-table {
        font-size: 0.85em;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 8px 6px;
        min-width: 80px;
    }

    .comparison-table th {
        font-size: 0.9em;
    }

    #quizProgress {
        font-size: 1em;
        padding: 12px;
        border-radius: 10px;
    }

    .results {
        font-size: 1.15em;
        padding: 20px 15px;
        border-radius: 12px;
    }

    .explanation {
        padding: 15px;
        font-size: 0.95em;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .screen {
        padding: 8px;
    }

    .menu-container {
        padding: 20px 12px;
        margin: 10px 3px;
        border-radius: 12px;
    }

    .menu-container h1 {
        font-size: 1.8em;
        margin-bottom: 12px;
    }

    .menu-container h2 {
        font-size: 1em;
        margin-bottom: 20px;
    }

    button {
        padding: 12px 20px;
        font-size: 0.98em;
        margin: 6px 0;
        min-height: 46px;
    }

    .content-container {
        padding: 10px;
        margin: 3px;
    }

    .content-container h1 {
        font-size: 1.6em;
        margin-bottom: 12px;
    }

    .content-section {
        padding: 12px 10px;
        margin: 12px 0;
    }

    .content-section h2 {
        font-size: 1.25em;
        margin-bottom: 10px;
    }

    .content-section h3 {
        font-size: 1.1em;
    }

    .content-section p,
    .content-section li {
        font-size: 0.9em;
        line-height: 1.65;
    }

    .comparison-card {
        padding: 15px 12px;
    }

    .comparison-card h2 {
        font-size: 1.2em;
    }

    .comparison-card h3 {
        font-size: 1em;
    }

    .comparison-card li {
        font-size: 0.85em;
        padding: 8px;
    }

    .character-card {
        padding: 15px;
    }

    .character-card h3 {
        font-size: 1.15em;
    }

    .character-card p {
        font-size: 0.9em;
    }

    .game-header {
        padding: 6px 4px;
    }

    .score-display {
        font-size: 0.85em;
        gap: 4px;
    }

    .score-display span {
        padding: 5px 8px;
        font-size: 0.85em;
        min-width: calc(33.333% - 3px);
    }

    .game-controls {
        padding: 10px 6px;
    }

    .game-controls p {
        font-size: 0.85em;
        padding: 6px;
    }

    .game-controls button {
        padding: 11px 18px;
        font-size: 0.9em;
    }

    .modal-content {
        padding: 18px 12px;
        margin: 8px 3px;
        width: calc(100% - 6px);
    }

    .modal-content h2 {
        font-size: 1.25em;
        margin-bottom: 15px;
    }

    #quizQuestion {
        font-size: 1em;
        margin-bottom: 15px;
    }

    .quiz-answer {
        padding: 12px 15px;
        font-size: 0.9em;
        min-height: 44px;
    }

    .comparison-table {
        font-size: 0.8em;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 6px 4px;
        min-width: 70px;
    }

    #quizProgress {
        font-size: 0.95em;
        padding: 10px;
    }

    .results {
        font-size: 1.05em;
        padding: 18px 12px;
    }

    .explanation {
        padding: 12px;
        font-size: 0.9em;
    }
}

/* Prevent text selection on canvas and touch controls */
#gameCanvas {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

/* Prevent zoom on double tap - touch controls */
#gameScreen * {
    touch-action: manipulation;
}

/* Game Screen specific responsive adjustments */
@media (max-width: 768px) {
    #gameScreen {
        padding: 5px;
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    }
    
    #gameScreen .game-header {
        margin-bottom: 6px;
        flex-shrink: 0;
        order: 1;
    }

    #gameCanvas {
        flex: 1;
        min-height: 0;
        object-fit: contain;
        order: 2;
        margin: 0 auto;
    }
    
    #gameScreen .game-controls {
        flex-shrink: 0;
        margin-top: 6px;
        order: 3;
    }
}

@media (max-width: 480px) {
    #gameScreen {
        padding: 3px;
    }
}

/* Toast Messages */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.toast {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-width: 300px;
    max-width: 500px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ff6b6b, #4ecdc4);
    animation: toastProgress 3s linear forwards;
}

.toast.success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.95) 0%, rgba(46, 125, 50, 0.95) 100%);
}

.toast.error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.95) 0%, rgba(198, 40, 40, 0.95) 100%);
}

.toast.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95) 0%, rgba(255, 152, 0, 0.95) 100%);
}

.toast.info {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.95) 0%, rgba(25, 118, 210, 0.95) 100%);
}

.toast-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-title .toast-icon {
    font-size: 1.5em;
}

.toast-message {
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
}

.toast-close {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.toast.fade-out {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(-100px) scale(0.8);
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        left: 10px;
        right: 10px;
    }
    
    .toast {
        min-width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        padding: 15px 20px;
    }
    
    .toast-title {
        font-size: 1.1em;
    }
    
    .toast-message {
        font-size: 1em;
    }
}

/* Jokes Screen Styles */
.joke-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    margin: 30px 0;
    border: 2px solid rgba(255, 215, 0, 0.3);
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 25px;
}

.joke-category {
    font-size: 1.3em;
    color: #ffd700;
    margin-bottom: 30px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.joke-question {
    font-size: 1.8em;
    color: #fff;
    margin: 0;
    line-height: 1.6;
    font-weight: bold;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border-right: 5px solid #4ecdc4;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    word-wrap: break-word;
    visibility: visible;
}

.joke-answer {
    font-size: 1.5em;
    color: #ffd700;
    margin: 0;
    line-height: 1.6;
    font-weight: bold;
    padding: 30px 20px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 15px;
    border: 3px solid rgba(255, 215, 0, 0.5);
    animation: fadeIn 0.5s ease;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    word-wrap: break-word;
}

.joke-buttons {
    margin: 10px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.joke-buttons button {
    min-height: 50px;
    font-size: 1.1em;
    font-weight: bold;
}

.joke-category-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-category {
    padding: 12px 25px;
    font-size: 1em;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: bold;
}

.btn-category:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.5);
}

.btn-category.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 107, 107, 0.3));
    border-color: #ffd700;
    color: #ffd700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

@media (max-width: 768px) {
    .joke-card {
        padding: 25px 18px;
        min-height: auto;
        gap: 20px;
        margin: 20px 0;
    }
    
    .joke-category {
        font-size: 1.2em;
        margin-bottom: 0;
        padding: 12px;
        background: rgba(255, 215, 0, 0.15);
        border-radius: 10px;
    }
    
    .joke-question {
        font-size: 1.4em;
        padding: 25px 18px;
        min-height: 120px;
        border-right-width: 4px;
    }
    
    .joke-answer {
        font-size: 1.3em;
        padding: 25px 18px;
        border-width: 2px;
    }
    
    .joke-buttons {
        flex-direction: column;
        gap: 12px;
        margin: 0;
    }
    
    .joke-buttons button {
        width: 100%;
        min-height: 55px;
        font-size: 1.05em;
        padding: 15px 20px;
    }
    
    .joke-category-buttons {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }
    
    .btn-category {
        width: 100%;
        padding: 14px 20px;
        font-size: 1.05em;
        min-height: 50px;
    }
}

@media (max-width: 480px) {
    .joke-card {
        padding: 20px 15px;
        min-height: auto;
        gap: 18px;
    }
    
    .joke-category {
        font-size: 1.1em;
        padding: 10px;
    }
}

/* Vodka Match Game Styles */
.vodka-game-header {
    text-align: center;
    margin-bottom: 20px;
}

.vodka-game-header h1 {
    font-size: 2.5em;
    color: #ffd700;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.vodka-instructions {
    font-size: 0.95em;
    line-height: 1.6;
}

.vodka-instructions p {
    margin: 8px 0;
}

@media (max-width: 768px) {
    .vodka-instructions {
        font-size: 0.85em;
        padding: 12px !important;
    }
    
    .vodka-instructions p {
        margin: 6px 0;
    }
}

.vodka-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.vodka-game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    width: 100%;
    overflow: hidden;
}

#vodkaCanvas {
    border: 4px solid #ffd700;
    border-radius: 15px;
    background: #1a1a2e;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    max-width: 100%;
    height: auto;
    display: block;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.vodka-controls {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.vodka-game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    min-width: 300px;
    border: 3px solid #ffd700;
}

.vodka-game-over h2 {
    color: #ffd700;
    font-size: 2em;
    margin-bottom: 20px;
}

.vodka-game-over p {
    font-size: 1.3em;
    margin: 15px 0;
    color: #fff;
}

.vodka-game-over button {
    margin: 10px;
    min-width: 150px;
}

@media (max-width: 768px) {
    .vodka-game-header h1 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    
    .vodka-stats {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .vodka-stats .stat-item {
        width: 100%;
        font-size: 0.95em;
        padding: 10px 12px;
        min-width: auto;
    }
    
    .vodka-game-container {
        margin: 10px 0;
        padding: 0 5px;
    }
    
    #vodkaCanvas {
        width: 100% !important;
        max-width: 100%;
        max-height: 450px;
        border-width: 3px;
        border-radius: 12px;
        margin: 0 auto;
        display: block;
    }
    
    .vodka-controls {
        flex-direction: column;
        padding: 12px;
        margin-top: 15px;
        gap: 10px;
    }
    
    .vodka-controls button {
        width: 100%;
        min-height: 50px;
        font-size: 1em;
        padding: 14px 20px;
    }
    
    .vodka-game-over {
        width: calc(100% - 30px);
        padding: 25px 18px;
        min-width: auto;
        max-width: 90%;
    }
    
    .vodka-game-over h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    
    .vodka-game-over p {
        font-size: 1.1em;
        margin: 12px 0;
    }
    
    .vodka-game-over button {
        min-width: 140px;
        padding: 12px 20px;
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .vodka-game-header h1 {
        font-size: 1.5em;
    }
    
    .vodka-stats .stat-item {
        font-size: 0.9em;
        padding: 8px 10px;
    }
    
    .vodka-controls {
        padding: 10px;
    }
    
    .vodka-controls button {
        min-height: 48px;
        font-size: 0.95em;
        padding: 12px 18px;
    }
    
    .vodka-game-over {
        width: calc(100% - 20px);
        padding: 20px 15px;
    }
    
    .vodka-game-over h2 {
        font-size: 1.3em;
    }
    
    .vodka-game-over p {
        font-size: 1em;
    }
}

/* Food and Drink Tables Styles */
.food-drink-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 30px;
    font-size: 1.1em;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.tab-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border-color: #ff6b6b;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.table-container {
    margin: 30px 0;
}

.table-container h2 {
    text-align: center;
    font-size: 2em;
    color: #ffd700;
    margin-bottom: 25px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.table-wrapper {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    overflow-x: auto;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.food-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    min-width: 600px;
}

.food-table thead {
    background: rgba(255, 215, 0, 0.2);
}

.food-table th {
    padding: 15px;
    text-align: right;
    font-size: 1.1em;
    font-weight: bold;
    color: #ffd700;
    border-bottom: 2px solid rgba(255, 215, 0, 0.5);
}

.food-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    vertical-align: top;
}

.food-table tbody tr {
    transition: background 0.3s ease;
}

.food-table tbody tr:hover {
    background: rgba(255, 215, 0, 0.1);
}

.food-table td:first-child {
    font-weight: bold;
    color: #ffd700;
    font-size: 1.1em;
}

.food-table td:nth-child(2) {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.search-btn {
    padding: 8px 20px;
    font-size: 0.9em;
    border: 2px solid #4ecdc4;
    border-radius: 10px;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.6);
    background: linear-gradient(135deg, #44a08d, #4ecdc4);
}

.search-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .food-drink-tabs {
        margin: 20px 0;
        gap: 10px;
    }
    
    .tab-btn {
        padding: 10px 20px;
        font-size: 1em;
    }
    
    .table-container {
        margin: 20px 0;
    }
    
    .table-container h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .table-wrapper {
        padding: 15px;
    }
    
    .food-table {
        min-width: 500px;
        font-size: 0.9em;
    }
    
    .food-table th,
    .food-table td {
        padding: 12px 10px;
    }
    
    .food-table td:first-child {
        font-size: 1em;
    }
    
    .search-btn {
        padding: 8px 15px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .food-drink-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tab-btn {
        width: 100%;
        padding: 12px;
    }
    
    .table-container h2 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }
    
    .table-wrapper {
        padding: 10px;
    }
    
    .food-table {
        min-width: 450px;
        font-size: 0.85em;
    }
    
    .food-table th,
    .food-table td {
        padding: 10px 8px;
    }
    
    .food-table td:first-child {
        font-size: 0.95em;
    }
    
    .search-btn {
        padding: 6px 12px;
        font-size: 0.8em;
        width: 100%;
        text-align: center;
    }
}

/* Ded Moroz Stories Styles */
.stories-container {
    max-width: 900px;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.story-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.story-card:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 6px 30px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.story-title {
    font-size: 1.8em;
    color: #ffd700;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 10px;
}

.story-content {
    font-size: 1.1em;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 20px;
    text-align: right;
}

.story-source {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    margin-top: 15px;
    border-right: 4px solid #4ecdc4;
}

.story-source-label {
    font-weight: bold;
    color: #4ecdc4;
    font-size: 0.95em;
    margin-bottom: 5px;
    display: block;
}

.story-source-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    line-height: 1.6;
}

.story-source-link {
    color: #4ecdc4;
    text-decoration: none;
    border-bottom: 1px dotted #4ecdc4;
    transition: color 0.3s ease;
}

.story-source-link:hover {
    color: #ffd700;
    border-bottom-color: #ffd700;
}

@media (max-width: 768px) {
    .stories-container {
        margin: 20px auto;
        gap: 20px;
    }
    
    .story-card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .story-title {
        font-size: 1.5em;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .story-content {
        font-size: 1em;
        line-height: 1.7;
        margin-bottom: 15px;
    }
    
    .story-source {
        padding: 10px 12px;
        margin-top: 12px;
    }
    
    .story-source-label {
        font-size: 0.9em;
    }
    
    .story-source-text {
        font-size: 0.85em;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .stories-container {
        margin: 15px auto;
        gap: 15px;
    }
    
    .story-card {
        padding: 15px;
        border-radius: 12px;
    }
    
    .story-title {
        font-size: 1.3em;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }
    
    .story-content {
        font-size: 0.95em;
        line-height: 1.6;
        margin-bottom: 12px;
    }
    
    .story-source {
        padding: 8px 10px;
        margin-top: 10px;
        border-right-width: 3px;
    }
    
    .story-source-label {
        font-size: 0.85em;
        margin-bottom: 4px;
    }
    
    .story-source-text {
        font-size: 0.8em;
    }
}

/* Matryoshka Game Styles */
.matryoshka-header {
    text-align: center;
    margin-bottom: 20px;
}

.matryoshka-header h1 {
    font-size: 2.5em;
    color: #ffd700;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.matryoshka-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    border: 2px solid rgba(255, 215, 0, 0.3);
    min-width: 120px;
    text-align: center;
}

#matryoshkaCanvas {
    display: block;
    margin: 0 auto;
    border: 4px solid #ffd700;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    max-width: 100%;
    height: auto;
}

.matryoshka-controls {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.matryoshka-game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    min-width: 300px;
    border: 3px solid #ffd700;
}

.matryoshka-game-over h2 {
    color: #ffd700;
    font-size: 2em;
    margin-bottom: 20px;
}

.matryoshka-game-over p {
    font-size: 1.3em;
    margin: 15px 0;
    color: #fff;
}

.matryoshka-game-over button {
    margin: 10px;
    min-width: 150px;
}

@media (max-width: 768px) {
    .matryoshka-header h1 {
        font-size: 2em;
    }
    
    .matryoshka-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-item {
        width: 100%;
        font-size: 1em;
        padding: 12px;
    }
    
    #matryoshkaCanvas {
        width: 100% !important;
        border-width: 3px;
    }
    
    .matryoshka-controls {
        flex-direction: column;
        padding: 15px;
    }
    
    .matryoshka-controls button {
        width: 100%;
    }
    
    .matryoshka-game-over {
        width: calc(100% - 40px);
        padding: 30px 20px;
        min-width: auto;
    }
    
    .matryoshka-game-over h2 {
        font-size: 1.5em;
    }
    
    .matryoshka-game-over p {
        font-size: 1.1em;
    }
    
    .joke-question {
        font-size: 1.25em;
        padding: 20px 15px;
        min-height: 100px;
        line-height: 1.5;
    }
    
    .joke-answer {
        font-size: 1.15em;
        padding: 20px 15px;
        line-height: 1.5;
    }
    
    .joke-buttons button {
        min-height: 50px;
        font-size: 1em;
        padding: 12px 18px;
    }
    
    .btn-category {
        padding: 12px 18px;
        font-size: 1em;
        min-height: 48px;
    }
}

