@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;700;900&family=Orbitron:wght@400;700;900&display=swap');

/* ═══════════════════════════════════════════
   ROOT VARIABLES - Only inside game container
   ═══════════════════════════════════════════ */
.galaxy-game-ultimate {
    --grgame-primary: #ff00ff;
    --grgame-secondary: #00ffff;
    --grgame-accent: #ffd700;
    --grgame-danger: #ff0044;
    --grgame-success: #00ff88;
    --grgame-bg-dark: #0a0e27;
    --grgame-bg-darker: #050812;
    --grgame-text-light: #ffffff;
}

/* Reset only for game elements */
.galaxy-game-ultimate *,
.galaxy-game-ultimate *::before,
.galaxy-game-ultimate *::after {
    box-sizing: border-box;
}

/* Main Container */
.galaxy-game-ultimate {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1047 50%, #2d1b69 100%);
    overflow: hidden;
    direction: rtl;
    font-family: 'Vazirmatn', sans-serif;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    min-height: 100dvh;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

/* ═══════════════════════════════════════════
   PARTICLES BACKGROUND
   ═══════════════════════════════════════════ */
.galaxy-game-ultimate .particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.galaxy-game-ultimate .particles-bg::before,
.galaxy-game-ultimate .particles-bg::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: grgame-twinkle 3s infinite ease-in-out;
    box-shadow: 
        100px 200px #fff, 200px 100px #fff, 300px 300px #fff,
        400px 150px #fff, 500px 250px #fff, 600px 350px #fff,
        150px 50px #fff, 250px 400px #fff, 350px 200px #fff,
        450px 300px #fff, 550px 100px #fff, 650px 450px #fff,
        700px 200px #fff, 800px 300px #fff, 900px 150px #fff,
        50px 350px #fff, 150px 250px #fff, 250px 150px #fff;
}

@keyframes grgame-twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* ═══════════════════════════════════════════
   SCREENS
   ═══════════════════════════════════════════ */
.galaxy-game-ultimate > .screen,
.galaxy-game-ultimate .screen:not(.active) {
    display: none !important;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 30px 15px;
    position: relative;
    z-index: 2;
}

.galaxy-game-ultimate > .screen.active,
.galaxy-game-ultimate .screen.active {
    display: flex !important;
    justify-content: center;
    align-items: center;
    animation: grgame-screenFadeIn 0.5s ease;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 30px 15px;
    position: relative;
    z-index: 2;
}

@keyframes grgame-screenFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ═══════════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════════ */
.galaxy-game-ultimate #loadingScreen {
    background: radial-gradient(ellipse at center, #1a1047 0%, #0a0e27 100%);
}

.galaxy-game-ultimate .loading-content {
    text-align: center;
    color: white;
}

.galaxy-game-ultimate .rocket-loader {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
}

.galaxy-game-ultimate .rocket {
    font-size: 60px;
    animation: grgame-rocketFly 2s infinite ease-in-out;
    position: relative;
    z-index: 2;
}

@keyframes grgame-rocketFly {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(-8deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-20px) rotate(8deg); }
}

.galaxy-game-ultimate .flame {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 60px;
    background: linear-gradient(to bottom, 
        rgba(255, 100, 0, 0.8) 0%,
        rgba(255, 200, 0, 0.6) 50%,
        transparent 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: grgame-flameFlicker 0.1s infinite alternate;
    filter: blur(4px);
}

@keyframes grgame-flameFlicker {
    0% { transform: translateX(-50%) scaleY(1); }
    100% { transform: translateX(-50%) scaleY(1.2); }
}

.galaxy-game-ultimate .loading-text {
    font-size: 1.5em;
    font-weight: 700;
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: grgame-gradientShift 3s ease infinite;
    margin-bottom: 20px;
}

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

.galaxy-game-ultimate .progress-bar {
    width: 100%;
    max-width: 350px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.galaxy-game-ultimate .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff00ff, #00ffff);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    animation: grgame-progressGlow 1.5s infinite alternate;
}

@keyframes grgame-progressGlow {
    0% { box-shadow: 0 0 10px rgba(0, 255, 255, 0.5); }
    100% { box-shadow: 0 0 25px rgba(0, 255, 255, 1); }
}

.galaxy-game-ultimate .loading-tip {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95em;
    margin-top: 15px;
}

/* ═══════════════════════════════════════════
   MAIN MENU
   ═══════════════════════════════════════════ */
.galaxy-game-ultimate .main-menu-content {
    text-align: center;
    width: 100%;
    max-width: 500px;
    padding: 0 15px;
}

.galaxy-game-ultimate .game-title {
    margin-bottom: 40px;
    position: relative;
}

.galaxy-game-ultimate .neon-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5em;
    font-weight: 900;
    color: #fff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #ff00ff,
        0 0 40px #ff00ff;
    animation: grgame-neonFlicker 3s infinite alternate;
    margin: 0;
}

@keyframes grgame-neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 
            0 0 10px #00ffff,
            0 0 20px #00ffff,
            0 0 30px #ff00ff,
            0 0 40px #ff00ff;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

.galaxy-game-ultimate .glitch {
    position: relative;
    display: inline-block;
}

.galaxy-game-ultimate .glitch::before,
.galaxy-game-ultimate .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.galaxy-game-ultimate .glitch::before {
    animation: grgame-glitchTop 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.galaxy-game-ultimate .glitch::after {
    animation: grgame-glitchBottom 3s infinite;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes grgame-glitchTop {
    0%, 90%, 100% { transform: translate(0); }
    91% { transform: translate(-4px, -4px); }
    93% { transform: translate(4px, 4px); }
    95% { transform: translate(-4px, 4px); }
}

@keyframes grgame-glitchBottom {
    0%, 85%, 100% { transform: translate(0); }
    86% { transform: translate(4px, 4px); }
    88% { transform: translate(-4px, -4px); }
    90% { transform: translate(4px, -4px); }
}

.galaxy-game-ultimate .subtitle {
    font-size: 1em;
    color: #00ffff;
    margin-top: 10px;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* Player Info Mini */
.galaxy-game-ultimate .player-info-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    margin: 0 auto 30px;
    width: fit-content;
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.galaxy-game-ultimate .player-avatar {
    font-size: 2em;
}

.galaxy-game-ultimate .player-stats-mini {
    text-align: right;
}

.galaxy-game-ultimate .player-name-mini {
    color: white;
    font-weight: 700;
    font-size: 1em;
    margin-bottom: 5px;
}

.galaxy-game-ultimate .player-coins {
    color: #ffd700;
    font-weight: 600;
    font-size: 0.9em;
}

/* Menu Buttons */
.galaxy-game-ultimate .menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.galaxy-game-ultimate .menu-btn {
    position: relative;
    padding: 12px 30px;
    border: none;
    border-radius: 12px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.galaxy-game-ultimate .btn-primary {
    background: linear-gradient(135deg, #ff00ff 0%, #ff0080 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 0, 255, 0.4);
    border: 2px solid transparent;
}

.galaxy-game-ultimate .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 0, 255, 0.6);
    background: linear-gradient(135deg, #ff0080 0%, #ff00ff 100%);
}

.galaxy-game-ultimate .btn-secondary {
    background: rgba(0, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(0, 255, 255, 0.5);
}

.galaxy-game-ultimate .btn-secondary:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.galaxy-game-ultimate .btn-back {
    background: rgba(255, 0, 68, 0.2);
    color: white;
    border: 2px solid rgba(255, 0, 68, 0.5);
}

.galaxy-game-ultimate .btn-back:hover {
    background: rgba(255, 0, 68, 0.3);
    border-color: #ff0044;
}

.galaxy-game-ultimate .btn-icon {
    font-size: 1.2em;
}

.galaxy-game-ultimate .menu-btn:active {
    transform: scale(0.98);
}

.galaxy-game-ultimate .version-info {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85em;
    margin-top: 15px;
}

/* ═══════════════════════════════════════════
   PLAYER SETUP
   ═══════════════════════════════════════════ */
.galaxy-game-ultimate .setup-content {
    width: 100%;
    max-width: 700px;
    background: rgba(0, 0, 0, 0.5);
    padding: 30px 20px;
    border-radius: 16px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.galaxy-game-ultimate .screen-title {
    text-align: center;
    font-size: 2em;
    color: white;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

.galaxy-game-ultimate .input-group {
    margin-bottom: 25px;
}

.galaxy-game-ultimate .input-group label {
    display: block;
    color: #00ffff;
    font-size: 1em;
    margin-bottom: 8px;
    font-weight: 700;
}

.galaxy-game-ultimate .fancy-input {
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    font-size: 1em;
    font-family: 'Vazirmatn', sans-serif;
    text-align: center;
    transition: all 0.3s ease;
}

.galaxy-game-ultimate .fancy-input:focus {
    outline: none;
    border-color: #00ffff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.galaxy-game-ultimate .fancy-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Difficulty Selector */
.galaxy-game-ultimate .difficulty-selector {
    margin-bottom: 25px;
}

.galaxy-game-ultimate .difficulty-selector label {
    display: block;
    color: #00ffff;
    font-size: 1em;
    margin-bottom: 12px;
    font-weight: 700;
}

.galaxy-game-ultimate .difficulty-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.galaxy-game-ultimate .difficulty-btn {
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.galaxy-game-ultimate .difficulty-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.galaxy-game-ultimate .difficulty-btn.active {
    border-color: #00ffff;
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

.galaxy-game-ultimate .diff-icon {
    font-size: 2em;
}

.galaxy-game-ultimate .diff-name {
    color: white;
    font-weight: 700;
    font-size: 0.9em;
}

/* Ship Selector */
.galaxy-game-ultimate .ship-selector {
    margin-bottom: 25px;
}

.galaxy-game-ultimate .ship-selector label {
    display: block;
    color: #00ffff;
    font-size: 1em;
    margin-bottom: 12px;
    font-weight: 700;
}

.galaxy-game-ultimate .ships-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.galaxy-game-ultimate .ship-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.galaxy-game-ultimate .ship-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.galaxy-game-ultimate .ship-card.selected {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.galaxy-game-ultimate .ship-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.galaxy-game-ultimate .ship-icon {
    font-size: 3em;
    margin-bottom: 8px;
    text-align: center;
}

.galaxy-game-ultimate .ship-name {
    color: white;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.galaxy-game-ultimate .ship-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.galaxy-game-ultimate .ship-stat {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8em;
}

.galaxy-game-ultimate .ship-price {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffd700;
    padding: 4px 8px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.8em;
}

.galaxy-game-ultimate .setup-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ═══════════════════════════════════════════
   GAME SCREEN
   ═══════════════════════════════════════════ */
.galaxy-game-ultimate #gameScreen {
    padding: 0 !important;
}

.galaxy-game-ultimate > #gameScreen.active,
.galaxy-game-ultimate #gameScreen.active {
    display: block !important;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0 !important;
}

.galaxy-game-ultimate .game-hud-top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    position: relative;
    z-index: 10;
    justify-content: space-between;
    align-items: flex-start;
}

.galaxy-game-ultimate .hud-left,
.galaxy-game-ultimate .hud-right,
.galaxy-game-ultimate .hud-center {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.galaxy-game-ultimate .hud-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 12px;
    border-radius: 20px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    font-size: 0.9em;
}

.galaxy-game-ultimate .stat-icon {
    font-size: 1.2em;
}

.galaxy-game-ultimate .stat-label {
    color: #00ffff;
    font-weight: 700;
    font-size: 0.85em;
}

.galaxy-game-ultimate .stat-value {
    color: white;
    font-size: 1.1em;
    font-weight: 900;
    min-width: 40px;
    text-align: left;
}

/* Combo Display */
.galaxy-game-ultimate .combo-display {
    background: linear-gradient(135deg, #ff00ff 0%, #ff0080 100%);
    border-color: #ff00ff;
    animation: grgame-comboPulse 0.5s infinite alternate;
}

@keyframes grgame-comboPulse {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 0, 255, 0.5); }
    100% { transform: scale(1.05); box-shadow: 0 0 25px rgba(255, 0, 255, 1); }
}

.galaxy-game-ultimate .combo-text {
    color: white;
    font-weight: 900;
    font-size: 0.8em;
}

.galaxy-game-ultimate .combo-value {
    color: #ffd700;
    font-size: 1.2em;
    font-weight: 900;
}

.galaxy-game-ultimate .combo-multiplier {
    color: white;
    font-size: 1em;
}

/* Level Display */
.galaxy-game-ultimate .level-display {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffd700;
    border-radius: 12px;
    padding: 8px 20px;
    text-align: center;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.galaxy-game-ultimate .level-label {
    color: #ffd700;
    font-size: 0.75em;
    font-weight: 700;
    display: block;
}

.galaxy-game-ultimate .level-value {
    color: white;
    font-size: 2em;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    display: block;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Wave Progress */
.galaxy-game-ultimate .wave-progress {
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 12px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    min-width: 150px;
}

.galaxy-game-ultimate .wave-text {
    color: #00ffff;
    font-weight: 700;
    display: block;
    text-align: center;
    margin-bottom: 6px;
    font-size: 0.85em;
}

.galaxy-game-ultimate .wave-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.galaxy-game-ultimate .wave-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #00ff88);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}

/* Health Bar */
.galaxy-game-ultimate .health-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 12px;
    border-radius: 20px;
    border: 2px solid rgba(255, 0, 68, 0.5);
}

.galaxy-game-ultimate .health-icon {
    font-size: 1.2em;
}

.galaxy-game-ultimate .health-bar-bg {
    width: 100px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 0, 68, 0.3);
}

.galaxy-game-ultimate .health-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0044, #ff6b9d);
    width: 100%;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(255, 0, 68, 0.8);
}

.galaxy-game-ultimate .health-text {
    color: white;
    font-weight: 900;
    font-size: 1em;
    min-width: 35px;
}

/* Shield Bar */
.galaxy-game-ultimate .shield-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 12px;
    border-radius: 20px;
    border: 2px solid rgba(0, 136, 255, 0.5);
}

.galaxy-game-ultimate .shield-icon {
    font-size: 1.2em;
}

.galaxy-game-ultimate .shield-bar-bg {
    width: 100px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 136, 255, 0.3);
}

.galaxy-game-ultimate .shield-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0088ff, #00ddff);
    width: 100%;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(0, 136, 255, 0.8);
}

/* Special Attack Button */
.galaxy-game-ultimate .special-attack {
    position: relative;
}

.galaxy-game-ultimate .special-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff00ff, #ff0080);
    border: 2px solid #ff00ff;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.galaxy-game-ultimate .special-btn:not(:disabled):hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 0, 255, 1);
}

.galaxy-game-ultimate .special-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.galaxy-game-ultimate .special-icon {
    font-size: 1.5em;
}

.galaxy-game-ultimate .special-cooldown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    transition: transform 0.1s linear;
    transform-origin: center;
}

/* Fullscreen Button */
.galaxy-game-ultimate #gameScreen .fullscreen-btn-container,
.galaxy-game-ultimate #mainMenu .fullscreen-btn-container {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
}

.galaxy-game-ultimate #gameScreen .pause-btn-container {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1000;
}

.galaxy-game-ultimate .pause-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff4444, #ff6666);
    border: 2px solid #ff4444;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
}

.galaxy-game-ultimate .pause-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 68, 68, 1);
    background: linear-gradient(135deg, #ff6666, #ff4444);
}

.galaxy-game-ultimate .pause-btn:active {
    transform: scale(0.95);
}

.galaxy-game-ultimate .pause-icon {
    font-size: 1.5em;
    color: white;
    font-weight: bold;
}

.galaxy-game-ultimate .fullscreen-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: 2px solid #ffd700;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.galaxy-game-ultimate .fullscreen-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 1);
    background: linear-gradient(135deg, #ffed4e, #ffd700);
}

.galaxy-game-ultimate .fullscreen-btn:active {
    transform: scale(0.95);
}

.galaxy-game-ultimate .fullscreen-icon {
    font-size: 1.5em;
    color: #000;
    font-weight: bold;
}

/* Fullscreen state */
.galaxy-game-ultimate.is-fullscreen {
    margin: 0 !important;
    border-radius: 0 !important;
    max-width: none !important;
    width: 100vw !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 999999 !important;
    background: #0a0e27 !important;
    color: white !important;
}

/* تمام عناصر پس‌زمینه باید pointer-events: none داشته باشند */
.galaxy-game-ultimate.is-fullscreen .particles-bg,
.galaxy-game-ultimate.is-fullscreen .menu-stars,
.galaxy-game-ultimate.is-fullscreen .particles-bg::before,
.galaxy-game-ultimate.is-fullscreen .particles-bg::after {
    pointer-events: none !important;
}

/* استایل برای overlay در حالت fullscreen */
#fullscreen-overlay {
    pointer-events: none !important;
    z-index: 0 !important;
}

/* استایل برای حالت fullscreen API (نه فقط CSS) */
.galaxy-game-ultimate:fullscreen,
.galaxy-game-ultimate:-webkit-full-screen,
.galaxy-game-ultimate:-moz-full-screen,
.galaxy-game-ultimate:-ms-fullscreen {
    pointer-events: auto !important;
}

.galaxy-game-ultimate:fullscreen .screen.active,
.galaxy-game-ultimate:-webkit-full-screen .screen.active,
.galaxy-game-ultimate:-moz-full-screen .screen.active,
.galaxy-game-ultimate:-ms-fullscreen .screen.active {
    pointer-events: auto !important;
    z-index: 10 !important;
    position: relative !important;
}

.galaxy-game-ultimate:fullscreen #mainMenu.active,
.galaxy-game-ultimate:-webkit-full-screen #mainMenu.active,
.galaxy-game-ultimate:-moz-full-screen #mainMenu.active,
.galaxy-game-ultimate:-ms-fullscreen #mainMenu.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: auto !important;
    z-index: 10 !important;
    position: relative !important;
}

.galaxy-game-ultimate:fullscreen .menu-buttons,
.galaxy-game-ultimate:-webkit-full-screen .menu-buttons,
.galaxy-game-ultimate:-moz-full-screen .menu-buttons,
.galaxy-game-ultimate:-ms-fullscreen .menu-buttons {
    pointer-events: auto !important;
    z-index: 100 !important;
    position: relative !important;
}

.galaxy-game-ultimate:fullscreen .menu-btn,
.galaxy-game-ultimate:fullscreen button,
.galaxy-game-ultimate:fullscreen a,
.galaxy-game-ultimate:-webkit-full-screen .menu-btn,
.galaxy-game-ultimate:-webkit-full-screen button,
.galaxy-game-ultimate:-webkit-full-screen a,
.galaxy-game-ultimate:-moz-full-screen .menu-btn,
.galaxy-game-ultimate:-moz-full-screen button,
.galaxy-game-ultimate:-moz-full-screen a,
.galaxy-game-ultimate:-ms-fullscreen .menu-btn,
.galaxy-game-ultimate:-ms-fullscreen button,
.galaxy-game-ultimate:-ms-fullscreen a {
    pointer-events: auto !important;
    z-index: 100 !important;
    position: relative !important;
    cursor: pointer !important;
}

.galaxy-game-ultimate:fullscreen .main-menu-content,
.galaxy-game-ultimate:-webkit-full-screen .main-menu-content,
.galaxy-game-ultimate:-moz-full-screen .main-menu-content,
.galaxy-game-ultimate:-ms-fullscreen .main-menu-content {
    pointer-events: auto !important;
    z-index: 50 !important;
    position: relative !important;
}

.galaxy-game-ultimate:fullscreen .particles-bg,
.galaxy-game-ultimate:fullscreen .menu-stars,
.galaxy-game-ultimate:-webkit-full-screen .particles-bg,
.galaxy-game-ultimate:-webkit-full-screen .menu-stars,
.galaxy-game-ultimate:-moz-full-screen .particles-bg,
.galaxy-game-ultimate:-moz-full-screen .menu-stars,
.galaxy-game-ultimate:-ms-fullscreen .particles-bg,
.galaxy-game-ultimate:-ms-fullscreen .menu-stars {
    pointer-events: none !important;
}

.galaxy-game-ultimate.is-fullscreen .screen.active {
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

.galaxy-game-ultimate.is-fullscreen #mainMenu.active {
    height: 100vh !important;
    height: 100dvh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

.galaxy-game-ultimate.is-fullscreen .menu-buttons {
    pointer-events: auto !important;
    z-index: 100 !important;
    position: relative !important;
}

.galaxy-game-ultimate.is-fullscreen .menu-btn,
.galaxy-game-ultimate.is-fullscreen button,
.galaxy-game-ultimate.is-fullscreen a,
.galaxy-game-ultimate.is-fullscreen input,
.galaxy-game-ultimate.is-fullscreen select {
    pointer-events: auto !important;
    z-index: 100 !important;
    position: relative !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
}

.galaxy-game-ultimate.is-fullscreen .main-menu-content {
    pointer-events: auto !important;
    z-index: 50 !important;
    position: relative !important;
}

.galaxy-game-ultimate.is-fullscreen #gameScreen.active {
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden !important;
    padding: 0 !important;
    display: block !important;
}

.galaxy-game-ultimate.is-fullscreen .screen.active:not(#gameScreen) {
    display: flex !important;
    flex-direction: column !important;
}

.galaxy-game-ultimate.is-fullscreen #gameScreen.active {
    display: block !important;
}

.galaxy-game-ultimate.is-fullscreen #gameCanvas {
    width: 100% !important;
    max-width: 100vw !important;
    height: calc(100vh - 80px) !important;
    height: calc(100dvh - 80px) !important;
    min-height: calc(100vh - 80px) !important;
    min-height: calc(100dvh - 80px) !important;
    max-height: calc(100vh - 80px) !important;
    max-height: calc(100dvh - 80px) !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.galaxy-game-ultimate.is-fullscreen .game-controls-mobile.active {
    display: flex !important;
    pointer-events: auto !important;
    z-index: 100 !important;
}

.galaxy-game-ultimate #gameCanvas.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.galaxy-game-ultimate.is-fullscreen .game-hud-top {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 10 !important;
}

/* آیکون fullscreen در template تعریف شده، نیازی به ::before نیست */

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .galaxy-game-ultimate.is-fullscreen {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100% !important;
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
        overflow: hidden !important;
    }
    
    .galaxy-game-ultimate.is-fullscreen .screen.active {
        height: 100vh !important;
        height: 100% !important;
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        position: relative !important;
        z-index: 10 !important;
        pointer-events: auto !important;
    }
    
    .galaxy-game-ultimate.is-fullscreen #mainMenu.active {
        height: 100vh !important;
        height: 100% !important;
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        z-index: 10 !important;
        pointer-events: auto !important;
    }
    
    .galaxy-game-ultimate.is-fullscreen .menu-buttons {
        pointer-events: auto !important;
        z-index: 30 !important;
        position: relative !important;
    }
    
    .galaxy-game-ultimate.is-fullscreen .menu-btn,
    .galaxy-game-ultimate.is-fullscreen button,
    .galaxy-game-ultimate.is-fullscreen a,
    .galaxy-game-ultimate.is-fullscreen input,
    .galaxy-game-ultimate.is-fullscreen select {
        pointer-events: auto !important;
        z-index: 30 !important;
        position: relative !important;
        cursor: pointer !important;
    }
    
    .galaxy-game-ultimate.is-fullscreen .main-menu-content {
        pointer-events: auto !important;
        z-index: 25 !important;
        position: relative !important;
    }

    .galaxy-game-ultimate.is-fullscreen #gameScreen.active {
        height: 100vh !important;
        height: 100% !important;
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
        overflow: hidden !important;
        display: block !important;
    }
    
    .galaxy-game-ultimate.is-fullscreen .screen.active:not(#gameScreen) {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .galaxy-game-ultimate.is-fullscreen #gameScreen.active {
        display: block !important;
    }
    
    .galaxy-game-ultimate.is-fullscreen #gameCanvas {
        height: calc(100vh - 80px) !important;
        height: calc(100% - 80px) !important;
        height: calc(-webkit-fill-available - 80px) !important;
        min-height: calc(100vh - 80px) !important;
        min-height: calc(100% - 80px) !important;
        min-height: calc(-webkit-fill-available - 80px) !important;
        max-height: calc(100vh - 80px) !important;
        max-height: calc(100% - 80px) !important;
        max-height: calc(-webkit-fill-available - 80px) !important;
    }
    
    .galaxy-game-ultimate.is-fullscreen .game-controls-mobile.active {
        display: flex !important;
        pointer-events: auto !important;
        z-index: 100 !important;
    }
}

/* استایل برای body در حالت fullscreen - جلوگیری از scroll */
body:has(.galaxy-game-ultimate.is-fullscreen) {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

html:has(.galaxy-game-ultimate.is-fullscreen) {
    overflow: hidden !important;
}

/* اضافه کردن استایل برای دکمه fullscreen در موبایل */
@media (max-width: 768px) {
    .galaxy-game-ultimate .fullscreen-btn {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
        touch-action: manipulation;
        cursor: pointer;
        z-index: 1000;
    }
    
    /* تمام صفحات در حالت fullscreen */
    .galaxy-game-ultimate.is-fullscreen .screen {
        width: 100vw !important;
        width: 100% !important;
        pointer-events: auto !important;
    }
    
    .galaxy-game-ultimate.is-fullscreen .menu-buttons {
        pointer-events: auto !important;
        z-index: 30 !important;
        position: relative !important;
    }
    
    .galaxy-game-ultimate.is-fullscreen .menu-btn,
    .galaxy-game-ultimate.is-fullscreen button,
    .galaxy-game-ultimate.is-fullscreen a,
    .galaxy-game-ultimate.is-fullscreen input,
    .galaxy-game-ultimate.is-fullscreen select {
        pointer-events: auto !important;
        z-index: 30 !important;
        position: relative !important;
        cursor: pointer !important;
    }
    
    .galaxy-game-ultimate.is-fullscreen .main-menu-content {
        pointer-events: auto !important;
        z-index: 25 !important;
        position: relative !important;
    }
}

/* صفحه ورود - Login Redirect Screen */
#loginRedirectScreen {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1047 50%, #2d1b69 100%) !important;
    background-attachment: relative !important;
}

#loginRedirectScreen .login-redirect-content {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#loginRedirectScreen .fullscreen-hint {
    position: relative;
    overflow: hidden;
}
#loginRedirectScreen .fullscreen-hint::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    animation: grgame-shine 3s infinite;
    pointer-events: none;
}

@keyframes grgame-shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

#loginRedirectScreen button:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8) !important;
}

#loginRedirectScreen button:active {
    transform: scale(0.95) !important;
}

/* Responsive برای صفحه ورود */
@media (max-width: 768px) {
    #loginRedirectScreen .login-redirect-content {
        padding: 30px 20px !important;
        margin: 20px !important;
    }
    
    #loginRedirectScreen h2 {
        font-size: 1.3em !important;
    }
    
    #loginRedirectScreen .fullscreen-hint {
        padding: 15px !important;
    }
}

/* Game Canvas */
.galaxy-game-ultimate #gameCanvas {
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    min-height: 400px;
    background: radial-gradient(ellipse at center, #1a1047 0%, #0a0e27 100%);
    border: 2px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    touch-action: none;
}

/* بهبود ارتفاع canvas در موبایل */
@media (max-width: 768px) {
    .galaxy-game-ultimate #gameScreen {
        position: relative;
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    .galaxy-game-ultimate #gameCanvas {
        aspect-ratio: auto;
        width: 100% !important;
        height: calc(100vh - 80px) !important;
        height: calc(100dvh - 80px) !important;
        min-height: calc(100vh - 80px) !important;
        min-height: calc(100dvh - 80px) !important;
        max-height: calc(100vh - 80px) !important;
        max-height: calc(100dvh - 80px) !important;
        object-fit: contain;
    }
    
    .galaxy-game-ultimate.is-fullscreen #gameCanvas {
        height: calc(100vh - 80px) !important;
        height: calc(100dvh - 80px) !important;
        min-height: calc(100vh - 80px) !important;
        min-height: calc(100dvh - 80px) !important;
        max-height: calc(100vh - 80px) !important;
        max-height: calc(100dvh - 80px) !important;
    }
    
    .galaxy-game-ultimate.is-fullscreen .game-controls-mobile.active {
        display: flex !important;
        pointer-events: auto !important;
        z-index: 100 !important;
    }
    
    /* اطمینان از اینکه joystick داخل canvas قرار می‌گیرد */
    .galaxy-game-ultimate .game-controls-mobile {
        bottom: 10px;
        padding: 0 10px;
    }
}

/* Boss Health Bar */
.galaxy-game-ultimate .boss-health-container {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.9);
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #ff0044;
    box-shadow: 0 0 30px rgba(255, 0, 68, 0.6);
    z-index: 20;
    animation: grgame-bossEntrance 1s ease;
}

@keyframes grgame-bossEntrance {
    from {
        transform: translateX(-50%) translateY(-80px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.galaxy-game-ultimate .boss-name {
    color: #ff0044;
    font-size: 1.2em;
    font-weight: 900;
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(255, 0, 68, 1);
    font-family: 'Orbitron', sans-serif;
}

.galaxy-game-ultimate .boss-health-bar {
    height: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #ff0044;
    margin-bottom: 8px;
}

.galaxy-game-ultimate .boss-health-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0044, #ff6b9d);
    width: 100%;
    transition: width 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 0, 68, 1);
    animation: grgame-bossHealthPulse 1s infinite alternate;
}

@keyframes grgame-bossHealthPulse {
    0% { box-shadow: 0 0 10px rgba(255, 0, 68, 0.5); }
    100% { box-shadow: 0 0 25px rgba(255, 0, 68, 1); }
}

.galaxy-game-ultimate .boss-phase {
    color: #ffd700;
    text-align: center;
    font-weight: 700;
    font-size: 0.95em;
}

/* Power-ups Display */
.galaxy-game-ultimate .powerups-display {
    position: absolute;
    top: 90px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 15;
}

.galaxy-game-ultimate .active-powerup {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    border-radius: 20px;
    border: 2px solid #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
    animation: grgame-powerupEnter 0.3s ease;
}

@keyframes grgame-powerupEnter {
    from {
        transform: translateX(80px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.galaxy-game-ultimate .powerup-icon {
    font-size: 1.2em;
}

.galaxy-game-ultimate .powerup-info {
    color: white;
}

.galaxy-game-ultimate .powerup-name {
    font-weight: 700;
    font-size: 0.8em;
    display: block;
}

.galaxy-game-ultimate .powerup-timer {
    font-size: 0.75em;
    color: #00ff88;
}

/* Notifications */
.galaxy-game-ultimate .notification-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 100;
}

.galaxy-game-ultimate .notification {
    background: rgba(0, 0, 0, 0.9);
    padding: 15px 30px;
    border-radius: 12px;
    color: white;
    font-size: 1.5em;
    font-weight: 900;
    text-align: center;
    margin: 8px 0;
    animation: grgame-notificationPop 2s ease forwards;
    border: 2px solid;
    box-shadow: 0 0 30px;
}

.galaxy-game-ultimate .notification.level-up {
    border-color: #ffd700;
    color: #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
}

.galaxy-game-ultimate .notification.achievement {
    border-color: #00ff88;
    color: #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.8);
}

.galaxy-game-ultimate .notification.warning {
    border-color: #ff0044;
    color: #ff0044;
    box-shadow: 0 0 30px rgba(255, 0, 68, 0.8);
}

@keyframes grgame-notificationPop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        transform: scale(1.2) rotate(5deg);
        opacity: 1;
    }
    20% {
        transform: scale(1) rotate(-5deg);
    }
    30% {
        transform: scale(1) rotate(0deg);
    }
    80% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
}

/* Mobile Controls */
.galaxy-game-ultimate .game-controls-mobile {
    display: none;
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    padding: 0 15px;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 50;
    pointer-events: auto;
}

.galaxy-game-ultimate .game-controls-mobile.active {
    display: flex !important;
    pointer-events: auto !important;
}

.galaxy-game-ultimate .joystick {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15), rgba(0, 136, 255, 0.25));
    border: 3px solid rgba(0, 255, 255, 0.6);
    border-radius: 50%;
    position: relative;
    box-shadow: 
        0 0 25px rgba(0, 255, 255, 0.4),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    touch-action: none;
    animation: grgame-joystick-pulse 2s infinite;
    backdrop-filter: blur(5px);
}

@keyframes grgame-joystick-pulse {
    0%, 100% {
        box-shadow: 
            0 0 25px rgba(0, 255, 255, 0.4),
            inset 0 0 20px rgba(0, 255, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 0 35px rgba(0, 255, 255, 0.6),
            inset 0 0 25px rgba(0, 255, 255, 0.2);
    }
}

.galaxy-game-ultimate .joystick::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px dashed rgba(0, 255, 255, 0.3);
    top: 0;
    left: 0;
    animation: grgame-joystick-rotate 8s linear infinite;
}

@keyframes grgame-joystick-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.galaxy-game-ultimate .joystick-knob {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, #00ffff, #0088ff, #004466);
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 1),
        inset 0 0 10px rgba(255, 255, 255, 0.3),
        0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.1s ease;
}

.galaxy-game-ultimate .joystick-knob::after {
    content: '⊕';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2em;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.galaxy-game-ultimate .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.galaxy-game-ultimate .action-btn {
    width: 75px;
    height: 75px;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.3), rgba(128, 0, 255, 0.4));
    border: 3px solid #ff00ff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 
        0 0 25px rgba(255, 0, 255, 0.6),
        inset 0 0 15px rgba(255, 0, 255, 0.2),
        0 4px 15px rgba(0, 0, 0, 0.3);
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    backdrop-filter: blur(5px);
}

.galaxy-game-ultimate .action-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 0, 255, 0.4);
    animation: grgame-button-ripple 2s infinite;
}

@keyframes grgame-button-ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.galaxy-game-ultimate .action-btn:active {
    transform: scale(0.85);
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.6), rgba(128, 0, 255, 0.7));
    box-shadow: 
        0 0 35px rgba(255, 0, 255, 0.9),
        inset 0 0 20px rgba(255, 0, 255, 0.4);
}

.galaxy-game-ultimate .action-btn .btn-icon {
    font-size: 1.8em;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
    position: relative;
    z-index: 1;
}

.galaxy-game-ultimate .shoot-btn {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3), rgba(0, 136, 255, 0.4));
    border-color: #00ffff;
    box-shadow: 
        0 0 25px rgba(0, 255, 255, 0.6),
        inset 0 0 15px rgba(0, 255, 255, 0.2),
        0 4px 15px rgba(0, 0, 0, 0.3);
}

.galaxy-game-ultimate .shoot-btn::before {
    border-color: rgba(0, 255, 255, 0.4);
}

.galaxy-game-ultimate .shoot-btn:active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.6), rgba(0, 136, 255, 0.7));
    box-shadow: 
        0 0 35px rgba(0, 255, 255, 0.9),
        inset 0 0 20px rgba(0, 255, 255, 0.4);
}

/* Pause Overlay */
.galaxy-game-ultimate .pause-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
}

.galaxy-game-ultimate .pause-menu {
    background: rgba(26, 16, 71, 0.9);
    padding: 30px;
    border-radius: 16px;
    border: 2px solid #00ffff;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
}

.galaxy-game-ultimate .pause-menu h2 {
    color: white;
    font-size: 2.5em;
    margin-bottom: 25px;
}

.galaxy-game-ultimate .pause-stats {
    color: white;
    margin-bottom: 25px;
}

.galaxy-game-ultimate .pause-stats p {
    font-size: 1.2em;
    margin: 8px 0;
}

.galaxy-game-ultimate .pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ═══════════════════════════════════════════
   SHOP SCREEN
   ═══════════════════════════════════════════ */
.galaxy-game-ultimate .shop-content {
    width: 100%;
    max-width: 900px;
    background: rgba(0, 0, 0, 0.5);
    padding: 30px 20px;
    border-radius: 16px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
}

.galaxy-game-ultimate .player-coins-display {
    text-align: center;
    font-size: 1.5em;
    color: #ffd700;
    font-weight: 900;
    margin-bottom: 25px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.galaxy-game-ultimate .shop-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.galaxy-game-ultimate .shop-tab {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    font-size: 0.95em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.galaxy-game-ultimate .shop-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.galaxy-game-ultimate .shop-tab.active {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.galaxy-game-ultimate .shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    min-height: 300px;
}

.galaxy-game-ultimate .shop-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.galaxy-game-ultimate .shop-item:hover {
    transform: translateY(-8px);
    border-color: #ffd700;
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
}

.galaxy-game-ultimate .shop-item.owned {
    border-color: #00ff88;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.1));
}

.galaxy-game-ultimate .shop-item.locked {
    opacity: 0.6;
}

.galaxy-game-ultimate .item-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #00ff88;
    color: #000;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: 700;
}

.galaxy-game-ultimate .item-badge.new {
    background: #ff00ff;
    color: white;
    animation: grgame-badgePulse 1s infinite alternate;
}

@keyframes grgame-badgePulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.galaxy-game-ultimate .item-icon {
    font-size: 3.5em;
    text-align: center;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

.galaxy-game-ultimate .item-name {
    color: white;
    font-size: 1.1em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.galaxy-game-ultimate .item-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
    text-align: center;
    margin-bottom: 12px;
    min-height: 35px;
}

.galaxy-game-ultimate .item-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.galaxy-game-ultimate .item-stat-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.galaxy-game-ultimate .stat-name {
    color: #00ffff;
    font-size: 0.8em;
    min-width: 60px;
}

.galaxy-game-ultimate .stat-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.galaxy-game-ultimate .stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #00ff88);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

.galaxy-game-ultimate .item-price {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.galaxy-game-ultimate .price-amount {
    color: #ffd700;
    font-size: 1.1em;
    font-weight: 900;
}

.galaxy-game-ultimate .buy-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    border: none;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.galaxy-game-ultimate .buy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
}

.galaxy-game-ultimate .buy-btn:disabled {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

.galaxy-game-ultimate .buy-btn.owned {
    background: #00ff88;
    cursor: default;
}

/* ═══════════════════════════════════════════
   ACHIEVEMENTS SCREEN
   ═══════════════════════════════════════════ */
.galaxy-game-ultimate .achievements-content {
    width: 100%;
    max-width: 900px;
    background: rgba(0, 0, 0, 0.5);
    padding: 30px 20px;
    border-radius: 16px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
}

.galaxy-game-ultimate .achievements-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.galaxy-game-ultimate .achievement-stat {
    text-align: center;
}

.galaxy-game-ultimate .stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.galaxy-game-ultimate .achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.galaxy-game-ultimate .achievement-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.galaxy-game-ultimate .achievement-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
}

.galaxy-game-ultimate .achievement-card.unlocked {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.3);
}

.galaxy-game-ultimate .achievement-card.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.galaxy-game-ultimate .achievement-icon {
    font-size: 3em;
    text-align: center;
    margin-bottom: 12px;
}

.galaxy-game-ultimate .achievement-name {
    color: white;
    font-size: 1em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.galaxy-game-ultimate .achievement-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
    text-align: center;
    margin-bottom: 12px;
}

.galaxy-game-ultimate .achievement-reward {
    text-align: center;
    color: #ffd700;
    font-weight: 700;
    font-size: 0.9em;
}

.galaxy-game-ultimate .achievement-progress {
    margin-top: 8px;
}

.galaxy-game-ultimate .progress-text {
    color: #00ffff;
    font-size: 0.85em;
    text-align: center;
    margin-bottom: 4px;
}

.galaxy-game-ultimate .progress-bar-achievement {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.galaxy-game-ultimate .progress-fill-achievement {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #00ff88);
    transition: width 0.3s ease;
}

/* ═══════════════════════════════════════════
   LEADERBOARD SCREEN
   ═══════════════════════════════════════════ */
.galaxy-game-ultimate .leaderboard-content {
    width: 100%;
    max-width: 800px;
    background: rgba(0, 0, 0, 0.5);
    padding: 30px 20px;
    border-radius: 16px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
}

.galaxy-game-ultimate .leaderboard-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.galaxy-game-ultimate .filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.galaxy-game-ultimate .filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.galaxy-game-ultimate .filter-btn.active {
    background: #ffd700;
    color: #000;
    border-color: #ffd700;
}

.galaxy-game-ultimate .leaderboard-list {
    margin-bottom: 25px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.galaxy-game-ultimate .leaderboard-list::-webkit-scrollbar {
    width: 6px;
}

.galaxy-game-ultimate .leaderboard-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.galaxy-game-ultimate .leaderboard-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff00ff, #00ffff);
    border-radius: 10px;
}

.galaxy-game-ultimate .leaderboard-item {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    gap: 12px;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.galaxy-game-ultimate .leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-4px);
}

.galaxy-game-ultimate .leaderboard-item.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.1));
    border-color: #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

.galaxy-game-ultimate .leaderboard-item.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.3), rgba(192, 192, 192, 0.1));
    border-color: #c0c0c0;
}

.galaxy-game-ultimate .leaderboard-item.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.3), rgba(205, 127, 50, 0.1));
    border-color: #cd7f32;
}

.galaxy-game-ultimate .rank {
    font-size: 1.5em;
    font-weight: 900;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
}

.galaxy-game-ultimate .rank-1 .rank {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.galaxy-game-ultimate .rank-2 .rank {
    color: #c0c0c0;
    text-shadow: 0 0 8px rgba(192, 192, 192, 0.8);
}

.galaxy-game-ultimate .rank-3 .rank {
    color: #cd7f32;
    text-shadow: 0 0 8px rgba(205, 127, 50, 0.8);
}

.galaxy-game-ultimate .player-info {
    display: flex;
    flex-direction: column;
}

.galaxy-game-ultimate .name {
    color: white;
    font-size: 1em;
    font-weight: 700;
    margin-bottom: 4px;
}

.galaxy-game-ultimate .player-details {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85em;
}

.galaxy-game-ultimate .score {
    color: #00ffff;
    font-size: 1.2em;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
}

.galaxy-game-ultimate .level {
    color: #ffd700;
    font-size: 1em;
    font-weight: 700;
}

/* ═══════════════════════════════════════════
   INSTRUCTIONS SCREEN
   ═══════════════════════════════════════════ */
.galaxy-game-ultimate .instructions-content {
    width: 100%;
    max-width: 700px;
    background: rgba(0, 0, 0, 0.5);
    padding: 30px 20px;
    border-radius: 16px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.galaxy-game-ultimate .instructions-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.galaxy-game-ultimate .inst-tab {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.galaxy-game-ultimate .inst-tab:hover {
    background: rgba(255, 255, 255, 0.15);
}

.galaxy-game-ultimate .inst-tab.active {
    background: #00ffff;
    color: #000;
    border-color: #00ffff;
}

.galaxy-game-ultimate .instructions-panel {
    min-height: 300px;
    color: white;
}

.galaxy-game-ultimate .instruction-section {
    margin-bottom: 25px;
}

.galaxy-game-ultimate .instruction-section h3 {
    color: #00ffff;
    font-size: 1.3em;
    margin-bottom: 12px;
}

.galaxy-game-ultimate .controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.galaxy-game-ultimate .control-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.galaxy-game-ultimate .control-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-4px);
}

.galaxy-game-ultimate .key,
.galaxy-game-ultimate .emoji {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 255, 0.2);
    border: 2px solid #00ffff;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
}

.galaxy-game-ultimate .emoji {
    font-size: 1.5em;
    border: none;
    background: transparent;
}

.galaxy-game-ultimate .control-desc {
    flex: 1;
    font-size: 0.9em;
}

.galaxy-game-ultimate .enemies-grid,
.galaxy-game-ultimate .powerups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.galaxy-game-ultimate .enemy-item,
.galaxy-game-ultimate .powerup-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.galaxy-game-ultimate .enemy-item:hover,
.galaxy-game-ultimate .powerup-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.galaxy-game-ultimate .item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.galaxy-game-ultimate .item-emoji {
    font-size: 2.5em;
}

.galaxy-game-ultimate .item-title {
    font-size: 1em;
    font-weight: 700;
    color: white;
}

.galaxy-game-ultimate .item-desc {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    font-size: 0.9em;
}

.galaxy-game-ultimate .tips-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.galaxy-game-ultimate .tip-item {
    background: rgba(0, 255, 136, 0.1);
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #00ff88;
    transition: all 0.3s ease;
}

.galaxy-game-ultimate .tip-item:hover {
    background: rgba(0, 255, 136, 0.15);
    transform: translateX(8px);
}

.galaxy-game-ultimate .tip-title {
    color: #00ff88;
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.galaxy-game-ultimate .tip-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    font-size: 0.9em;
}

/* ═══════════════════════════════════════════
   SETTINGS SCREEN
   ═══════════════════════════════════════════ */
.galaxy-game-ultimate .settings-content {
    width: 100%;
    max-width: 550px;
    background: rgba(0, 0, 0, 0.5);
    padding: 30px 20px;
    border-radius: 16px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.galaxy-game-ultimate .settings-group {
    margin-bottom: 25px;
}

.galaxy-game-ultimate .settings-group label {
    display: block;
    color: #00ffff;
    font-size: 1em;
    font-weight: 700;
    margin-bottom: 12px;
}

.galaxy-game-ultimate .slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.galaxy-game-ultimate input[type="range"] {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.galaxy-game-ultimate input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #00ffff, #0088ff);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.galaxy-game-ultimate input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #00ffff, #0088ff);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    border: none;
}

.galaxy-game-ultimate .slider-value {
    min-width: 50px;
    color: white;
    font-weight: 700;
    font-size: 1em;
}

.galaxy-game-ultimate .fancy-select {
    width: 100%;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    color: white;
    font-size: 1em;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.galaxy-game-ultimate .fancy-select:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.galaxy-game-ultimate .fancy-select option {
    background: #1a1047;
    color: white;
}

.galaxy-game-ultimate .checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.galaxy-game-ultimate .checkbox-label:hover {
    background: rgba(255, 255, 255, 0.1);
}

.galaxy-game-ultimate .checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.galaxy-game-ultimate .checkbox-label span {
    color: white;
    font-size: 1em;
}

/* ═══════════════════════════════════════════
   GAME OVER SCREEN
   ═══════════════════════════════════════════ */
.galaxy-game-ultimate .gameover-content {
    width: 100%;
    max-width: 800px;
    background: rgba(0, 0, 0, 0.5);
    padding: 30px 20px;
    border-radius: 16px;
    border: 2px solid rgba(255, 0, 68, 0.5);
    backdrop-filter: blur(10px);
}

.galaxy-game-ultimate .gameover-header {
    text-align: center;
    margin-bottom: 30px;
}

.galaxy-game-ultimate .gameover-title {
    font-size: 3em;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, #ff0044, #ff6b9d);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    animation: grgame-titlePulse 2s infinite alternate;
}

@keyframes grgame-titlePulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.galaxy-game-ultimate .gameover-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2em;
}

.galaxy-game-ultimate .final-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.galaxy-game-ultimate .stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.galaxy-game-ultimate .stat-card:hover {
    transform: translateY(-4px);
    border-color: #00ffff;
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.3);
}

.galaxy-game-ultimate .stat-card .stat-icon {
    font-size: 2.5em;
}

.galaxy-game-ultimate .stat-info {
    flex: 1;
}

.galaxy-game-ultimate .stat-card .stat-label {
    display: block;
    color: #00ffff;
    font-size: 0.85em;
    margin-bottom: 4px;
}

.galaxy-game-ultimate .stat-card .stat-value {
    display: block;
    color: white;
    font-size: 1.8em;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
}

.galaxy-game-ultimate .achievements-unlocked {
    background: rgba(0, 255, 136, 0.1);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #00ff88;
    margin-bottom: 25px;
}

.galaxy-game-ultimate .achievements-unlocked h3 {
    color: #00ff88;
    font-size: 1.5em;
    text-align: center;
    margin-bottom: 15px;
}

.galaxy-game-ultimate .unlocked-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.galaxy-game-ultimate .unlocked-achievement {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: grgame-achievementSlideIn 0.5s ease;
}

@keyframes grgame-achievementSlideIn {
    from {
        transform: translateX(-40px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.galaxy-game-ultimate .unlocked-achievement .emoji {
    font-size: 2em;
    background: none;
    border: none;
}

.galaxy-game-ultimate .unlocked-info {
    flex: 1;
}

.galaxy-game-ultimate .unlocked-name {
    color: white;
    font-weight: 700;
    font-size: 1em;
    margin-bottom: 4px;
}

.galaxy-game-ultimate .unlocked-reward {
    color: #ffd700;
    font-size: 0.85em;
}

.galaxy-game-ultimate .gameover-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Loading State */
.galaxy-game-ultimate .loading {
    text-align: center;
    color: white;
    font-size: 1.3em;
    padding: 50px 15px;
}

.galaxy-game-ultimate .loading::after {
    content: '';
    animation: grgame-dots 1.5s infinite;
}

@keyframes grgame-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════ */

/* Tablets */
@media (max-width: 768px) {
    .galaxy-game-ultimate {
        margin: 10px auto;
        border-radius: 12px;
    }
    
    .galaxy-game-ultimate .neon-text {
        font-size: 2em;
    }
    
    .galaxy-game-ultimate .screen-title {
        font-size: 1.6em;
    }
    
    .galaxy-game-ultimate .screen {
        min-height: 400px;
        padding: 20px 10px;
    }
    
    .galaxy-game-ultimate .game-hud-top {
        flex-direction: column;
        gap: 6px;
        padding: 10px;
    }
    
    .galaxy-game-ultimate .hud-left,
    .galaxy-game-ultimate .hud-right {
        width: 100%;
        justify-content: center;
    }
    
    .galaxy-game-ultimate #gameCanvas {
        min-height: 350px;
    }
    
    .galaxy-game-ultimate .boss-health-container {
        width: 95%;
        padding: 12px;
        top: 80px;
    }
    
    .galaxy-game-ultimate .difficulty-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .galaxy-game-ultimate .ships-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .galaxy-game-ultimate .final-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .galaxy-game-ultimate .gameover-actions {
        flex-direction: column;
    }
    
    .galaxy-game-ultimate .gameover-title {
        font-size: 2.2em;
    }
    
    .galaxy-game-ultimate .game-controls-mobile.active {
        display: flex;
    }
    
    .galaxy-game-ultimate .powerups-display {
        top: 70px;
        right: 10px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .galaxy-game-ultimate {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
    }
    
    .galaxy-game-ultimate .screen {
        padding: 15px 8px;
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    .galaxy-game-ultimate .setup-content,
    .galaxy-game-ultimate .shop-content,
    .galaxy-game-ultimate .achievements-content,
    .galaxy-game-ultimate .leaderboard-content,
    .galaxy-game-ultimate .instructions-content,
    .galaxy-game-ultimate .settings-content,
    .galaxy-game-ultimate .gameover-content {
        padding: 20px 12px;
    }
    
    .galaxy-game-ultimate .neon-text {
        font-size: 1.6em;
    }
    
    .galaxy-game-ultimate .subtitle {
        font-size: 0.85em;
        letter-spacing: 2px;
    }
    
    .galaxy-game-ultimate .menu-btn {
        padding: 10px 20px;
        font-size: 0.95em;
    }
    
    .galaxy-game-ultimate .difficulty-options,
    .galaxy-game-ultimate .ships-grid {
        grid-template-columns: 1fr;
    }
    
    .galaxy-game-ultimate #gameCanvas {
        min-height: 60vh;
        min-height: 60dvh;
    }
    
    .galaxy-game-ultimate #gameScreen.active {
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    .galaxy-game-ultimate .hud-stat {
        padding: 5px 10px;
        font-size: 0.8em;
    }
    
    .galaxy-game-ultimate .stat-icon {
        font-size: 1em;
    }
    
    .galaxy-game-ultimate .stat-value {
        font-size: 1em;
        min-width: 30px;
    }
    
    .galaxy-game-ultimate .fullscreen-btn,
    .galaxy-game-ultimate .special-btn {
        width: 45px;
        height: 45px;
    }
    
    .galaxy-game-ultimate .fullscreen-icon,
    .galaxy-game-ultimate .special-icon {
        font-size: 1.3em;
    }
    
    .galaxy-game-ultimate .level-value {
        font-size: 1.6em;
    }
    
    .galaxy-game-ultimate .boss-health-container {
        top: 70px;
        padding: 10px;
    }
    
    .galaxy-game-ultimate .boss-name {
        font-size: 1em;
    }
    
    .galaxy-game-ultimate .shop-items,
    .galaxy-game-ultimate .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .galaxy-game-ultimate .leaderboard-item {
        grid-template-columns: 50px 1fr;
        gap: 10px;
    }
    
    .galaxy-game-ultimate .rank {
        font-size: 1.2em;
    }
    
    .galaxy-game-ultimate .score,
    .galaxy-game-ultimate .level {
        grid-column: 2;
        text-align: right;
    }
    
    .galaxy-game-ultimate .game-hud-top {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 6px 8px;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
        backdrop-filter: none;
        border-radius: 0;
        box-shadow: none;
    }
    
    .galaxy-game-ultimate .hud-left,
    .galaxy-game-ultimate .hud-right,
    .galaxy-game-ultimate .hud-center {
        width: 100%;
        justify-content: center;
        gap: 4px;
    }
    
    .galaxy-game-ultimate .hud-center {
        order: 1;
    }
    
    .galaxy-game-ultimate .hud-left {
        order: 2;
    }
    
    .galaxy-game-ultimate .hud-right {
        order: 3;
    }
    
    .galaxy-game-ultimate .hud-stat {
        background: rgba(0, 0, 0, 0.45);
        border: 1px solid rgba(0, 255, 255, 0.25);
        box-shadow: none;
        padding: 4px 8px;
        gap: 4px;
        font-size: 0.75em;
        border-radius: 14px;
    }
    
    .galaxy-game-ultimate .combo-display {
        padding: 4px 10px;
        font-size: 0.75em;
    }
    
    .galaxy-game-ultimate .stat-icon {
        font-size: 0.95em;
    }
    
    .galaxy-game-ultimate .stat-value {
        font-size: 0.9em;
        min-width: 28px;
        text-align: center;
    }
    
    .galaxy-game-ultimate .level-display {
        transform: scale(0.85);
    }
    
    .galaxy-game-ultimate .wave-progress {
        width: 100%;
        transform: scale(0.9);
    }
    
    .galaxy-game-ultimate .health-bar,
    .galaxy-game-ultimate .special-attack {
        transform: scale(0.85);
        transform-origin: top center;
    }
    
    .galaxy-game-ultimate .health-text {
        font-size: 0.8em;
    }
    
    /* کنترل‌های موبایل بزرگتر و خفن‌تر */
    .galaxy-game-ultimate .joystick {
        width: 140px;
        height: 140px;
        box-shadow: 
            0 0 30px rgba(0, 255, 255, 0.5),
            inset 0 0 25px rgba(0, 255, 255, 0.15);
    }
    
    .galaxy-game-ultimate .joystick-knob {
        width: 60px;
        height: 60px;
        box-shadow: 
            0 0 25px rgba(0, 255, 255, 1),
            inset 0 0 15px rgba(255, 255, 255, 0.4),
            0 5px 15px rgba(0, 0, 0, 0.6);
    }
    
    .galaxy-game-ultimate .action-btn {
        width: 85px;
        height: 85px;
        box-shadow: 
            0 0 30px rgba(255, 0, 255, 0.7),
            inset 0 0 20px rgba(255, 0, 255, 0.25),
            0 5px 20px rgba(0, 0, 0, 0.4);
    }
    
    .galaxy-game-ultimate .shoot-btn {
        box-shadow: 
            0 0 30px rgba(0, 255, 255, 0.7),
            inset 0 0 20px rgba(0, 255, 255, 0.25),
            0 5px 20px rgba(0, 0, 0, 0.4);
    }
    
    /* افکت نبض برای دکمه‌ها */
    .galaxy-game-ultimate .action-btn {
        animation: grgame-mobile-button-pulse 2s infinite;
    }
    
    /* نوتیفیکیشن‌های بزرگتر */
    .galaxy-game-ultimate .notification {
        font-size: 1.1em;
        padding: 15px 25px;
        min-width: 280px;
    }
    
    /* Floating text بزرگتر */
    .galaxy-game-ultimate .floating-text {
        font-size: 1.5em;
        font-weight: 900;
    }
    
    /* Power-ups بزرگتر */
    .galaxy-game-ultimate .active-powerup {
        padding: 10px 15px;
    }
    
    .galaxy-game-ultimate .powerup-icon {
        font-size: 1.8em;
    }
}

/* انیمیشن نبض دکمه‌های موبایل */
@keyframes grgame-mobile-button-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 0 30px rgba(255, 0, 255, 0.7),
            inset 0 0 20px rgba(255, 0, 255, 0.25),
            0 5px 20px rgba(0, 0, 0, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            0 0 40px rgba(255, 0, 255, 0.9),
            inset 0 0 25px rgba(255, 0, 255, 0.35),
            0 5px 25px rgba(0, 0, 0, 0.5);
    }
}

/* Very Small Screens */
@media (max-width: 360px) {
    .galaxy-game-ultimate .neon-text {
        font-size: 1.4em;
    }
    
    .galaxy-game-ultimate .screen-title {
        font-size: 1.3em;
    }
    
    .galaxy-game-ultimate .menu-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .galaxy-game-ultimate #gameCanvas {
        min-height: 250px;
    }
}

/* ═══════════════════════════════════════════
   UTILITY ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes grgame-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

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

@keyframes grgame-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.galaxy-game-ultimate .game-controls-mobile.active {
    display: flex;
    pointer-events: auto;
}

