/* فونت وزیر - مدیوم */
@font-face {
    font-family: 'Vazir';
    src: url('Vazir-Medium.woff2') format('woff2'),
         url('Vazir-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}


        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Vazir', sans-serif;
        }

        body {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            color: #fff;
            min-height: 100vh;
            overflow-x: hidden;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        /* هدر */
        header {
            text-align: center;
            padding: 30px 0;
            position: relative;
        }

        .game-title {
            font-size: 3.5rem;
            background: linear-gradient(90deg, #00dbde, #fc00ff);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            margin-bottom: 10px;
            animation: titleGlow 3s infinite alternate;
        }

        @keyframes titleGlow {
            0% { text-shadow: 0 5px 15px rgba(0, 219, 222, 0.5); }
            100% { text-shadow: 0 5px 25px rgba(252, 0, 255, 0.7); }
        }

        .subtitle {
            font-size: 1.2rem;
            color: #a0a0c0;
            margin-bottom: 30px;
        }

        /* دکمه‌های اصلی */
        .main-buttons {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin-bottom: 40px;
            flex-wrap: wrap;
        }

        .main-btn {
            padding: 18px 40px;
            font-size: 1.3rem;
            border: none;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        }

        .play-robot {
            background: linear-gradient(90deg, #00b09b, #96c93d);
            color: white;
        }

        .play-online {
            background: linear-gradient(90deg, #ff416c, #ff4b2b);
            color: white;
        }

        .two-player {
            background: linear-gradient(90deg, #2193b0, #6dd5ed);
            color: white;
        }

        .main-btn:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 25px rgba(0, 0, 0, 0.4);
        }

        .main-btn:active {
            transform: translateY(0);
        }

        /* مودال */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            z-index: 1000;
            justify-content: center;
            align-items: center;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .modal-content {
            background: linear-gradient(135deg, #232347, #1a1a36);
            width: 90%;
            max-width: 500px;
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
            position: relative;
            animation: slideUp 0.4s ease;
        }

        @keyframes slideUp {
            from { transform: translateY(50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
        }

        .modal-title {
            font-size: 1.8rem;
            color: #6dd5ed;
        }

        .close-btn {
            background: #ff416c;
            color: white;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            font-size: 1.5rem;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: all 0.3s;
        }

        .close-btn:hover {
            background: #ff4b2b;
            transform: rotate(90deg);
        }

        /* سطح‌های دشواری */
        .difficulty-levels {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            margin-bottom: 30px;
        }

        .level {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            border: 2px solid transparent;
        }

        .level:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-5px);
        }

        .level.active {
            border-color: #6dd5ed;
            background: rgba(109, 213, 237, 0.1);
        }

        .level-icon {
            font-size: 2.5rem;
            margin-bottom: 10px;
        }

        .level-name {
            font-size: 1.3rem;
            margin-bottom: 5px;
        }

        .level-desc {
            font-size: 0.9rem;
            color: #a0a0c0;
        }

        /* صفحه بازی */
        .game-container {
            display: none;
            flex-direction: column;
            align-items: center;
            margin-top: 20px;
        }

        .game-header {
            display: flex;
            justify-content: space-between;
            width: 100%;
            max-width: 800px;
            margin-bottom: 20px;
            background: rgba(0, 0, 0, 0.3);
            padding: 15px 25px;
            border-radius: 15px;
        }

        .score {
            font-size: 2rem;
            font-weight: bold;
            color: #6dd5ed;
        }

        .timer {
            font-size: 1.8rem;
            color: #96c93d;
        }

        .abilities {
            display: flex;
            gap: 15px;
        }

        .ability-btn {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            padding: 10px 15px;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .ability-btn:hover:not(:disabled) {
            background: rgba(255, 255, 255, 0.2);
        }

        .ability-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .ability-btn.cooldown {
            position: relative;
            overflow: hidden;
        }

        .ability-btn.cooldown::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
        }

        /* میز بازی */
        .game-table {
            width: 100%;
            max-width: 800px;
            height: 450px;
            background: linear-gradient(135deg, #0f3460, #1a1a2e);
            border-radius: 20px;
            position: relative;
            overflow: hidden;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
            border: 8px solid #333366;
        }

        .center-line {
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 4px;
            height: 100%;
            background: rgba(255, 255, 255, 0.2);
        }

        .center-circle {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 80px;
            height: 80px;
            border-radius: 50%;
            border: 4px dashed rgba(255, 255, 255, 0.2);
        }
/* استایل نتیجه بازی */
.result-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: 1000;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.result-content {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    padding: 40px 50px;
    border-radius: 25px;
    text-align: center;
    border: 3px solid #00ff88;
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.2), 
                inset 0 0 30px rgba(0, 255, 136, 0.05);
    max-width: 450px;
    width: 90%;
    animation: slideInUp 0.5s ease;
}

.result-emoji {
    font-size: 80px;
    margin-bottom: 15px;
    animation: bounce 1s ease infinite;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.result-content h2 {
    font-size: 32px;
    font-weight: bold;
    margin: 10px 0 20px;
    text-shadow: 0 0 20px currentColor;
    font-family: 'Vazir', 'B Nazanin', sans-serif;
}

.result-score {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 25px 0;
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    font-family: 'Vazir', sans-serif;
}

.result-score span {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.result-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.result-buttons button {
    padding: 14px 35px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazir', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #00ff88, #00b867);
    color: #000;
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* استایل برای حالت‌های مختلف نتیجه */
.result-content.win {
    border-color: #00ff88;
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.3);
}

.result-content.lose {
    border-color: #ff4444;
    box-shadow: 0 20px 60px rgba(255, 68, 68, 0.3);
}

.result-content.draw {
    border-color: #ffaa00;
    box-shadow: 0 20px 60px rgba(255, 170, 0, 0.3);
}

/* استایل برای تایمر */
#gameTime {
    font-size: 28px;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
    transition: color 0.5s ease;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

#gameTime.warning {
    color: #ff4444;
    animation: pulse 1s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* استایل برای اعلان */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 16px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideDown 0.5s ease;
    font-family: 'Vazir', sans-serif;
    direction: rtl;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
}

/* استایل صفحه توقف */
#pauseOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.pause-content {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    padding: 50px;
    border-radius: 25px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.pause-content h2 {
    color: #fff;
    font-size: 36px;
    margin-bottom: 15px;
    font-family: 'Vazir', sans-serif;
}

.pause-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    font-family: 'Vazir', sans-serif;
}

.pause-content button {
    padding: 12px 30px;
    margin: 0 10px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazir', sans-serif;
}

.pause-content button:first-of-type {
    background: linear-gradient(135deg, #00ff88, #00b867);
    color: #000;
}

.pause-content button:last-of-type {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pause-content button:hover {
    transform: translateY(-3px);
}

/* responsive */
@media (max-width: 600px) {
    .result-content {
        padding: 30px 20px;
    }
    
    .result-emoji {
        font-size: 60px;
    }
    
    .result-content h2 {
        font-size: 24px;
    }
    
    .result-score {
        flex-direction: column;
        gap: 15px;
    }
    
    .result-buttons {
        flex-direction: column;
    }
    
}
        .goal {
            position: absolute;
            top: 35%;
            width: 20px;
            height: 120px;
            background: rgba(255, 255, 255, 0.1);
            border: 3px solid rgba(255, 255, 255, 0.3);
        }

        .goal-left {
            left: 0;
            border-radius: 0 10px 10px 0;
            border-left: none;
        }

        .goal-right {
            right: 0;
            border-radius: 10px 0 0 10px;
            border-right: none;
        }

        /* مهره‌ها */
        .puck {
            position: absolute;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background: radial-gradient(circle at 30% 30%, #ffcc00, #ff9900);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
            transition: transform 0.1s;
            z-index: 10;
        }

        .mallet {
            position: absolute;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            z-index: 5;
            transition: transform 0.1s;
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: bold;
            color: white;
        }

        .player-mallet {
            background: radial-gradient(circle at 30% 30%, #2193b0, #0f5e7a);
            border: 3px solid #6dd5ed;
            left: 100px;
            top: 200px;
        }

        .robot-mallet {
            background: radial-gradient(circle at 30% 30%, #ff416c, #b3002d);
            border: 3px solid #ff8ba0;
            right: 100px;
            top: 200px;
        }

        /* انیمیشن‌ها */
        @keyframes goalAnimation {
            0% { background-color: rgba(255, 255, 255, 0.1); }
            50% { background-color: rgba(255, 0, 0, 0.5); }
            100% { background-color: rgba(255, 255, 255, 0.1); }
        }

        .goal-scored {
            animation: goalAnimation 1s ease;
        }

        @keyframes freezeAnimation {
            0% { filter: hue-rotate(0deg); }
            100% { filter: hue-rotate(180deg); }
        }

        .frozen {
            animation: freezeAnimation 0.5s infinite alternate;
        }

        @keyframes shrinkAnimation {
            0% { transform: scale(1); }
            100% { transform: scale(0.7); }
        }

        .shrunk {
            animation: shrinkAnimation 0.5s forwards;
        }

        /* فوتر */
        footer {
            margin-top: 50px;
            padding: 30px 0;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            text-align: center;
        }

        footer p {
            margin: 10px 0;
            color: #a0a0c0;
        }

        .brand {
            color: #6dd5ed;
            font-weight: bold;
        }

        .made-by span {
            color: #96c93d;
            font-weight: bold;
        }

        /* حالت موبایل */
        @media (max-width: 768px) {
            .game-title {
                font-size: 2.5rem;
            }
            
            .main-buttons {
                flex-direction: column;
                align-items: center;
            }
            
            .main-btn {
                width: 90%;
                justify-content: center;
            }
            
            .difficulty-levels {
                grid-template-columns: 1fr;
            }
            
            .game-table {
                height: 350px;
            }
            
            .game-header {
                flex-direction: column;
                gap: 15px;
                align-items: center;
            }
            
            .abilities {
                flex-wrap: wrap;
                justify-content: center;
            }
        }