:root {
    --primary: #00f7ff;       /* Neon Mavi */
    --secondary: #ff0055;     /* Neon Qırmızı */
    --prestige: #bd00ff;      /* Bənövşəyi (Big Bang üçün) */
    --bg-dark: #050508;       /* Tünd Kainat */
    --glass: rgba(20, 20, 30, 0.95); /* Şüşə effekti */
    --border: rgba(255, 255, 255, 0.15);
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- Əsas Sıfırlama --- */
body {
    margin: 0;
    overflow: hidden;
    background: var(--bg-dark);
    font-family: var(--font-main);
    color: white;
    user-select: none; /* Mətn seçimi ləğv */
    -webkit-tap-highlight-color: transparent; /* Mobildə klik rəngi olmasın */
}

/* --- Laylar (Layers) --- */
/* 1. Arxa Plan Ulduzlar */
#starfield {
    position: absolute;
    top: 0; left: 0;
    z-index: 0;
}

/* 2. Oyun Dünyası (Zoom olunan sahə) */
#game-world {
    position: absolute;
    width: 100vw; height: 100vh;
    z-index: 1;
    overflow: hidden;
    touch-action: none; /* Mobil sürüşdürmə üçün */
    cursor: grab;
}
#game-world:active { cursor: grabbing; }

.solar-system {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 0; height: 0;
}

/* Mərkəzi Clicker (The Core) */
#the-core {
    position: absolute;
    width: 110px; height: 110px;
    background: radial-gradient(circle at 30% 30%, #fff, var(--primary), #000);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 40px var(--primary);
    cursor: pointer;
    transition: transform 0.1s;
}
#the-core:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.core-glow {
    position: absolute;
    top: -15px; left: -15px; right: -15px; bottom: -15px;
    border-radius: 50%;
    box-shadow: 0 0 60px var(--primary);
    opacity: 0.6;
    animation: pulse 2s infinite;
    pointer-events: none;
}
@keyframes pulse {
    0% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.1); }
    100% { opacity: 0.6; transform: scale(1); }
}

/* Orbitallar (Fırlanan obyektlər) */
.orbital {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* --- UI Layer (İnterfeys) --- */
#ui-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 100;
    pointer-events: none; /* Kliklər arxaya keçsin */
}

/* Yuxarı Panel (HUD) */
.top-hud {
    pointer-events: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0.9), transparent);
}

.energy-text {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 247, 255, 0.4);
}
.gps-text {
    font-size: 13px;
    color: #aaa;
    margin-top: 2px;
}

.controls {
    display: flex;
    gap: 10px;
}

.hud-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 40px; height: 40px;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}
.hud-btn:hover { background: rgba(255,255,255,0.3); }

/* Mağaza Açan Düymə (FAB) */
.shop-toggle-btn {
    pointer-events: auto;
    position: absolute;
    bottom: 30px; right: 30px;
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: #000;
    font-size: 24px;
    box-shadow: 0 0 20px var(--primary);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
    cursor: pointer;
    transition: transform 0.2s;
}
.shop-toggle-btn:active { transform: scale(0.9); }

/* Mağaza Paneli */
.shop-panel {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 380px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 300;
}
.shop-panel.open { transform: translateX(0); }

.shop-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.shop-header h2 { margin: 0; font-size: 20px; letter-spacing: 1px; }

.close-shop {
    background: none; border: none;
    color: white; font-size: 24px;
    padding: 10px; cursor: pointer;
}

/* Tablar */
.tabs {
    display: flex;
    gap: 10px;
    padding: 10px 20px;
}
.tab-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border: none;
    color: #888;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}
.tab-btn.active {
    background: var(--primary);
    color: #000;
    font-weight: bold;
}

.shop-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: none;
    padding-bottom: 80px; /* Altdakı boşluq */
}
.shop-content.active { display: block; }

/* Mağaza Elementləri */
.shop-item, .upgrade-card {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 12px;
    transition: transform 0.2s;
}
.shop-item:hover { background: rgba(255,255,255,0.08); }

.item-info, .card-details {
    flex: 1;
    margin-left: 12px;
}
.item-info h4, .card-details h4 { margin: 0; font-size: 16px; }
.card-icon { font-size: 20px; width: 30px; text-align: center; color: var(--primary); }

/* Satın Alma Düyməsi */
.buy-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
    min-width: 90px;
    cursor: pointer;
    transition: all 0.2s;
}
/* Aktiv düymə */
.buy-btn:not(.disabled):hover {
    background: var(--primary);
    color: #000;
}
/* Passiv düymə */
.buy-btn.disabled {
    border-color: #555 !important;
    color: #555 !important;
    cursor: not-allowed;
    background: transparent !important;
}

/* Xüsusi: Prestige (Big Bang) Kartı */
.prestige-card {
    border-color: var(--prestige);
    background: rgba(189, 0, 255, 0.05);
}
.prestige-btn {
    border-color: var(--prestige) !important;
    color: var(--prestige) !important;
}
.prestige-btn:hover {
    background: var(--prestige) !important;
    color: #fff !important;
}

/* Bildirişlər (Toast) */
.toast {
    position: absolute;
    bottom: 100px; left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #000;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    animation: fadeUp 2s forwards;
    z-index: 500;
    white-space: nowrap;
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}
@keyframes fadeUp {
    0% { opacity: 0; transform: translate(-50%, 10px); }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* Uçan Mətn (+100) */
.float-text {
    position: absolute;
    color: #fff;
    font-weight: bold;
    font-size: 24px;
    pointer-events: none;
    animation: floatUp 0.8s ease-out forwards;
    text-shadow: 0 0 5px #000;
    z-index: 9999; /* Hər şeyin üstündə */
}
@keyframes floatUp {
    to { opacity: 0; transform: translateY(-80px); }
}

/* Qızıl Asteroid */
.golden-asteroid {
    position: absolute;
    width: 50px; height: 50px;
    background: radial-gradient(circle, #ffd700, #ff8800);
    border-radius: 50%;
    box-shadow: 0 0 25px #ffd700;
    cursor: pointer;
    z-index: 200;
    animation: spinAsteroid 2s linear infinite;
}
@keyframes spinAsteroid { to { transform: rotate(360deg); } }

/* Ayarlar Modalı (Overlay) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none; /* JS ilə 'flex' edilir */
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
.modal-overlay.open { display: flex; }

.modal-content {
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid var(--primary);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 90%;
    max-width: 350px;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 247, 255, 0.2);
}
.modal-content h2 { color: var(--primary); margin-top: 0; }

.lang-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}
.lang-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border);
    color: white;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
}
.lang-btn:hover {
    background: var(--primary);
    color: #000;
}
.close-modal-btn {
    position: absolute;
    top: 10px; right: 10px;
    background: none; border: none;
    color: #666; font-size: 20px;
    cursor: pointer;
}
.close-modal-btn:hover { color: #fff; }

/* Mobil Uyğunlaşdırma */
@media (max-width: 768px) {
    .shop-panel { width: 100%; } /* Tam ekran */
    .top-hud { padding: 10px 15px; }
    .energy-text { font-size: 24px; }
    .shop-toggle-btn { bottom: 20px; right: 20px; width: 55px; height: 55px; }
}