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

:root {
    --yalda-red: #8B0000;
    --yalda-crimson: #DC143C;
    --yalda-dark-red: #B22222;
    --yalda-gold: #FFD700;
    --yalda-orange: #FF8C00;
}

body {
    font-family: 'IranSans', Tahoma, Arial, sans-serif !important;
    min-height: 100vh;
    direction: rtl;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.hidden {
    display: none !important;
}

/* ==================== YALDA BACKGROUND ==================== */

.yalda-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(220, 20, 60, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(139, 0, 0, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 50% 30%, rgba(255, 215, 0, 0.2) 0%, transparent 50%),
                linear-gradient(135deg, #3d0814 0%, #8B0000 25%, #DC143C 50%, #8B0000 75%, #3d0814 100%);
    background-size: 200% 200%;
    animation: bgShift 20s ease infinite;
    z-index: -1;
    overflow: hidden;
}

@keyframes bgShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Decorative Shapes */
.decorative-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--yalda-crimson), var(--yalda-gold));
    top: -10%;
    right: -5%;
    animation-duration: 25s;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--yalda-gold), var(--yalda-orange));
    bottom: -10%;
    left: -5%;
    animation-duration: 30s;
    animation-delay: -10s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--yalda-orange), var(--yalda-crimson));
    top: 40%;
    left: 50%;
    animation-duration: 35s;
    animation-delay: -20s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(40px, -40px) rotate(120deg); }
    66% { transform: translate(-40px, 40px) rotate(240deg); }
}

/* ==================== SNOWFALL ==================== */

.snowfall {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    animation: snowfall linear infinite;
    user-select: none;
}

@keyframes snowfall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.3;
    }
}
n/* Floating Yalda Fruits */
.floating-fruits {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.yalda-fruit {
    position: absolute;
    font-size: 50px;
    opacity: 0.7;
    animation: fruitFloat 15s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.yalda-fruit:nth-child(1) { left: 15%; top: 20%; animation-delay: 0s; animation-duration: 14s; }
.yalda-fruit:nth-child(2) { left: 75%; top: 15%; animation-delay: 2s; animation-duration: 16s; }
.yalda-fruit:nth-child(3) { left: 25%; top: 70%; animation-delay: 4s; animation-duration: 15s; }
.yalda-fruit:nth-child(4) { left: 80%; top: 65%; animation-delay: 1s; animation-duration: 17s; }
.yalda-fruit:nth-child(5) { left: 50%; top: 40%; animation-delay: 3s; animation-duration: 16s; }
.yalda-fruit:nth-child(6) { left: 10%; top: 50%; animation-delay: 5s; animation-duration: 14s; }

@keyframes fruitFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.5;
    }
    25% {
        transform: translateY(-25px) rotate(10deg) scale(1.1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-50px) rotate(-10deg) scale(0.9);
        opacity: 0.6;
    }
    75% {
        transform: translateY(-25px) rotate(5deg) scale(1.05);
        opacity: 0.7;
    }
}

/* ==================== LOGIN CONTAINER ==================== */

.login-container {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 35px 30px;
    max-width: 420px;
    width: 100%;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 100px rgba(220, 20, 60, 0.3),
        inset 0 0 60px rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.8s ease-out;
    border: 2px solid rgba(255, 215, 0, 0.3);
    z-index: 2;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==================== LOGO CONTAINER ==================== */

.logo-container {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-glow-outer {
    position: absolute;
    width: 160%;
    height: 160%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220, 20, 60, 0.3) 0%, transparent 60%);
    animation: pulseOuter 4s ease-in-out infinite;
    z-index: 0;
}

@keyframes pulseOuter {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.9);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.15);
    }
}

.logo-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.95) 0%,
        rgba(255, 165, 0, 0.98) 50%,
        rgba(255, 140, 0, 1) 100%
    );
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 15px 40px rgba(220, 20, 60, 0.5),
        0 8px 20px rgba(255, 140, 0, 0.4),
        inset 0 3px 10px rgba(255, 255, 255, 0.7),
        inset 0 -3px 10px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: logoFloat 3s ease-in-out infinite, logoRotatingGlow 8s linear infinite;
    z-index: 2;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

@keyframes logoRotatingGlow {
    0% {
        box-shadow:
            0 15px 40px rgba(220, 20, 60, 0.5),
            0 8px 20px rgba(255, 140, 0, 0.4),
            inset 0 3px 10px rgba(255, 255, 255, 0.7),
            inset 0 -3px 10px rgba(0, 0, 0, 0.15);
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.7));
    }
    25% {
        box-shadow:
            0 15px 40px rgba(220, 20, 60, 0.7),
            0 8px 20px rgba(220, 20, 60, 0.5),
            inset 0 3px 10px rgba(255, 255, 255, 0.8),
            inset 0 -3px 10px rgba(220, 20, 60, 0.1);
        filter: drop-shadow(0 0 20px rgba(220, 20, 60, 0.8));
    }
    50% {
        box-shadow:
            0 15px 40px rgba(255, 140, 0, 0.7),
            0 8px 20px rgba(255, 140, 0, 0.5),
            inset 0 3px 10px rgba(255, 255, 255, 0.9),
            inset 0 -3px 10px rgba(255, 140, 0, 0.1);
        filter: drop-shadow(0 0 25px rgba(255, 140, 0, 0.9));
    }
    75% {
        box-shadow:
            0 15px 40px rgba(255, 215, 0, 0.6),
            0 8px 20px rgba(255, 215, 0, 0.5),
            inset 0 3px 10px rgba(255, 255, 255, 0.8),
            inset 0 -3px 10px rgba(255, 215, 0, 0.1);
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    }
    100% {
        box-shadow:
            0 15px 40px rgba(220, 20, 60, 0.5),
            0 8px 20px rgba(255, 140, 0, 0.4),
            inset 0 3px 10px rgba(255, 255, 255, 0.7),
            inset 0 -3px 10px rgba(0, 0, 0, 0.15);
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.7));
    }
}

.logo-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, transparent 70%);
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.15);
    }
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 1;
    animation: logoShine 4s ease-in-out infinite;
}

@keyframes logoShine {
    0%, 100% {
        filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.3))
                drop-shadow(0 0 8px rgba(220, 20, 60, 0.4));
    }
    33% {
        filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.3))
                drop-shadow(0 0 12px rgba(255, 140, 0, 0.6));
    }
    66% {
        filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.3))
                drop-shadow(0 0 12px rgba(255, 215, 0, 0.6));
    }
}

.loading-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--yalda-crimson);
    border-right-color: var(--yalda-orange);
    border-bottom-color: var(--yalda-gold);
    animation: spin 2s linear infinite;
    z-index: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Rotating Rings */
.logo-rotating-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    pointer-events: none;
    left: 50%;
    top: 50%;
}

.ring-1 {
    width: 100%;
    height: 100%;
    margin-left: -50%;
    margin-top: -50%;
    border-color: rgba(220, 20, 60, 0.3);
    border-top-color: rgba(220, 20, 60, 0.8);
    animation: rotateRing 4s linear infinite;
}

.ring-2 {
    width: 85%;
    height: 85%;
    margin-left: -42.5%;
    margin-top: -42.5%;
    border-color: rgba(255, 215, 0, 0.3);
    border-right-color: rgba(255, 215, 0, 0.8);
    animation: rotateRing 6s linear infinite reverse;
}

@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==================== LOGIN HEADER ==================== */

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-title {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--yalda-red), var(--yalda-crimson), var(--yalda-dark-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    animation: titleGlow 3s ease-in-out infinite;
    letter-spacing: -0.5px;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.login-subtitle {
    font-size: 1rem;
    color: var(--yalda-red);
    font-weight: 700;
    margin-bottom: 10px;
}

.tagline-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.15),
        0 3px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.tagline-text {
    font-size: 0.95rem;
    font-weight: 900;
    background: linear-gradient(90deg,
        var(--yalda-red) 0%,
        var(--yalda-orange) 30%,
        var(--yalda-gold) 50%,
        var(--yalda-orange) 70%,
        var(--yalda-red) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
    letter-spacing: 0.3px;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ==================== LOGIN FORM ==================== */

.login-form-wrapper {
    margin-bottom: 20px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    z-index: 1;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 12px 45px 12px 12px;
    border: 2px solid rgba(220, 20, 60, 0.2);
    border-radius: 12px;
    font-size: 15px;
    font-family: 'IranSans', sans-serif;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--yalda-crimson);
    background: white;
    box-shadow: 0 0 15px rgba(220, 20, 60, 0.2);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #999;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--yalda-red) 0%, var(--yalda-crimson) 50%, var(--yalda-dark-red) 100%);
    background-size: 200% 100%;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'IranSans', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    background-position: 100% 0;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(220, 20, 60, 0.6);
}

.btn-login:active {
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Error Message */
.error-message {
    margin-top: 12px;
    padding: 10px;
    background: rgba(255, 224, 224, 0.95);
    color: #d32f2f;
    border-radius: 8px;
    text-align: center;
    display: none;
    border: 1px solid rgba(211, 47, 47, 0.3);
    font-size: 14px;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 18px;
}

.footer-text {
    color: var(--yalda-red);
    font-size: 0.9rem;
    font-weight: 600;
}


/* ==================== LEADERBOARD MODAL ==================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 28px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    color: #667eea;
    font-size: 1.6rem;
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    transition: all 0.2s;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    background: #f5f5f5;
    color: #666;
}

#leaderboard-list {
    list-style: none;
}

.leaderboard-item {
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #f8f8f8;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.leaderboard-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-color: #ffd700;
    font-weight: bold;
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    border-color: #c0c0c0;
    font-weight: bold;
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e8a87c 100%);
    border-color: #cd7f32;
    font-weight: bold;
}

/* ==================== LOADING ==================== */

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid var(--yalda-crimson);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading p {
    color: white;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 600;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 480px) {
    .login-container {
        padding: 28px 20px;
        border-radius: 20px;
        max-width: 100%;
    }

    .logo-container {
        width: 90px;
        height: 90px;
        margin-bottom: 20px;
    }

    .logo-wrapper {
        width: 75px;
        height: 75px;
        padding: 12px;
    }

    .login-title {
        font-size: 1.35rem;
    }

    .login-subtitle {
        font-size: 0.9rem;
    }

    .tagline-text {
        font-size: 0.85rem;
    }

    .tagline-box {
        padding: 8px 16px;
    }

    .form-input {
        padding: 11px 40px 11px 11px;
        font-size: 14px;
    }

    .input-icon {
        font-size: 16px;
        right: 11px;
    }

    .btn-login {
        padding: 12px;
        font-size: 15px;
    }

    .footer-text {
        font-size: 0.85rem;
    }

    .game-header {
        flex-direction: column;
        gap: 8px;
        padding: 10px 12px;
    }

    .control-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .modal-content {
        padding: 20px;
    }

    .snowflake {
        font-size: 12px !important;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 25px 16px;
    }

    .logo-container {
        width: 80px;
        height: 80px;
    }

    .logo-wrapper {
        width: 65px;
        height: 65px;
    }

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

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

    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* ==================== TOUCH OPTIMIZATION ==================== */

@media (hover: none) and (pointer: coarse) {
    .btn-login,
    .control-btn,
    .btn-leaderboard {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ==================== GAME OVERLAYS ==================== */

.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.overlay-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b3d 100%);
    border: 2px solid var(--yalda-gold);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 10px 50px rgba(220, 20, 60, 0.5);
}

.game-title {
    font-size: 2.5em;
    color: var(--yalda-gold);
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.game-subtitle {
    font-size: 1.2em;
    color: #fff;
    margin-bottom: 30px;
    opacity: 0.9;
}

.game-instructions {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    font-size: 0.9em;
    color: #ddd;
}

.game-instructions p {
    margin: 8px 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--yalda-dark-red), var(--yalda-crimson));
    color: white;
    border: 2px solid var(--yalda-gold);
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(220, 20, 60, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 20, 60, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.gameover-title {
    font-size: 2em;
    color: var(--yalda-crimson);
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(220, 20, 60, 0.7);
}

.final-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.final-stats p {
    font-size: 1.3em;
    color: #fff;
    margin: 10px 0;
}

.final-stats span {
    color: var(--yalda-gold);
    font-weight: bold;
    font-size: 1.2em;
}

.score-saved {
    color: #4ade80;
    font-size: 1.1em;
    margin: 15px 0;
}

@media (max-width: 600px) {
    .game-title {
        font-size: 1.8em;
    }
    
    .overlay-content {
        padding: 30px 20px;
    }
    
    .btn-primary {
        padding: 12px 30px;
        font-size: 1em;
    }
}

/* ==================== FULLSCREEN GAME LAYOUT ==================== */

#game-screen {
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.game-hud {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    z-index: 100;
    pointer-events: none;
}

.game-hud > * {
    pointer-events: auto;
}

.player-name {
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.3);
}
.score {
    background: rgba(0, 0, 0, 0.7);
    color: var(--yalda-gold);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1.1em;
    font-weight: bold;
    border: 2px solid var(--yalda-gold);
}

.btn-leaderboard {
    background: rgba(220, 20, 60, 0.8);
    color: white;
    border: 2px solid var(--yalda-gold);
    padding: 8px 12px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-leaderboard:hover {
    transform: scale(1.1);
    background: rgba(220, 20, 60, 1);
}

.game-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    padding: 60px 10px 80px 10px;
    position: absolute;
    top: 0;
    left: 0;
}

#game-canvas {
    max-width: 100%;
    max-height: 100%;
    border: 3px solid var(--yalda-gold);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(220, 20, 60, 0.5);
}

.game-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.control-row {
    display: flex;
    gap: 8px;
}

.control-btn {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--yalda-gold);
    border-radius: 10px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    background: var(--yalda-crimson);
    color: white;
    transform: scale(0.95);
}

/* ==================== LANDSCAPE ORIENTATION ==================== */

@media (orientation: landscape) {
    #game-screen {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .game-container {
        padding: 60px 10px 60px 10px;
    }

    .game-controls {
        bottom: 10px;
        right: 20px;
        left: auto;
        transform: none;
    }

    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .game-hud {
        padding: 8px 15px;
    }
}

/* ==================== RESPONSIVE MOBILE ==================== */

@media (max-width: 768px) {
    .game-container {
        padding: 70px 5px 80px 5px;
    }

    .score {
        font-size: 0.9em;
        padding: 6px 12px;
    }

    .btn-leaderboard {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .game-container {
        padding: 50px 5px 50px 5px;
    }

    .game-hud {
        top: 5px;
        padding: 5px 10px;
    }

    .score {
        font-size: 0.8em;
        padding: 5px 10px;
    }

    .btn-leaderboard {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }

    .game-controls {
        bottom: 5px;
        right: 10px;
        gap: 5px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}
