:root{
    --bg:#07111f;
    --bg2:#0d1b2e;
    --panel:rgba(13, 22, 37, 0.72);
    --panel-strong:rgba(8, 14, 24, 0.88);
    --line:rgba(255,255,255,0.08);
    --text:#edf4ff;
    --muted:#9fb2cb;
    --cyan:#61d7ff;
    --teal:#52f0c8;
    --amber:#ffc857;
    --red:#ff6b6b;
    --green:#38d996;
    --shadow:0 20px 60px rgba(0,0,0,.35);
    --radius:24px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:
radial-gradient(circle at top left, #132641 0%, transparent 35%),
radial-gradient(circle at bottom right, #10283f 0%, transparent 35%),
linear-gradient(180deg, var(--bg) 0%, #050b13 100%);
color:var(--text);min-height:100%}

a{color:inherit;text-decoration:none}
button,input{font:inherit}

.noise{
    position:fixed;
    inset:0;
    pointer-events:none;
    opacity:.06;
    background-image:
        linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 80px 80px, 80px 80px;
    mask-image: radial-gradient(circle at center, black, transparent 85%);
}

.bg-orb{
    position:fixed;
    border-radius:999px;
    filter:blur(80px);
    opacity:.18;
    pointer-events:none;
}
.orb-1{
    width:360px;height:360px;
    background:#27b7ff;
    top:60px;left:-80px;
}
.orb-2{
    width:400px;height:400px;
    background:#32e0b0;
    right:-100px;bottom:30px;
}

.site-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:24px 40px;
    position:relative;
    z-index:2;
}
.site-header nav{
    display:flex;
    gap:18px;
}
.site-header nav a{
    color:var(--muted);
    transition:.2s ease;
}
.site-header nav a:hover{color:var(--text)}
.brand{
    font-weight:800;
    letter-spacing:.05em;
    text-transform:uppercase;
    font-size:14px;
    color:#d8f4ff;
}

.hero-shell,
.layout,
.admin-layout{
    width:min(1280px, calc(100% - 40px));
    margin:0 auto 50px;
    position:relative;
    z-index:2;
}

.hero-panel,
.results-panel,
.hero-weather,
.admin-intro,
.admin-sources,
.auth-card{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    backdrop-filter:blur(18px);
}

.hero-panel{
    padding:44px;
    min-height:320px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    margin-bottom:24px;
    overflow:hidden;
    position:relative;
}
.hero-panel::after{
    content:"";
    position:absolute;
    width:320px;
    height:320px;
    border-radius:50%;
    background:radial-gradient(circle, rgba(97,215,255,.22), transparent 70%);
    right:-70px;
    top:-70px;
}

.eyebrow{
    color:var(--cyan);
    text-transform:uppercase;
    font-size:12px;
    letter-spacing:.18em;
    margin-bottom:16px;
}
h1{
    margin:0 0 16px;
    font-size:clamp(32px, 6vw, 68px);
    line-height:1.04;
}
.hero-text{
    max-width:760px;
    color:var(--muted);
    font-size:18px;
    line-height:1.65;
}

.search-form{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
    margin-top:28px;
}
.search-form input,
.auth-form input{
    flex:1;
    min-width:220px;
    padding:16px 18px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    border-radius:18px;
    color:var(--text);
    outline:none;
}
.search-form button,
.auth-form button,
.vote-buttons button,
.toggle-btn,
.secondary-btn{
    border:0;
    border-radius:18px;
    padding:16px 20px;
    cursor:pointer;
    transition:.2s ease;
}
.search-form button,
.auth-form button,
.toggle-btn{
    background:linear-gradient(135deg, #68d7ff, #2ad4a0);
    color:#04101a;
    font-weight:700;
}
.search-form button:hover,
.auth-form button:hover,
.toggle-btn:hover{
    transform:translateY(-1px);
}
.secondary-btn{
    background:rgba(255,255,255,.06);
    color:var(--text);
    border:1px solid rgba(255,255,255,.1);
}

.results-panel,
.admin-sources{
    padding:26px;
}
.section-title{
    font-size:13px;
    color:var(--cyan);
    text-transform:uppercase;
    letter-spacing:.16em;
    margin-bottom:20px;
}

.location-grid,
.source-grid,
.admin-source-grid{
    display:grid;
    gap:18px;
    grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
}
.location-card,
.source-card,
.admin-source-card{
    border-radius:22px;
    padding:22px;
    border:1px solid rgba(255,255,255,.07);
    background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    transition:.25s ease;
}
.location-card:hover,
.source-card:hover,
.admin-source-card:hover{
    transform:translateY(-4px);
    border-color:rgba(97,215,255,.32);
}
.location-name{
    font-size:22px;
    font-weight:700;
    margin-bottom:8px;
}
.location-meta,
.location-coords,
.muted{
    color:var(--muted);
}

.hero-weather{
    padding:34px;
    margin-bottom:24px;
}
.location-head p{
    color:var(--muted);
    margin-top:8px;
}
.consensus-grid{
    display:grid;
    grid-template-columns:280px 1fr;
    gap:22px;
    margin-top:28px;
}
.big-temp{
    min-height:220px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:28px;
    font-size:72px;
    font-weight:800;
    background:
        radial-gradient(circle at top left, rgba(255,200,87,.18), transparent 55%),
        linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    border:1px solid rgba(255,255,255,.08);
}
.consensus-stats{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:16px;
}
.stat-card{
    border-radius:22px;
    padding:20px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.06);
}
.stat-card span{
    display:block;
    color:var(--muted);
    margin-bottom:8px;
}
.stat-card strong{
    font-size:24px;
}
.spread-note{
    margin-top:18px;
    color:var(--muted);
}

.source-top,
.admin-source-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
}
.source-top h3,
.admin-source-top h3{
    margin:0 0 4px;
    font-size:22px;
}
.source-rep{
    color:var(--muted);
}
.source-status,
.toggle-badge{
    padding:8px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    text-transform:uppercase;
}
.status-ok,
.enabled{
    background:rgba(56,217,150,.12);
    color:#8ff2c3;
    border:1px solid rgba(56,217,150,.24);
}
.status-error,
.disabled{
    background:rgba(255,107,107,.12);
    color:#ff9a9a;
    border:1px solid rgba(255,107,107,.24);
}

.provider-main{
    margin:24px 0 16px;
}
.provider-temp{
    font-size:50px;
    font-weight:800;
    line-height:1;
}
.provider-desc{
    margin-top:8px;
    color:var(--muted);
}
.mini-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
    margin-bottom:18px;
}
.mini-stats div{
    background:rgba(255,255,255,.04);
    border-radius:18px;
    padding:14px;
}
.mini-stats span{
    display:block;
    color:var(--muted);
    font-size:13px;
    margin-bottom:6px;
}
.hour-strip{
    display:flex;
    gap:10px;
    overflow:auto;
    padding-bottom:6px;
}
.hour-pill{
    min-width:76px;
    padding:12px 14px;
    border-radius:16px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.06);
}
.hour-pill span{
    display:block;
    color:var(--muted);
    font-size:12px;
    margin-bottom:6px;
}
.vote-form{
    margin-top:18px;
}
.vote-buttons{
    display:flex;
    gap:10px;
}
.vote-buttons button{
    background:rgba(255,255,255,.06);
    color:var(--text);
    border:1px solid rgba(255,255,255,.08);
    padding:12px 14px;
}
.vote-buttons button:hover{
    background:rgba(255,255,255,.10);
}

.rep-good{
    border-left:4px solid #38d996;
}
.rep-medium{
    border-left:4px solid #ffc857;
}
.rep-bad{
    border-left:4px solid #ff6b6b;
}

.provider-error,
.empty-state{
    color:#ffb0b0;
    background:rgba(255,107,107,.08);
    border:1px solid rgba(255,107,107,.18);
    padding:16px;
    border-radius:16px;
}

.admin-layout{
    padding-bottom:40px;
}
.admin-intro{
    padding:30px;
    margin-bottom:20px;
}
.admin-intro h1{
    font-size:44px;
    margin-bottom:10px;
}
.rep-score{
    font-size:42px;
    font-weight:800;
    margin:16px 0;
}
.rep-breakdown{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px;
    margin-bottom:16px;
}
.rep-breakdown div{
    background:rgba(255,255,255,.04);
    border-radius:16px;
    padding:14px;
}
.rep-breakdown span{
    display:block;
    color:var(--muted);
    margin-bottom:6px;
}

.auth-shell{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:30px;
}
.auth-card{
    width:min(520px, 100%);
    padding:32px;
}
.auth-card h1{
    font-size:42px;
    margin-bottom:20px;
}
.auth-form{
    display:flex;
    flex-direction:column;
    gap:12px;
}
.auth-form label{
    color:var(--muted);
    font-size:14px;
}
.back-link{
    display:inline-block;
    margin-top:20px;
    color:var(--cyan);
}

.flash{
    padding:14px 16px;
    border-radius:16px;
    margin:14px 0;
}
.flash.success{
    background:rgba(56,217,150,.10);
    border:1px solid rgba(56,217,150,.2);
    color:#b4ffd8;
}
.flash.error{
    background:rgba(255,107,107,.10);
    border:1px solid rgba(255,107,107,.2);
    color:#ffc4c4;
}

@media (max-width: 900px){
    .site-header{padding:20px}
    .hero-shell,.layout,.admin-layout{width:min(100% - 20px, 1280px)}
    .hero-panel{padding:28px}
    .consensus-grid{grid-template-columns:1fr}
    .big-temp{min-height:150px;font-size:56px}
    .consensus-stats{grid-template-columns:1fr}
    .mini-stats{grid-template-columns:1fr}
}