:root {
    --bg-dark: #0a0b10;
    --primary: #00d2ff;
    --secondary: #ffd700;
    --text-main: #e6edf3;
    --text-muted: #8b949e;
    
    --neon-red: #ff4757;
    --neon-cyan: #00d2ff;
    --neon-green: #2ecc71;
    --neon-orange: #ffa502;

    --font-tech: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 50% 0%, #1c2333 0%, #0b0e14 70%);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0; padding: 15px;
    min-height: 100vh;
}

.background-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at 50% 50%, rgba(255, 71, 87, 0.05) 0%, transparent 40%); z-index: -1; pointer-events: none; }
.container { width: 90%; max-width: 900px; margin: 0 auto; position: relative; z-index: 2; padding-bottom: 40px; }

/* HEADER */
.header-section { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); flex-wrap: wrap; gap: 15px; }
.header-left, .header-right { display: flex; align-items: center; gap: 15px; }

.main-title { font-family: var(--font-tech); font-size: 2rem; font-weight: 700; margin: 0; letter-spacing: 1px; color: white; }
.highlight { color: var(--secondary); text-shadow: 0 0 15px var(--secondary); }
.v-tag { font-size: 0.5em; border: 1px solid var(--secondary); color: var(--secondary); padding: 2px 6px; border-radius: 4px; vertical-align: middle; margin-left: 10px; font-weight: 600; }

.home-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--secondary); color: var(--secondary); border-radius: 8px; font-size: 1.2rem; transition: 0.3s; text-decoration: none; }
.home-btn:hover { background: var(--secondary); color: #000; box-shadow: 0 0 15px var(--secondary); }

.btn-donate-header { display: flex; align-items: center; gap: 8px; padding: 6px 15px; background: rgba(255, 215, 0, 0.05); border: 1px solid #ffd700; color: #ffd700; border-radius: 50px; text-decoration: none; font-family: var(--font-tech); font-weight: 700; font-size: 0.8rem; transition: 0.3s; }
.btn-donate-header:hover { background: #ffd700; color: #000; box-shadow: 0 0 15px rgba(255, 215, 0, 0.5); }

.lang-select { background: #000; border: 1px solid var(--secondary); color: var(--text-muted); padding: 4px 8px; font-family: var(--font-tech); font-weight: 700; border-radius: 4px; outline: none; cursor: pointer; }
.lang-select option { background-color: #000; color: white; }

/* TABS */
.tabs-nav { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.tab-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); padding: 12px 25px; border-radius: 8px; font-family: var(--font-tech); font-weight: 700; font-size: 1.1rem; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 8px; }
.tab-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.tab-btn.active { background: rgba(255, 71, 87, 0.1); border-color: var(--neon-red); color: var(--neon-red); box-shadow: 0 0 15px rgba(255, 71, 87, 0.2); }
/* Specific active color for Phalanx tab via JS logic or nth-child */
.tab-btn:nth-child(2).active { background: rgba(0, 210, 255, 0.1); border-color: var(--neon-cyan); color: var(--neon-cyan); box-shadow: 0 0 15px rgba(0, 210, 255, 0.2); }

.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* PANELS */
.glass-panel { background: var(--panel-bg); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 25px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); }
.panel-title { margin: 0 0 20px 0; font-family: var(--font-tech); font-size: 1.4rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; letter-spacing: 1px; }

/* THEME COLORS */
.destruction-theme .panel-title { color: var(--neon-red); border-color: rgba(255, 71, 87, 0.3); }
.phalanx-theme .panel-title { color: var(--neon-cyan); border-color: rgba(0, 210, 255, 0.3); }

/* INPUT GRID */
.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.input-group { display: flex; flex-direction: column; }
.input-group label { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 5px; font-weight: 600; }
.input-cyber { background: rgba(0, 0, 0, 0.5); border: 1px solid #444; color: white; padding: 12px; font-family: 'Rajdhani'; font-size: 1.5rem; font-weight: bold; border-radius: 6px; transition: 0.3s; }
.input-cyber:focus { outline: none; }

/* DESTRUCTION THEME INPUTS */
.destruction-theme .input-cyber:focus { border-color: var(--neon-red); box-shadow: 0 0 15px rgba(255, 71, 87, 0.4); }
/* PHALANX THEME INPUTS */
.phalanx-theme .input-cyber:focus { border-color: var(--neon-cyan); box-shadow: 0 0 15px rgba(0, 210, 255, 0.4); }

/* RESULTS GRID */
.results-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }
.res-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 15px; text-align: center; transition: 0.3s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.res-card:hover { transform: translateY(-5px); }

.red-card:hover { border-color: var(--neon-red); background: rgba(255, 71, 87, 0.05); }
.orange-card:hover { border-color: var(--neon-orange); background: rgba(255, 165, 2, 0.05); }
.green-card:hover { border-color: var(--neon-green); background: rgba(46, 204, 113, 0.05); }

.res-icon { font-size: 1.8rem; margin-bottom: 5px; opacity: 0.8; }
.red-card .res-icon { color: var(--neon-red); }
.orange-card .res-icon { color: var(--neon-orange); }
.green-card .res-icon { color: var(--neon-green); }

.res-lbl { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; display: block; margin-bottom: 5px; }
.res-val { font-family: var(--font-tech); font-size: 2rem; font-weight: 700; color: white; }

/* PHALANX RESULTS */
.phal-result-box { text-align: center; margin-top: 20px; }
.range-display { margin-bottom: 30px; }
.range-label { display: block; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; font-weight: bold; }
.range-val { font-family: var(--font-tech); font-size: 3.5rem; color: var(--neon-cyan); text-shadow: 0 0 20px rgba(0, 210, 255, 0.4); display: block; line-height: 1; }
.range-unit { font-size: 1rem; color: var(--text-muted); }

.range-visual { display: flex; align-items: center; justify-content: space-between; background: rgba(0,0,0,0.3); padding: 20px; border-radius: 8px; border: 1px solid rgba(0, 210, 255, 0.2); }
.range-limit { text-align: center; }
.limit-lbl { display: block; font-size: 0.7rem; color: var(--text-muted); margin-bottom: 3px; }
.limit-val { font-family: var(--font-tech); font-size: 1.5rem; color: white; font-weight: bold; }

.range-line { flex: 1; height: 2px; background: rgba(0, 210, 255, 0.3); margin: 0 20px; position: relative; display: flex; align-items: center; justify-content: space-between; }
.range-dot { width: 8px; height: 8px; background: var(--neon-cyan); border-radius: 50%; box-shadow: 0 0 10px var(--neon-cyan); }
.range-beam { position: absolute; left: 0; width: 100%; height: 100%; background: var(--neon-cyan); opacity: 0.5; filter: blur(4px); }

/* COOKIE BANNER */
.cookie-banner { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 500px; background: #111; border: 1px solid var(--secondary); border-radius: 8px; padding: 15px; display: flex; align-items: center; justify-content: space-between; gap: 15px; z-index: 100; transition: bottom 0.5s; }
.cookie-banner.show { bottom: 20px; }
.cookie-text { font-size: 0.8rem; color: #ccc; }
.cookie-btn { background: var(--secondary); color: #000; border: none; padding: 6px 15px; font-weight: bold; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }

@media (max-width: 768px) {
    .input-grid, .results-grid { grid-template-columns: 1fr; }
    .range-visual { flex-direction: column; gap: 15px; }
    .range-line { width: 100%; height: 2px; margin: 10px 0; }
    .range-beam { width: 100%; height: 100%; }
}