/* --- style.css (MOBILE-FIRST TRON EDITION) --- */

:root {
    --gold: #D4AF37;
    --gold-glow: rgba(212, 175, 55, 0.4);
    --glass-bg: rgba(30, 30, 30, 0.6);
    --dark-grey: #1c1c1c;
    --text-main: #f0f0f0;
    --text-muted: #888;
    --neon-green: #00ff00;
}

/* --- GLOBAL LAYOUT --- */
html {
    background-color: #050505; 
    min-height: 100vh;
    display: flex;
    justify-content: center; 
}

body {
    background-color: #0a0a0a; 
    /* Subtle Grid Background */
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    
    color: var(--text-main);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    
    width: 100%;
    max-width: 550px; 
    min-height: 100vh;
    
    margin: 0;
    padding: 20px 20px 120px 20px; 
    box-sizing: border-box;
    
    box-shadow: 0 0 50px rgba(0,0,0,0.8); 
    border-left: 1px solid #222;
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* --- GLOWING HEADERS --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
    margin-bottom: 25px;
    position: relative; 
    height: 40px; 
}

.home-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
    position: relative;
}

.home-header h1 {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 2.5rem; 
    margin: 0;
    letter-spacing: 5px; 
    line-height: 1;
    text-shadow: 0 0 15px var(--gold-glow); 
}

.system-status {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-light {
    width: 6px;
    height: 6px;
    background-color: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--neon-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* --- NAVIGATION BUTTONS --- */
.header-home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #666;
    text-decoration: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid #333;
    transition: all 0.2s ease;
    z-index: 10; 
}
.header-home-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}

.header-center-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 1rem;
    text-align: center;
    white-space: nowrap;
    pointer-events: none; 
}

.header-right-info {
    position: absolute; 
    right: 0;
    top: 50%;
    transform: translateY(-50%); 
    display: flex;
    justify-content: flex-end;
    align-items: center;
    text-align: right;
    height: 100%;
    z-index: 10;
}

/* --- TRON BUTTONS (REFINED) --- */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px;
    
    /* Glass Effect */
    background: var(--glass-bg);
    
    color: #fff;
    border-radius: 4px; 
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #444; 
    border-left: 4px solid #444; /* Heavy left accent */
    
    transition: all 0.1s ease; /* Faster for mobile tap feel */
    box-sizing: border-box;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap; 
    overflow: hidden;    
}

/* Tap/Hover State */
.btn:active, .btn:hover {
    border-color: var(--gold);
    border-left-color: var(--gold);
    background: #252525;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    transform: scale(0.98); /* Slight press effect */
}

/* The Highlight Button (Indoor Hash) - Less Aggressive */
.btn.gold-primary {
    background: var(--glass-bg); /* Same dark bg */
    border: 1px solid var(--gold); /* Gold Border */
    border-left: 4px solid var(--gold); /* Gold Accent */
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1); /* Subtle Glow */
    color: #fff;
}
.btn.gold-primary:hover, .btn.gold-primary:active {
    background: rgba(212, 175, 55, 0.1); /* Slight gold tint on press */
    box-shadow: 0 0 20px var(--gold-glow);
}

/* Icon & Text - Always Visible */
.btn-icon { 
    font-size: 1.2rem; 
    margin-right: 15px; 
    /* REMOVED GRAYSCALE - Full color always */
    text-shadow: 0 0 5px rgba(255,255,255,0.2); 
}

.arrow { 
    font-size: 1.2rem; 
    color: #666; 
    transition: 0.2s; 
}
.btn:hover .arrow { color: var(--gold); }

.section-title {
    color: var(--gold);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    margin-top: 25px;
    border-bottom: 1px solid #333; 
    padding-bottom: 5px;
    width: 100%;
}

/* --- FORMS --- */
.form-group { margin-bottom: 25px; }

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

select, input[type="text"], input[type="password"] {
    width: 100%;
    padding: 16px;
    background-color: #111;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
    transition: 0.3s;
}

select:focus, input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* --- LEADERBOARD GRID --- */
.filter-bar {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 10px;
    margin-bottom: 20px;
}

.filter-pill {
    background: #111;
    color: #888;
    padding: 12px 5px; 
    border-radius: 4px; 
    font-size: 0.75rem; 
    border: 1px solid #333;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; 
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-pill.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    font-weight: 800;
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}

/* --- LEADERBOARD CARDS --- */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 40px;
}

.entry-card {
    background: #151515;
    border: 1px solid #333;
    padding: 15px 20px;
    border-radius: 6px;
    display: flex; 
    justify-content: space-between;
    align-items: center;
}

.entry-left { display: flex; align-items: center; gap: 15px; }
.rank-badge { font-size: 1.2rem; font-weight: 800; color: #444; width: 30px; text-align: center; }
.entry-details { display: flex; flex-direction: column; text-align: left; }
.entry-id { font-size: 1.1rem; font-weight: 700; color: #fff; }
.domain-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #222;
    color: #888;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    width: fit-content;
}
.entry-right { text-align: right; }
.score-big { font-size: 1.6rem; font-weight: 800; color: var(--text-main); }
.vote-count { font-size: 0.7rem; color: #555; margin-top: 2px; }

/* Podium Glow */
.entry-card.rank-1 {
    border: 1px solid var(--gold);
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2510 100%);
    box-shadow: 0 0 15px var(--gold-glow);
}
.entry-card.rank-1 .rank-badge, .entry-card.rank-1 .score-big { color: var(--gold); }

/* --- HOME DASHBOARD WIDGETS --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 8px;
    margin-bottom: 25px;
}

.mini-card {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #333;
    border-top: 2px solid #444; 
    padding: 10px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 0.3s;
}

.mini-card:hover {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

.mini-label {
    font-size: 0.6rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}
.mini-value { color: #fff; font-weight: 700; font-size: 0.9rem; }
.mini-score { color: var(--gold); font-size: 0.8rem; margin-top: 2px; }

/* Widget Colors */
.mini-gold { border-top-color: var(--gold); }
.mini-green { border-top-color: var(--neon-green); }

/* --- LOGOUT BUTTON --- */
.logout-btn {
    font-size: 0.7rem;
    color: #ff4d4d; 
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #333;
    padding: 5px 10px;
    border-radius: 4px;
    background: rgba(0,0,0,0.3);
    transition: 0.2s;
}
.logout-btn:hover {
    background: rgba(255, 77, 77, 0.1);
    border-color: #ff4d4d;
}

/* --- LOGIN BOX --- */
.login-container {
    background-color: #151515;
    padding: 40px 20px; 
    border-radius: 8px;
    width: 90%; 
    max-width: 400px; 
    box-sizing: border-box; 
    text-align: center;
    border: 1px solid #333;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    margin: auto 0; 
}
.error-msg {
    color: var(--error-red);
    font-size: 0.8rem;
    margin-top: 20px;
    display: none; 
    padding: 10px;
    border: 1px solid var(--error-red);
    background: rgba(255, 77, 77, 0.1);
}

/* --- SCORING CARDS --- */
.score-card {
    background-color: #151515;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.score-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.score-title { color: #fff; font-weight: 700; text-transform: uppercase; font-size: 1rem; letter-spacing: 1px; }
.score-value { color: var(--gold); font-weight: 800; font-size: 1.2rem; text-shadow: 0 0 5px var(--gold-glow); }
.criteria-list { font-size: 0.8rem; color: #777; margin-bottom: 20px; line-height: 1.4; }

/* Sliders */
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 24px; width: 24px;
    border-radius: 50%; background: var(--gold);
    cursor: pointer; margin-top: -10px;
    box-shadow: 0 0 10px var(--gold-glow);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%; height: 2px; cursor: pointer;
    background: #333; 
}

/* Sticky Footer */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 550px; 
    background-color: rgba(10, 10, 10, 0.95);
    border-top: 1px solid #333;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    z-index: 100;
}
.total-display { display: flex; flex-direction: column; }
.total-label { font-size: 0.7rem; color: #888; text-transform: uppercase; }
.total-number { font-size: 2rem; font-weight: 800; color: var(--gold); text-shadow: 0 0 10px var(--gold-glow); }

/* Footer */
footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    text-align: center;
    margin-top: auto;
    padding-top: 40px;
    padding-bottom: 20px;
    color: #444;
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.5; 
}
