:root {
    --primary-color: #00d4ff;
    --secondary-color: #ff00ff;
    --accent-color: #ffdd00;
    --bg-dark: #0a0e27;
    --bg-darker: #050814;
    --text-light: #ffffff;
    --text-glow: #00ffff;
    --danger-color: #ff3366;
    --success-color: #00ff88;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-game: linear-gradient(180deg, #0a0e27 0%, #1a1f3a 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', 'Orbitron', sans-serif;
    background: var(--bg-darker);
    color: var(--text-light);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

.home{
    color: #b3b3b3;
    text-decoration: none;
}
.home:hover{
    color: white;
}

.game-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: radial-gradient(ellipse at center, #1a1f3a 0%, #0a0e27 100%);
    overflow: hidden;
}

.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 212, 255, 0.03) 2px,
            rgba(0, 212, 255, 0.03) 4px);
    pointer-events: none;
    animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(20px);
    }
}

/* Screen Management */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 1;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

/* Start Screen */
.title-container {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 1s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 10px;
    position: relative;
}

.title-glow {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px var(--primary-color));
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {

    0%,
    100% {
        filter: drop-shadow(0 0 30px var(--primary-color));
    }

    50% {
        filter: drop-shadow(0 0 50px var(--secondary-color));
    }
}

.subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 8px;
    color: var(--primary-color);
    opacity: 0.8;
    text-transform: uppercase;
}

/* Buttons */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeInUp 1s ease 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-btn {
    position: relative;
    padding: 14px 50px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-light);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.primary-btn:active {
    transform: translateY(-1px);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.primary-btn:hover .btn-glow {
    left: 100%;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
    backdrop-filter: blur(10px);
}
.fan{
        padding:6px 40px !important;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* Difficulty Selector */
.difficulty-selector {
    margin-bottom: 40px;
    animation: fadeIn 1s ease 0.2s both;
}

.difficulty-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.difficulty-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.difficulty-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 150px;
}

.difficulty-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.difficulty-btn.active {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(255, 221, 0, 0.4);
}

.difficulty-icon {
    font-size: 2.5rem;
}

.difficulty-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.difficulty-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    line-height: 1.4;
}

.difficulty-btn.active .difficulty-name {
    color: var(--accent-color);
}

.difficulty-btn.active .difficulty-desc {
    color: rgba(255, 221, 0, 0.8);
}


/* Stats Preview */
.stats-preview {
    margin-top: 30px;
    display: flex;
    gap: 40px;
    animation: fadeIn 1s ease 0.6s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    backdrop-filter: blur(10px);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Instructions Screen */
.instructions-container {
    max-width: 600px;
    padding: 40px;
    background: rgba(10, 14, 39, 0.9);
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.instructions-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.instructions-content {
    margin-bottom: 30px;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.instruction-item:hover {
    background: rgba(255, 255, 255, 0.1);

}

.instruction-icon {
    font-size: 2rem;
    min-width: 40px;
    text-align: center;
}

.instruction-text {
    flex: 1;
    line-height: 1.6;
}

.instruction-text strong {
    color: var(--accent-color);
}

/* Game Screen */
#gameScreen {
    background: var(--gradient-game);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0a0e27 0%, #1a1f3a 50%, #0a0e27 100%);
    touch-action: none;
}

/* HUD */
.hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 10;
    pointer-events: none;
}

.hud-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.hud-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px 25px;
    background: transparent;
    border-radius: 10px;
    border: none;
    backdrop-filter: none;
}

.hud-label {
    font-size: 0.8rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hud-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
}

.lives-container {
    display: flex;
    gap: 5px;
}

/* Weapon Indicator */
.hud-bottom {
    display: flex;
    justify-content: center;
}

.weapon-indicator {
    padding: 10px 30px;
    background: transparent;
    border-radius: 10px;
    border: none;
    backdrop-filter: none;
}

.weapon-label {
    display: block;
    font-size: 0.7rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    text-align: center;
}

.weapon-level-bar {
    width: 200px;
    height: 10px;
    background: transparent;
    border-radius: 5px;
    overflow: hidden;
}

.weapon-level-fill {
    height: 100%;
    width: 33%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--primary-color);
}

/* Pause Button */
.pause-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    pointer-events: all;
    z-index: 20;
}

.pause-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: scale(1.1);
}

/* Game Over Screen */
.game-over-container,
.pause-container {
    text-align: center;
    padding: 40px;
    background: rgba(10, 14, 39, 0.95);
    border-radius: 20px;
    border: 2px solid var(--danger-color);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.5s ease;
}

.pause-container {
    border-color: var(--primary-color);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.game-over-title,
.pause-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    margin-bottom: 30px;
    color: var(--danger-color);
    text-transform: uppercase;
    animation: pulse 2s ease-in-out infinite;
}

.pause-title {
    color: var(--primary-color);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.final-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-bottom: 40px;
}

.final-stat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.final-stat-label {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.final-stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1rem;
        letter-spacing: 4px;
    }

    .menu-btn {
        padding: 15px 40px;
        font-size: 1rem;
    }

    .instructions-container {
        max-width: 90%;
        padding: 30px 20px;
    }

    .instruction-item {
    }

    .final-stats {
        flex-direction: column;
        gap: 20px;
    }

    .weapon-level-bar {
        width: 150px;
    }

    .hud {
        padding: 10px;
    }

    .hud-top {
        margin-bottom: 8px;
        gap: 8px;
    }

    .hud-item {
        padding: 6px 10px;
        background: transparent;
        border: none;
        backdrop-filter: none;
        box-shadow: none;
    }

    .hud-label {
        font-size: 0.6rem;
    }

    .hud-value {
        font-size: 1.2rem;
    }

    .difficulty-buttons {
        gap: 12px;
        align-items: stretch;
        padding: 0 12px;
    }

    .difficulty-btn {
        min-width: 0;
        width: 100%;
    }

    #instructionsScreen {
        overflow: hidden;
        justify-content: flex-start;
        padding: 20px 0;
    }

    .instructions-container {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #startScreen {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding: 20px 0;
    }
}

/* Particle Effects */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Loading Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
.hud #bombCount {
    pointer-events: all;
    cursor: pointer;
    user-select: none;
}
#instructionsScreen {
    overflow: hidden;
}

.instructions-container::-webkit-scrollbar { width: 0; height: 0; }
.instructions-container { scrollbar-width: none; -ms-overflow-style: none; }
