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

body {
    font-family: 'Mirza', cursive;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    min-height: 100vh;
    overflow: hidden;
    direction: rtl;
}

.container {
    width: 100%;
    height: 100vh;
    position: relative;
}

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
}

h1 {
    font-size: 3.2rem;
    margin-bottom: 25px;
    text-align: center;
    color: #4cc9f0;
    text-shadow: 0 0 15px rgba(76, 201, 240, 0.5);
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #f8b500;
}

h3 {
    font-size: 1.6rem;
    color: #4cc9f0;
}

.instructions {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    padding: 25px 30px;
    margin: 25px 0;
    max-width: 650px;
    width: 90%;
    border: 2px solid #4cc9f0;
    box-shadow: 0 0 20px rgba(76, 201, 240, 0.3);
}

.instructions ul {
    list-style-type: none;
    padding-right: 25px;
}

.instructions li {
    font-size: 1.4rem;
    margin-bottom: 15px;
    padding-right: 15px;
    position: relative;
    line-height: 1.6;
}

.instructions li:before {
    content: "•";
    color: #f8b500;
    font-size: 2rem;
    position: absolute;
    right: -20px;
    top: -2px;
}

.target-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed #4cc9f0;
}

.circle-preview {
    width: 100px;
    height: 100px;
    border: 6px solid #0066FF;
    border-radius: 50%;
    margin-bottom: 15px;
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.5);
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% { box-shadow: 0 0 10px rgba(0, 102, 255, 0.5); }
    50% { box-shadow: 0 0 25px rgba(0, 102, 255, 0.8); }
    100% { box-shadow: 0 0 10px rgba(0, 102, 255, 0.5); }
}

.btn {
    background: linear-gradient(to bottom, #4cc9f0, #2a9dcc);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 18px 45px;
    font-size: 1.7rem;
    font-family: 'Mirza', cursive;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(to bottom, #5fd4ff, #3aaae1);
}

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

.back-btn {
    background: linear-gradient(to bottom, #f8b500, #d89600);
}

.menu-btn {
    background: linear-gradient(to bottom, #9d4edd, #7b2cbf);
    margin-top: 15px;
}

.score-history {
    margin-top: 35px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 15px 30px;
    border-radius: 15px;
}

/* صفحه بازی */
.game-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    padding: 15px 25px;
    background-color: rgba(0, 0, 0, 0.75);
    border-radius: 15px;
    margin-bottom: 25px;
    font-size: 1.4rem;
    border: 1px solid #4cc9f0;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    width: 100%;
}

#gameCanvas {
    background-color: rgba(25, 25, 35, 0.9);
    border-radius: 20px;
    border: 3px solid #4cc9f0;
    box-shadow: 0 0 30px rgba(76, 201, 240, 0.4);
    max-width: 520px;
    max-height: 520px;
    width: 90vmin;
    height: 90vmin;
}

.throw-indicator {
    margin-top: 30px;
    text-align: center;
    font-size: 1.4rem;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px 35px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #f8b500;
}

.knife-icon {
    font-size: 1.8rem;
    color: #f8b500;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* صفحه پایان */
.result-box {
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    padding: 40px 50px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 3px solid #f8b500;
    margin-top: 30px;
    box-shadow: 0 0 30px rgba(248, 181, 0, 0.3);
}

.result-icon {
    font-size: 4.5rem;
    margin-bottom: 25px;
}

.result-message {
    font-size: 2rem;
    margin-bottom: 25px;
    min-height: 60px;
    color: #f8b500;
}

.final-score, .high-score-display {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #4cc9f0;
}

.high-score-display {
    color: #f8b500;
    font-weight: bold;
}

/* رسپانسیو */
@media (max-width: 768px) {
    h1 {
        font-size: 2.3rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .instructions {
        padding: 20px;
    }
    
    .instructions li {
        font-size: 1.2rem;
    }
    
    .btn {
        font-size: 1.4rem;
        padding: 15px 35px;
    }
    
    .game-header {
        font-size: 1.1rem;
        padding: 12px 20px;
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .throw-indicator {
        font-size: 1.1rem;
        padding: 12px 25px;
    }
    
    .result-box {
        padding: 30px;
    }
    
    .result-message {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .instructions {
        padding: 15px;
    }
    
    .circle-preview {
        width: 70px;
        height: 70px;
    }
}