/* VORTEX GAME CSS V21.0 - NEON MASTER (FULL + LAYOUT FIX) */

:root {
    --vortex-bg: #0f0c29;
    --vortex-primary: #a29bfe; /* Neon Lila */
    --vortex-gold: #ffd700;    /* Arany */
    --vortex-danger: #ff4d4d;  /* Piros */
    --vortex-glass: rgba(0, 0, 0, 0.7);
    --vortex-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- JÁTÉK KONTÉNER & KÁRTYA --- */
#vortex-game-container {
    font-family: var(--vortex-font);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    background: transparent;
    width: 100%;
}

#vortex-card {
    width: 100%;
    max-width: 400px;
    height: 700px;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(162, 155, 254, 0.3);
    position: relative; /* FONTOS: Ez tartja a modalt a kártyán belül */
    overflow: hidden;
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
}

/* --- NEON GOMBOK (ALAPOK) --- */
button, .action-btn, .hub-tab-btn, .shop-tab-btn, .inner-tab, .profile-tab {
    background: rgba(0, 0, 0, 0.6) !important; 
    border: 1px solid var(--vortex-primary) !important;
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0 5px rgba(162, 155, 254, 0.2);
    font-size: 11px;
    letter-spacing: 1px;
    outline: none;
    width: 100%;
    margin-bottom: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

button:hover, .action-btn:hover, .hub-tab-btn:hover, .shop-tab-btn:hover, .inner-tab:hover, .profile-tab:hover {
    background: var(--vortex-primary) !important;
    color: #000 !important;
    box-shadow: 0 0 20px var(--vortex-primary);
    transform: translateY(-2px);
    border-color: var(--vortex-primary) !important;
}

/* Aktív állapot */
.hub-tab-btn.active, .shop-tab-btn.active, .inner-tab.active, .profile-tab.active {
    background: var(--vortex-primary) !important;
    color: black !important;
    box-shadow: 0 0 15px var(--vortex-primary);
}

/* --- SZÍNVÁLTOZATOK (ARANY, PIROS, ZÖLD) --- */

/* Arany Gombok (Shop, Donate) */
button[style*="ffd700"], .action-btn[style*="ffd700"], #menu-shop-btn, #open-bank-from-shop {
    border-color: var(--vortex-gold) !important;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
    color: var(--vortex-gold) !important;
    background: rgba(0,0,0,0.6) !important;
}
button[style*="ffd700"]:hover, .action-btn[style*="ffd700"]:hover, #menu-shop-btn:hover, #open-bank-from-shop:hover {
    background: var(--vortex-gold) !important;
    color: black !important;
    box-shadow: 0 0 20px var(--vortex-gold);
}

/* Piros Gombok (Leave, Close) */
button[style*="ff4d4d"], button[style*="#333"], .close-main-shop, .close-bank-btn, #leave-btn, .kick-btn, .close-modal-btn {
    border-color: var(--vortex-danger) !important;
    color: var(--vortex-danger) !important;
    background: rgba(0,0,0,0.6) !important;
}
button[style*="ff4d4d"]:hover, .close-main-shop:hover, #leave-btn:hover, .kick-btn:hover {
    background: var(--vortex-danger) !important;
    color: white !important;
    box-shadow: 0 0 20px var(--vortex-danger);
}

/* Zöld Gombok (Start, Join) */
#create-btn, .join-btn, #start-turn-btn, #btn-reg-open, #btn-leaderboard {
    border-color: #00b894 !important;
    color: #00b894 !important;
}
#create-btn:hover, .join-btn:hover, #start-turn-btn:hover, #btn-reg-open:hover, #btn-leaderboard:hover {
    background: #00b894 !important;
    color: black !important;
    box-shadow: 0 0 20px #00b894;
}

/* --- VÁLASZ GOMBOK (PILLS) --- */
.option-pill {
    display: block;
    width: 90%;
    margin: 10px auto;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    text-align: center;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.2s;
    cursor: pointer;
}
.option-pill:hover {
    background: var(--vortex-primary);
    border-color: var(--vortex-primary);
    box-shadow: 0 0 20px var(--vortex-primary);
    transform: scale(1.05);
    color: black;
}

/* --- INPUT MEZŐK --- */
.vortex-input, textarea.vortex-input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #555;
    color: white;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    margin-bottom: 10px;
    font-family: var(--vortex-font);
    box-sizing: border-box;
}
.vortex-input:focus {
    border-color: var(--vortex-primary);
    outline: none;
    box-shadow: 0 0 10px rgba(162, 155, 254, 0.3);
}

/* --- KRITIKUS JAVÍTÁS: MODAL OVERLAY (KÖZÉPRE IGAZÍTÁS) --- */
.vortex-full-overlay {
    position: absolute; /* A kártyához rögzítjük */
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9); /* Kicsit sötétebb háttér */
    z-index: 9000;
    display: none; /* Alapból rejtve */
    justify-content: center; /* Vízszintes közép */
    align-items: center; /* Függőleges közép */
    flex-direction: column;
    backdrop-filter: blur(5px);
}
.vortex-active { display: flex !important; }

/* --- MODAL ABLAK (GLASS PANEL) --- */
.glass-panel {
    background: rgba(16, 16, 24, 0.98);
    border: 1px solid var(--vortex-primary);
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    border-radius: 15px;
    padding: 20px;
    position: relative;
    max-height: 90%;
    overflow-y: auto;
    width: 90%;
    max-width: 350px;
    margin: auto;
    text-align: center;
    color: white;
}

/* --- SHOP GRID (JAVÍTOTT LAYOUT) --- */
#shop-grid, #inventory-grid, #main-shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Mindig 3 oszlop */
    gap: 8px;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
    box-sizing: border-box;
}

.shop-item, .inv-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.shop-item:hover, .inv-item:hover {
    border-color: var(--vortex-gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    background: rgba(255, 215, 0, 0.05);
}

/* --- EFFEKTEK ÉS ANIMÁCIÓK (EZEK HIÁNYZOTTAK!) --- */
.vortex-effect-strobe { animation: strobe 0.1s infinite; }
@keyframes strobe { 0% { opacity: 1; } 50% { opacity: 0.2; background: white; color:black; } 100% { opacity: 1; } }

.vortex-effect-blur { filter: blur(4px); transition: filter 0.5s; }

.vortex-effect-quake { animation: quake 0.1s infinite; }
@keyframes quake { 0% { transform: translate(0,0); } 25% { transform: translate(5px,0); } 75% { transform: translate(-5px,0); } }

/* Bezáró gomb (X) */
.close-modal-btn {
    position: absolute;
    top: 10px; right: 10px;
    width: 30px; height: 30px;
    padding: 0;
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%;
}