/* SPACE ULUKAIN PROTOCOL - STYLES v2 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    overflow: hidden;
    font-family: 'Orbitron', sans-serif;
}

#game {
    display: block;
}

.hidden {
    display: none !important;
}

/* HUD */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 50;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
}

.hud-left,
.hud-right {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hud-stars {
    font-size: 1.3rem;
    color: #ffd700;
    text-shadow: 0 0 15px #ffd700;
}

.hud-score {
    font-size: 0.9rem;
    color: #888;
}

.hud-wave {
    font-size: 1.5rem;
    color: #a855f7;
    text-shadow: 0 0 20px #a855f7;
    animation: wavePulse 2s infinite;
}

@keyframes wavePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.hud-hp span {
    font-size: 0.8rem;
    color: #888;
}

.hp-bar {
    width: 150px;
    height: 12px;
    background: #222;
    border: 2px solid #444;
    margin-top: 3px;
    border-radius: 6px;
    overflow: hidden;
}

.hp-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #f00, #ff4444);
    transition: width 0.3s;
    box-shadow: 0 0 10px #f00;
}

/* Upgrade Panel */
#upgrade-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 25, 0.98);
    border: 2px solid #a855f7;
    padding: 35px 45px;
    text-align: center;
    z-index: 200;
    box-shadow: 0 0 80px rgba(168, 85, 247, 0.5), inset 0 0 30px rgba(168, 85, 247, 0.1);
    animation: panelAppear 0.3s ease;
}

@keyframes panelAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

#upgrade-panel h2 {
    color: #a855f7;
    font-size: 1.6rem;
    margin-bottom: 10px;
    text-shadow: 0 0 20px #a855f7;
}

.upgrade-hint {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.upgrade-options {
    display: flex;
    gap: 15px;
}

.upgrade-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid #333;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
}

.upgrade-btn:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
}

.upgrade-icon {
    font-size: 2.5rem;
}

.upgrade-name {
    font-size: 0.85rem;
    color: #aaa;
}

.upgrade-level {
    font-size: 0.75rem;
    color: #666;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 10px;
}

/* Menu */
#menu {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 100;
    padding-top: 20px;
}

.menu-bg {
    position: absolute;
    inset: 0;
    background: #000;
    overflow: hidden;
}

.stars-layer {
    position: absolute;
    inset: 0;
    background: radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1.5px 1.5px at 200px 80px, #fff, transparent),
        radial-gradient(2px 2px at 300px 200px, rgba(255, 255, 255, 0.7), transparent);
    background-size: 200px 200px;
    animation: starsMove 80s linear infinite;
}

@keyframes starsMove {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 2000px;
    }
}

.nebula-layer {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(168, 85, 247, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(0, 245, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 0, 128, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 30%, rgba(255, 107, 0, 0.1) 0%, transparent 35%);
    animation: nebulaFloat 15s ease-in-out infinite alternate;
}

@keyframes nebulaFloat {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Scanlines effect */
.menu-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.1) 2px, rgba(0, 0, 0, 0.1) 4px);
    animation: scanlines 10s linear infinite;
}

@keyframes scanlines {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 100px;
    }
}

/* Glowing orbs */
.menu-bg::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.15) 0%, transparent 70%);
    top: 20%;
    left: 10%;
    animation: orbFloat 8s ease-in-out infinite alternate;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 30px) scale(1.2);
    }
}

.grid-layer {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(0, 245, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(500px) rotateX(60deg);
    transform-origin: center 120%;
    animation: gridScroll 15s linear infinite;
}

@keyframes gridScroll {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 60px;
    }
}

.menu-content {
    position: relative;
    text-align: center;
    z-index: 10;
    padding: 10px 15px;
}

.menu-logo {
    margin-bottom: 8px;
}

.logo-main {
    font-size: clamp(1.8rem, 6vw, 3.5rem);
    font-weight: 900;
    position: relative;
    background: linear-gradient(135deg, #00f5ff 0%, #a855f7 50%, #ff00ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logoGlow 3s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(0, 245, 255, 0.5));
    display: block;
    line-height: 1.1;
}

.logo-main::before,
.logo-main::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-main::before {
    animation: glitchTop 3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.logo-main::after {
    animation: glitchBottom 3s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitchTop {

    0%,
    95%,
    100% {
        transform: translateX(0);
    }

    96% {
        transform: translateX(-3px);
    }

    97% {
        transform: translateX(3px);
    }
}

@keyframes glitchBottom {

    0%,
    95%,
    100% {
        transform: translateX(0);
    }

    96% {
        transform: translateX(3px);
    }

    97% {
        transform: translateX(-3px);
    }
}

@keyframes logoGlow {

    0%,
    100% {
        filter: brightness(1) drop-shadow(0 0 20px rgba(0, 245, 255, 0.5));
    }

    50% {
        filter: brightness(1.2) drop-shadow(0 0 40px rgba(168, 85, 247, 0.8));
    }
}

.logo-sub {
    font-size: clamp(0.8rem, 2.5vw, 1.6rem);
    color: #ff00ff;
    letter-spacing: clamp(0.1em, 1vw, 0.4em);
    text-shadow: 0 0 30px #ff00ff;
    margin-top: 5px;
    animation: subPulse 4s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes subPulse {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

.logo-line {
    width: 300px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00f5ff, transparent);
    margin: 20px auto;
    animation: lineGlow 2s infinite;
}

@keyframes lineGlow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.menu-ship {
    margin: 10px 0;
    animation: shipFloat 4s ease-in-out infinite;
}

@keyframes shipFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.ship-preview {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 245, 255, 0.6));
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

/* ============ PREMIUM MENU BUTTONS ============ */
.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 280px;
    padding: 16px 30px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(145deg, rgba(10, 20, 40, 0.95), rgba(20, 30, 60, 0.9));
    border: 2px solid rgba(0, 245, 255, 0.3);
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -2px 5px rgba(0, 0, 0, 0.3);
}

/* Animated border gradient */
.menu-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #00f5ff, #a855f7, #00f5ff, #a855f7);
    background-size: 400% 400%;
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    animation: borderGradient 4s linear infinite;
    transition: opacity 0.4s ease;
}

@keyframes borderGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Shine sweep effect */
.menu-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.menu-btn:hover::after {
    left: 150%;
}

.menu-btn:hover::before {
    opacity: 1;
}

.menu-btn:hover {
    background: linear-gradient(145deg, rgba(0, 40, 80, 0.95), rgba(15, 50, 100, 0.9));
    border-color: transparent;
    box-shadow:
        0 0 40px rgba(0, 245, 255, 0.4),
        0 8px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-3px) scale(1.02);
    color: #00f5ff;
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.8);
}

.menu-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Button Icon */
.btn-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(0, 245, 255, 0.5));
    transition: transform 0.3s ease;
}

.menu-btn:hover .btn-icon {
    transform: scale(1.2);
}

/* PRIMARY BUTTON - OYNA */
.menu-btn.primary {
    background: linear-gradient(145deg, rgba(0, 80, 120, 0.9), rgba(0, 120, 180, 0.8), rgba(100, 50, 180, 0.6));
    background-size: 200% 200%;
    animation: primaryPulse 3s ease-in-out infinite;
    border-color: #00f5ff;
    box-shadow:
        0 0 25px rgba(0, 245, 255, 0.3),
        0 5px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@keyframes primaryPulse {

    0%,
    100% {
        background-position: 0% 50%;
        box-shadow: 0 0 25px rgba(0, 245, 255, 0.3), 0 5px 20px rgba(0, 0, 0, 0.4);
    }

    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 45px rgba(0, 245, 255, 0.5), 0 5px 20px rgba(0, 0, 0, 0.4);
    }
}

.menu-btn.primary:hover {
    box-shadow:
        0 0 60px rgba(0, 245, 255, 0.6),
        0 0 100px rgba(168, 85, 247, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(-5px) scale(1.05);
}

.glow-btn {
    animation: primaryPulse 3s ease-in-out infinite, btnFloat 4s ease-in-out infinite;
}

@keyframes btnFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes btnGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(0, 245, 255, 0.6);
    }
}

.btn-icon {
    font-size: 1.2rem;
}

.menu-footer {
    margin-top: 15px;
    color: #888;
    font-size: 0.7rem;
}

.footer-line {
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #333, transparent);
    margin: 0 auto 10px;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 150;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(10, 10, 25, 0.98);
    border: 2px solid #00f5ff;
    padding: 0;
    min-width: 400px;
    box-shadow: 0 0 60px rgba(0, 245, 255, 0.3);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: rgba(0, 245, 255, 0.1);
    border-bottom: 1px solid rgba(0, 245, 255, 0.3);
}

.modal-header h2 {
    color: #00f5ff;
    font-size: 1.2rem;
}

.modal-close {
    width: 35px;
    height: 35px;
    background: transparent;
    border: 1px solid #444;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 0, 64, 0.2);
    border-color: #ff0040;
    color: #ff0040;
}

.modal-body {
    padding: 25px;
}

/* Settings */
.setting-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.setting-label {
    flex: 0 0 100px;
    color: #888;
    font-size: 0.9rem;
}

.setting-row input[type="range"] {
    flex: 1;
    height: 8px;
    background: #222;
    border-radius: 4px;
    -webkit-appearance: none;
}

.setting-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #00f5ff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 15px #00f5ff;
}

.setting-value {
    flex: 0 0 50px;
    text-align: right;
    color: #00f5ff;
    font-size: 0.9rem;
}

/* Controls */
.controls-modal {
    min-width: 500px;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.control-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.control-card:hover {
    border-color: #00f5ff;
    background: rgba(0, 245, 255, 0.05);
}

.key-display {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.key {
    display: inline-block;
    padding: 8px 14px;
    background: linear-gradient(180deg, #333, #222);
    border: 1px solid #555;
    border-radius: 5px;
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 3px 0 #111;
}

.key.wide {
    padding: 8px 25px;
}

.control-label {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.control-alt {
    color: #555;
    font-size: 0.7rem;
}

.controls-tips {
    background: rgba(168, 85, 247, 0.1);
    border-left: 3px solid #a855f7;
    padding: 15px 20px;
}

.controls-tips h3 {
    color: #a855f7;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.controls-tips ul {
    list-style: none;
}

.controls-tips li {
    color: #888;
    font-size: 0.85rem;
    margin: 8px 0;
}

/* Game Over */
#gameover {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.go-content {
    text-align: center;
    animation: goAppear 0.5s ease;
}

@keyframes goAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.go-title {
    font-size: 4rem;
    color: #ff0040;
    margin-bottom: 30px;
    text-shadow: 0 0 50px #ff0040;
    animation: goTitlePulse 1s infinite;
}

@keyframes goTitlePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.go-stats {
    margin-bottom: 35px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    width: 250px;
    margin: 12px auto;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #00f5ff;
}

.stat-label {
    color: #666;
}

.stat-value {
    color: #00f5ff;
    font-weight: 700;
}

.go-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Transition Animation */
#menu.transitioning .menu-content {
    animation: menuFadeOut 1.5s ease forwards;
}

#menu.transitioning .menu-bg {
    animation: bgFadeOut 1.5s ease forwards;
}

#menu.transitioning .menu-ship {
    animation: shipFlyDown 1.2s ease-in forwards;
}

#menu.transitioning .menu-logo {
    animation: logoFlyUp 0.8s ease forwards;
}

#menu.transitioning .menu-buttons {
    animation: buttonsFade 0.5s ease forwards;
}

#menu.transitioning .menu-footer {
    animation: buttonsFade 0.3s ease forwards;
}

@keyframes menuFadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes bgFadeOut {
    0% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes shipFlyDown {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    30% {
        transform: translateY(-30px) scale(1.1);
        opacity: 1;
    }

    100% {
        transform: translateY(calc(50vh + 200px)) scale(0.8);
        opacity: 0.8;
    }
}

@keyframes logoFlyUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px);
        opacity: 0;
    }
}

@keyframes buttonsFade {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Ready text */
.ready-text {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: #00f5ff;
    z-index: 200;
    text-shadow: 0 0 50px #00f5ff;
    animation: readyPulse 0.5s ease infinite;
    pointer-events: none;
}

@keyframes readyPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

/* Glitch Text */
.glitch-text {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #ff0040;
    letter-spacing: 0.5em;
    opacity: 0.6;
    animation: glitchFlicker 4s infinite;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
}

.glitch-text::before {
    color: #0ff;
    animation: glitchShift 0.3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch-text::after {
    color: #f0f;
    animation: glitchShift 0.3s infinite reverse;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitchFlicker {

    0%,
    90%,
    100% {
        opacity: 0.6;
    }

    92%,
    94%,
    96% {
        opacity: 0;
    }

    93%,
    95%,
    97% {
        opacity: 0.8;
    }
}

@keyframes glitchShift {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    75% {
        transform: translateX(2px);
    }
}

/* Glitch Small */
.glitch-small {
    position: relative;
    animation: glitchFlicker 5s infinite;
}

/* Ship Glow */
.ship-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.2) 0%, transparent 70%);
    animation: shipGlowPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shipGlowPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Menu Decorations */
.menu-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.deco-line {
    position: absolute;
    width: 2px;
    height: 100px;
    background: linear-gradient(180deg, transparent, #00f5ff, transparent);
}

.deco-line.left {
    left: -100px;
    top: 50%;
    transform: translateY(-50%);
    animation: decoSlide 3s ease-in-out infinite;
}

.deco-line.right {
    right: -100px;
    top: 50%;
    transform: translateY(-50%);
    animation: decoSlide 3s ease-in-out infinite reverse;
}

@keyframes decoSlide {

    0%,
    100% {
        opacity: 0.3;
        height: 100px;
    }

    50% {
        opacity: 1;
        height: 200px;
    }
}

/* Logo sub glitch */
.logo-sub {
    position: relative;
}

.logo-sub::before,
.logo-sub::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
}

.logo-sub::before {
    color: #0ff;
    animation: subGlitch 5s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
    opacity: 0.5;
}

.logo-sub::after {
    color: #f0f;
    animation: subGlitch 5s infinite 0.1s;
    clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
    opacity: 0.5;
}

@keyframes subGlitch {

    0%,
    90%,
    100% {
        transform: translateX(0);
        opacity: 0;
    }

    92% {
        transform: translateX(-3px);
        opacity: 0.5;
    }

    94% {
        transform: translateX(3px);
        opacity: 0.5;
    }

    96% {
        transform: translateX(-1px);
        opacity: 0.5;
    }
}

/* ============================================
   ENHANCED MENU STYLES
   ============================================ */

/* Floating Asteroids */
.floating-asteroid {
    position: fixed;
    font-size: 2rem;
    opacity: 0.6;
    z-index: 5;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.ast-1 {
    top: 15%;
    left: 8%;
    animation: asteroidFloat1 12s ease-in-out infinite;
}

.ast-2 {
    top: 25%;
    right: 10%;
    font-size: 2.5rem;
    animation: asteroidFloat2 15s ease-in-out infinite;
}

.ast-3 {
    bottom: 20%;
    left: 12%;
    font-size: 1.5rem;
    animation: asteroidFloat3 10s ease-in-out infinite;
}

@keyframes asteroidFloat1 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(30px, -20px) rotate(90deg);
    }

    50% {
        transform: translate(60px, 10px) rotate(180deg);
    }

    75% {
        transform: translate(20px, 30px) rotate(270deg);
    }
}

@keyframes asteroidFloat2 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    33% {
        transform: translate(-40px, 30px) rotate(120deg) scale(1.1);
    }

    66% {
        transform: translate(-20px, -40px) rotate(240deg) scale(0.9);
    }
}

@keyframes asteroidFloat3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(50px, -30px) scale(1.3);
        opacity: 1;
    }
}

/* ============ PREMIUM GAME INFO BADGES ============ */
.game-info-badges {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 30px 0;
    flex-wrap: wrap;
    perspective: 1000px;
}

.info-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(145deg, rgba(10, 20, 40, 0.9), rgba(20, 30, 60, 0.85));
    border: 2px solid transparent;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: badgeFloat 4s ease-in-out infinite;
}

/* Holographic border effect */
.info-badge::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #00f5ff, #a855f7, #ff00ff, #00f5ff);
    background-size: 300% 300%;
    border-radius: 32px;
    z-index: -1;
    animation: holoBorder 4s linear infinite;
}

/* Inner glow overlay */
.info-badge::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: linear-gradient(145deg, rgba(10, 20, 40, 0.95), rgba(20, 30, 60, 0.9));
    border-radius: 28px;
    z-index: -1;
}

@keyframes holoBorder {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes badgeFloat {

    0%,
    100% {
        transform: translateY(0) rotateX(0deg);
    }

    50% {
        transform: translateY(-5px) rotateX(3deg);
    }
}

.info-badge:nth-child(1) {
    animation-delay: 0s;
}

.info-badge:nth-child(2) {
    animation-delay: 0.4s;
}

.info-badge:nth-child(3) {
    animation-delay: 0.8s;
}

.info-badge:hover {
    transform: translateY(-8px) scale(1.08);
    box-shadow:
        0 15px 40px rgba(0, 245, 255, 0.3),
        0 0 60px rgba(168, 85, 247, 0.2);
}

.info-badge:hover::before {
    animation: holoBorder 1s linear infinite;
}

.info-badge .badge-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.6));
    animation: iconGlow 2s ease-in-out infinite;
}

@keyframes iconGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(0, 245, 255, 0.4));
    }

    50% {
        filter: drop-shadow(0 0 15px rgba(0, 245, 255, 0.8));
    }
}

.info-badge .badge-text {
    font-size: 0.8rem;
    color: #fff;
    letter-spacing: 2px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

/* ============ PREMIUM DEVELOPER CREDIT SECTION ============ */
.menu-footer.enhanced {
    margin-top: 40px;
    padding: 25px 30px;
    background: linear-gradient(145deg, rgba(10, 15, 30, 0.9), rgba(20, 25, 50, 0.85));
    border: 2px solid transparent;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated border for footer */
.menu-footer.enhanced::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #00f5ff, #a855f7, #ff00ff, #00f5ff);
    background-size: 400% 400%;
    border-radius: 22px;
    z-index: -1;
    animation: footerBorder 6s linear infinite;
}

.menu-footer.enhanced::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: linear-gradient(145deg, rgba(10, 15, 30, 0.98), rgba(20, 25, 50, 0.95));
    border-radius: 18px;
    z-index: -1;
}

@keyframes footerBorder {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.developer-credit {
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    padding: 25px 40px;
    background: linear-gradient(145deg, rgba(0, 10, 30, 0.9), rgba(10, 20, 50, 0.8));
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 245, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dev-label {
    font-size: 0.7rem;
    color: #00f5ff;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-transform: uppercase;
    animation: labelFlicker 4s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

@keyframes labelFlicker {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.dev-name {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(90deg, #00f5ff, #a855f7, #ff00ff, #00f5ff);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    animation: devNameFlow 4s linear infinite, devNameGlow 3s ease-in-out infinite;
    letter-spacing: 2px;
}

@keyframes devNameFlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}

.dev-name::before,
.dev-name::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: inherit;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dev-name::before {
    animation: glitchTop 5s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.dev-name::after {
    animation: glitchBottom 5s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes devNameGlow {

    0%,
    100% {
        filter: brightness(1) drop-shadow(0 0 20px rgba(0, 245, 255, 0.6));
    }

    50% {
        filter: brightness(1.4) drop-shadow(0 0 40px rgba(168, 85, 247, 0.9));
    }
}

/* Premium Indie Dev Badge */
.dev-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 24px;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 25px;
    font-size: 0.7rem;
    color: #fff;
    letter-spacing: 3px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.dev-badge:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: #a855f7;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.5);
}

/* Badge shine effect */
.dev-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: badgeShine 3s ease-in-out infinite;
}

@keyframes badgeShine {

    0%,
    100% {
        left: -100%;
    }

    50% {
        left: 100%;
    }
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #10b981, #00ff88);
    border-radius: 50%;
    box-shadow: 0 0 15px #10b981;
    animation: pulseDot 1.2s ease-in-out infinite;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -5px;
    border: 2px solid rgba(16, 185, 129, 0.5);
    border-radius: 50%;
    animation: pulseRing 1.2s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

@keyframes pulseDot {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 10px #10b981;
    }

    50% {
        transform: scale(1.2);
        box-shadow: 0 0 25px #10b981;
    }
}

/* Premium Footer Info Bar */
.footer-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    margin-top: 15px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    border: 1px solid rgba(0, 245, 255, 0.2);
}

.version-tag {
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.15), rgba(168, 85, 247, 0.1));
    border: 2px solid #00f5ff;
    border-radius: 20px;
    color: #00f5ff;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(0, 245, 255, 0.8);
    animation: versionGlow 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.version-tag:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(0, 245, 255, 0.5);
}

@keyframes versionGlow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 245, 255, 0.6);
    }
}

.separator {
    color: #00f5ff;
    font-size: 0.5rem;
    text-shadow: 0 0 10px #00f5ff;
    animation: separatorPulse 1.5s ease-in-out infinite;
}

@keyframes separatorPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.copyright {
    color: #888;
    font-weight: 600;
    letter-spacing: 1px;
}

.odra-protected {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 140, 0, 0.1));
    border: 2px solid transparent;
    border-radius: 20px;
    color: #ffd700;
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    animation: odraShimmer 3s linear infinite;
    transition: all 0.3s ease;
}

.odra-protected::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #ffd700, #ff8c00, #ffd700, #ff8c00);
    background-size: 300% 300%;
    border-radius: 22px;
    z-index: -1;
    animation: odraBorder 3s linear infinite;
}

.odra-protected::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.95), rgba(30, 30, 60, 0.9));
    border-radius: 18px;
    z-index: -1;
}

@keyframes odraBorder {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes odraShimmer {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }

    50% {
        text-shadow: 0 0 25px rgba(255, 215, 0, 0.9);
    }
}

.odra-protected:hover {
    transform: scale(1.1);
    color: #fff;
}

/* ============================================
   MENU TOP STATS - Sol Üst Köşe
   ============================================ */
.menu-top-stats {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 20;
}

.menu-top-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 8px 15px;
    backdrop-filter: blur(10px);
}

.menu-top-stats .stat-icon {
    font-size: 1.3rem;
}

.menu-top-stats .stat-info {
    display: flex;
    flex-direction: column;
}

.menu-top-stats .stat-label {
    font-size: 0.6rem;
    color: #666;
    letter-spacing: 1px;
}

.menu-top-stats .stat-value {
    font-size: 1.1rem;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

/* Menu Buttons Row - Simetrik */
.menu-buttons-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.menu-buttons-row .menu-btn {
    width: 135px;
    font-size: 0.85rem;
    padding: 12px 15px;
}

.menu-btn.small {
    width: 200px;
    font-size: 0.8rem;
    padding: 10px 20px;
    opacity: 0.8;
}

/* ============================================
   SHIPS MODAL
   ============================================ */
.ships-modal-content {
    min-width: 600px;
    max-width: 800px;
}

.ships-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.ship-card {
    background: rgba(20, 20, 40, 0.9);
    border: 2px solid #333;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.ship-card.unlocked:hover {
    border-color: #00f5ff;
    background: rgba(0, 245, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.3);
}

.ship-card.selected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.ship-card.locked {
    cursor: not-allowed;
    opacity: 0.6;
}

.ship-image {
    position: relative;
    height: 60px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ship-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.ship-name {
    font-size: 0.8rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 5px;
}

.ship-stars {
    font-size: 0.7rem;
    color: #ffd700;
}

.selected-badge {
    margin-top: 8px;
    font-size: 0.65rem;
    color: #10b981;
    font-weight: 700;
}

.ships-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(168, 85, 247, 0.1);
    border-left: 3px solid #a855f7;
    border-radius: 0 8px 8px 0;
}

.ships-info p {
    color: #888;
    font-size: 0.8rem;
    margin: 5px 0;
}

/* Scrollbar for ships grid */
.ships-grid::-webkit-scrollbar {
    width: 6px;
}

.ships-grid::-webkit-scrollbar-track {
    background: #111;
}

.ships-grid::-webkit-scrollbar-thumb {
    background: #00f5ff;
    border-radius: 3px;
}

/* ============================================
   LEGAL DISCLAIMER POPUP - PROFESYONEL + ANIMASYONLU
   ============================================ */
.legal-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0, 20, 40, 0.98) 0%, rgba(0, 0, 0, 0.99) 100%);
    backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow: hidden;
}

/* Animated background particles */
.legal-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(0, 245, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(0, 245, 255, 0.2), transparent),
        radial-gradient(2px 2px at 60% 40%, rgba(0, 245, 255, 0.3), transparent),
        radial-gradient(3px 3px at 80% 10%, rgba(0, 245, 255, 0.4), transparent),
        radial-gradient(2px 2px at 10% 80%, rgba(0, 245, 255, 0.25), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(0, 245, 255, 0.3), transparent);
    background-size: 200% 200%;
    animation: particlesMove 20s linear infinite;
    pointer-events: none;
}

@keyframes particlesMove {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 200%;
    }
}

/* Scanning line effect */
.legal-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00f5ff, transparent);
    animation: scanLine 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes scanLine {
    0% {
        top: 0;
        opacity: 0.5;
    }

    50% {
        top: 100%;
        opacity: 1;
    }

    100% {
        top: 0;
        opacity: 0.5;
    }
}

.legal-modal {
    background: linear-gradient(145deg, #0a1628 0%, #162447 50%, #1a1a3e 100%);
    border: 2px solid #00f5ff;
    border-radius: 24px;
    max-width: 620px;
    width: 95%;
    box-shadow:
        0 0 80px rgba(0, 245, 255, 0.4),
        inset 0 0 30px rgba(0, 245, 255, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.8);
    animation: modalFloat 4s ease-in-out infinite, legalGlow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Floating animation */
@keyframes modalFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Corner decorations */
.legal-modal::before,
.legal-modal::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid transparent;
    pointer-events: none;
}

.legal-modal::before {
    top: 10px;
    left: 10px;
    border-top-color: #00f5ff;
    border-left-color: #00f5ff;
    animation: cornerPulse 2s infinite;
}

.legal-modal::after {
    bottom: 10px;
    right: 10px;
    border-bottom-color: #00f5ff;
    border-right-color: #00f5ff;
    animation: cornerPulse 2s infinite 1s;
}

@keyframes cornerPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes legalGlow {

    0%,
    100% {
        box-shadow: 0 0 40px rgba(0, 245, 255, 0.3), inset 0 0 20px rgba(0, 245, 255, 0.05);
    }

    50% {
        box-shadow: 0 0 100px rgba(0, 245, 255, 0.6), inset 0 0 50px rgba(0, 245, 255, 0.15);
    }
}

.legal-header {
    text-align: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid rgba(0, 245, 255, 0.3);
    background: linear-gradient(180deg, rgba(0, 245, 255, 0.15) 0%, transparent 100%);
}

.legal-shield {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.shield-icon {
    font-size: 2.5rem;
    animation: shieldPulse 2s infinite, shieldGlow 3s infinite;
    filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.5));
}

@keyframes shieldPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

@keyframes shieldGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 25px rgba(0, 245, 255, 0.9));
    }
}

.odra-badge {
    background: linear-gradient(135deg, #00f5ff, #0066ff, #00f5ff);
    background-size: 200% 100%;
    animation: badgeShine 3s linear infinite;
    color: #000;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Orbitron', monospace;
}

@keyframes badgeShine {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.legal-title {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 900;
    text-shadow: 0 0 40px rgba(0, 245, 255, 0.8), 0 0 80px rgba(0, 245, 255, 0.4);
    margin: 0 0 8px 0;
    letter-spacing: 4px;
    font-family: 'Orbitron', sans-serif;
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {

    0%,
    100% {
        text-shadow: 0 0 30px rgba(0, 245, 255, 0.6);
    }

    50% {
        text-shadow: 0 0 60px rgba(0, 245, 255, 1), 0 0 100px rgba(0, 245, 255, 0.5);
    }
}

.legal-subtitle {
    color: #8af;
    font-size: 0.85rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* COMPACT BODY - NO SCROLL */
.legal-body-compact {
    padding: 20px;
}

.legal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.legal-card {
    background: rgba(0, 20, 40, 0.6);
    border-radius: 12px;
    padding: 15px 12px;
    text-align: center;
    border: 1px solid rgba(0, 245, 255, 0.2);
    transition: all 0.3s ease;
}

.legal-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 245, 255, 0.5);
}

.legal-card.warning {
    border-color: rgba(255, 200, 0, 0.4);
    background: rgba(255, 200, 0, 0.08);
}

.legal-card.forbidden {
    border-color: rgba(255, 80, 80, 0.4);
    background: rgba(255, 80, 80, 0.08);
}

.legal-card.enforcement {
    border-color: rgba(100, 255, 100, 0.4);
    background: rgba(100, 255, 100, 0.08);
}

.card-header {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.legal-card.warning .card-header {
    color: #ffc800;
}

.legal-card.forbidden .card-header {
    color: #ff6666;
}

.legal-card.enforcement .card-header {
    color: #88ff88;
}

.legal-card p {
    color: #aaa;
    font-size: 0.72rem;
    line-height: 1.5;
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
}

.legal-accept-notice {
    text-align: center;
    color: #00f5ff;
    font-size: 0.8rem;
    padding: 12px;
    background: rgba(0, 245, 255, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(0, 245, 255, 0.2);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.5px;
}

.legal-footer {
    padding: 18px 25px;
    text-align: center;
    border-top: 1px solid rgba(0, 245, 255, 0.3);
    background: linear-gradient(0deg, rgba(0, 245, 255, 0.08) 0%, transparent 100%);
}

.legal-accept-btn {
    background: linear-gradient(135deg, #00f5ff, #0088ff, #00f5ff);
    background-size: 200% 100%;
    animation: btnShine 4s linear infinite;
    color: #000;
    font-size: 1rem;
    font-weight: 800;
    padding: 14px 40px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.5);
    z-index: 100;
    /* Ensure button is clickable */
    pointer-events: auto;
    /* Force pointer events */
}

@keyframes btnShine {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.legal-accept-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 50px rgba(0, 245, 255, 0.8);
}

.btn-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: btnGlowMove 2s linear infinite;
    pointer-events: none;
    /* Allow clicks through to button */
}

@keyframes btnGlowMove {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* Details Button */
.legal-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #8af;
    font-size: 0.8rem;
    font-family: 'Orbitron', sans-serif;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid rgba(136, 170, 255, 0.3);
    border-radius: 20px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    background: rgba(136, 170, 255, 0.05);
}

.legal-details-btn:hover {
    color: #00f5ff;
    border-color: #00f5ff;
    background: rgba(0, 245, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 245, 255, 0.2);
}

.details-icon {
    font-size: 1.1rem;
}

/* ============================================
   BACK TO GAMES BUTTON - Premium Design
   ============================================ */
.back-to-games-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #00f5ff;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.back-to-games-btn .btn-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.9), rgba(0, 40, 80, 0.8));
    border-radius: 30px;
    z-index: 1;
}

.back-to-games-btn .btn-border {
    position: absolute;
    inset: 0;
    border-radius: 30px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #00f5ff, #0066ff, #00f5ff) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 2;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

.back-to-games-btn .btn-glow-effect {
    position: absolute;
    inset: -3px;
    border-radius: 35px;
    background: linear-gradient(45deg, transparent, rgba(0, 245, 255, 0.4), transparent);
    opacity: 0;
    z-index: 0;
    transition: opacity 0.3s ease;
    animation: glowSweep 3s ease-in-out infinite;
}

@keyframes glowSweep {

    0%,
    100% {
        transform: translateX(-100%) rotate(45deg);
        opacity: 0;
    }

    50% {
        transform: translateX(100%) rotate(45deg);
        opacity: 0.6;
    }
}

.back-to-games-btn .btn-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-to-games-btn .btn-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(0, 245, 255, 0.5));
}

.back-to-games-btn .btn-label {
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

/* Hover Effects */
.back-to-games-btn:hover {
    transform: translateX(-5px) scale(1.05);
    color: #fff;
}

.back-to-games-btn:hover .btn-arrow {
    transform: translateX(-5px);
    animation: arrowPulse 0.5s ease-in-out infinite;
}

@keyframes arrowPulse {

    0%,
    100% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(-10px);
    }
}

.back-to-games-btn:hover .btn-glow-effect {
    opacity: 1;
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.5);
}

.back-to-games-btn:hover .btn-bg {
    background: linear-gradient(135deg, rgba(0, 50, 100, 0.95), rgba(0, 80, 150, 0.9));
}

/* Pulse animation on idle */
.back-to-games-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 35px;
    border: 2px solid rgba(0, 245, 255, 0.3);
    animation: pulseBorder 2s ease-in-out infinite;
    z-index: 0;
}

@keyframes pulseBorder {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.08);
        opacity: 0;
    }
}

/* ============================================
   PREMIUM CONTROLS MODAL - CYBERPUNK DESIGN
   ============================================ */
.controls-modal-premium {
    min-width: 580px;
    max-width: 700px;
    background: linear-gradient(145deg, #0a1628 0%, #162447 50%, #1a1a3e 100%);
    border: 2px solid #00f5ff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 245, 255, 0.3), inset 0 0 30px rgba(0, 245, 255, 0.05);
}

.controls-header {
    position: relative;
    background: linear-gradient(180deg, rgba(0, 245, 255, 0.15) 0%, transparent 100%);
    border-bottom: 1px solid rgba(0, 245, 255, 0.3);
}

.controls-header .header-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00f5ff, transparent);
    animation: headerGlow 2s ease-in-out infinite;
}

@keyframes headerGlow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.controls-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #00f5ff;
    text-shadow: 0 0 30px rgba(0, 245, 255, 0.8);
}

.header-icon {
    font-size: 1.5rem;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

.controls-body {
    padding: 25px;
}

.controls-section {
    margin-bottom: 25px;
}

.controls-section:last-child {
    margin-bottom: 0;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-icon {
    font-size: 1.2rem;
}

/* 3D Keyboard Keys */
.control-grid-premium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.control-card-premium {
    background: linear-gradient(145deg, rgba(0, 20, 40, 0.8), rgba(10, 30, 60, 0.9));
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 15px;
    padding: 18px 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.control-card-premium:hover {
    border-color: #00f5ff;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.2);
}

.key-group {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.key-3d {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 12px;
    background: linear-gradient(180deg, #2a3a5a 0%, #1a2a4a 50%, #0a1a3a 100%);
    border: 2px solid #3a5a8a;
    border-bottom: 4px solid #0a1020;
    border-radius: 8px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.15s ease;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.key-3d:hover {
    transform: translateY(2px);
    border-bottom-width: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.key-3d.key-space {
    min-width: 100px;
    font-size: 0.9rem;
}

.control-info {
    margin-top: 5px;
}

.control-name {
    color: #00f5ff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.control-desc {
    color: #8899aa;
    font-size: 0.7rem;
}

/* Game Mechanics Grid */
.mechanics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mechanic-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 20, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.3s ease;
}

.mechanic-item:hover {
    background: rgba(0, 30, 60, 0.8);
    border-color: rgba(0, 245, 255, 0.3);
    transform: translateX(5px);
}

.mechanic-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.mechanic-content {
    text-align: left;
}

.mechanic-title {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.mechanic-desc {
    color: #8899aa;
    font-size: 0.75rem;
}

.mechanic-desc .highlight {
    color: #00f5ff;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

/* Pro Tips Section */
.tips-section {
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 15px;
    padding: 18px 20px;
}

.tips-section .section-title {
    color: #a855f7;
    border-bottom-color: rgba(168, 85, 247, 0.2);
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccd;
    font-size: 0.8rem;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tip-item:hover {
    background: rgba(168, 85, 247, 0.15);
    transform: translateX(5px);
}

.tip-bullet {
    color: #a855f7;
    font-size: 1rem;
}

/* ============================================
   NICKNAME INPUT - slither.io / agar.io STYLE
   ============================================ */
.nickname-wrapper {
    position: relative;
    width: 280px;
    margin-bottom: 20px;
}

.nickname-input {
    width: 100%;
    padding: 14px 18px 14px 50px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(145deg, rgba(10, 20, 40, 0.9), rgba(15, 25, 50, 0.85));
    border: 2px solid rgba(0, 245, 255, 0.4);
    border-radius: 12px;
    outline: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 20px rgba(0, 245, 255, 0.15);
}

.nickname-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.nickname-input:hover {
    border-color: rgba(0, 245, 255, 0.6);
    box-shadow:
        0 4px 25px rgba(0, 0, 0, 0.5),
        0 0 35px rgba(0, 245, 255, 0.25);
}

.nickname-input:focus {
    border-color: #00f5ff;
    background: linear-gradient(145deg, rgba(0, 40, 80, 0.95), rgba(10, 50, 90, 0.9));
    box-shadow:
        0 0 0 4px rgba(0, 245, 255, 0.15),
        0 0 50px rgba(0, 245, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.nickname-input:focus::placeholder {
    opacity: 0.3;
}

.nickname-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.6));
    transition: all 0.3s ease;
    pointer-events: none;
}

.nickname-wrapper:focus-within .nickname-icon {
    transform: translateY(-50%) scale(1.15);
    filter: drop-shadow(0 0 15px rgba(0, 245, 255, 1));
}

/* Nickname Input Error State */
.nickname-input.error {
    border-color: #ff4444;
    animation: nicknameShake 0.4s ease;
    box-shadow:
        0 0 0 4px rgba(255, 68, 68, 0.2),
        0 0 30px rgba(255, 68, 68, 0.3);
}

@keyframes nicknameShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(5px);
    }
}

/* ============================================
   HUD NICKNAME DISPLAY
   ============================================ */
.hud-nickname {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.85rem;
    color: #00f5ff;
    text-shadow:
        0 0 10px rgba(0, 245, 255, 0.8),
        0 0 20px rgba(0, 245, 255, 0.5),
        0 0 30px rgba(0, 245, 255, 0.3);
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 245, 255, 0.3);
    animation: hudNicknameGlow 2s ease-in-out infinite;
}

@keyframes hudNicknameGlow {

    0%,
    100% {
        text-shadow:
            0 0 10px rgba(0, 245, 255, 0.8),
            0 0 20px rgba(0, 245, 255, 0.5);
    }

    50% {
        text-shadow:
            0 0 15px rgba(0, 245, 255, 1),
            0 0 30px rgba(0, 245, 255, 0.7),
            0 0 45px rgba(0, 245, 255, 0.4);
    }
}