:root{
  /* EU flag colors (accentuated) */
  --eu-blue:#003399;
  --eu-blue-2:#002a7a;
  --eu-gold:#FFCC00;

  /* Light theme: white surfaces + blue-tinted background */
  --bg:#EEF3FF;
  --surface:#FFFFFF;
  --text:#0B1228;
  --muted:#334155;
  --border:rgba(0,51,153,.22);

  --shadow:0 12px 34px rgba(0, 51, 153, .12);
  --radius:16px;
}

body.theme-dark{
  /* Dark theme: deep EU blue surfaces */
  --eu-blue:#001a66;
  --eu-blue-2:#00124d;
  --eu-gold:#FFCC00;

  --bg:#050817;
  --surface:#071033;
  --text:#F8FAFC;
  --muted:#B6C2D6;
  --border:rgba(255,204,0,.22);

  --shadow:0 16px 46px rgba(0,0,0,.55);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 420px at 10% 0%, rgba(255,204,0,.18), transparent 60%),
    radial-gradient(900px 520px at 95% 0%, rgba(0,51,153,.28), transparent 60%),
    linear-gradient(180deg, rgba(0,51,153,.10), transparent 28%),
    var(--bg);
}

a{color:var(--eu-blue); text-decoration:none}
a:hover{color:var(--eu-blue-2); text-decoration:underline}
body.theme-dark a{color:#fff}
body.theme-dark a:hover{color:#f0f0f0}

.container{max-width:1100px;margin:22px auto 60px;padding:0 16px}

code.code{
  display:block;
  padding:12px 14px;
  border:1px solid var(--border);
  border-left:6px solid var(--eu-gold);
  border-radius:12px;
  background:rgba(255,255,255,.06);
  overflow:auto;
}

/* HEADER: blue bar + gold underline */
.topbar{
  position:sticky;top:0;z-index:10;
  padding:14px 16px;
  border-bottom:3px solid var(--eu-gold);
  background:linear-gradient(90deg, var(--eu-blue), var(--eu-blue-2));
  color:#fff;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  box-shadow:0 10px 26px rgba(0,51,153,.22);
}
body.theme-dark .topbar{
  box-shadow:0 14px 34px rgba(0,0,0,.55);
}

.brand{display:flex;align-items:center;gap:12px}
.flag-dot{
  width:44px;height:44px;border-radius:999px;
  background:conic-gradient(from 0deg, var(--eu-gold), #fff, var(--eu-blue), var(--eu-gold));
  box-shadow:0 0 0 4px rgba(255,204,0,.25);
}
.brand-title{font-weight:900; letter-spacing:.2px}
.brand-sub{color:rgba(255,255,255,.82);font-size:13px}

.topbar-actions{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap;justify-content:flex-end}

/* Buttons: white + gold borders; primary = gold */
.btn{
  border:1px solid rgba(255,255,255,.35);
  background:rgba(255,255,255,.92);
  color:var(--eu-blue);
  padding:10px 12px;border-radius:12px;
  cursor:pointer;
  font-weight:750;font-size:14px;
  transition:transform .08s ease, filter .12s ease, border-color .12s ease;
}
body.theme-dark .btn{color:#fff}
.btn:hover{transform:translateY(-1px); filter:brightness(1.02)}
.btn:active{transform:translateY(0)}
.btn-outline{
  background:transparent;
  color:#fff;
  border-color:rgba(255,204,0,.70);
}
.btn-outline:hover{border-color:var(--eu-gold)}
.btn-primary{
  background:var(--eu-gold);
  color:var(--eu-blue);
  border-color:rgba(255,255,255,.35);
}
body.theme-dark .btn-primary{color:#fff}
.btn-primary:hover{filter:brightness(1.03)}
.btn-danger{
  background:rgba(239,68,68,.15);
  border-color:rgba(239,68,68,.35);
  color:#fff;
}

/* Cards: white with gold top border, subtle blue shadow */
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-top:5px solid var(--eu-gold);
  box-shadow:var(--shadow);
  border-radius:var(--radius);
  padding:18px;
}
body.theme-dark .card{
  background:linear-gradient(180deg, rgba(0,51,153,.12), transparent 26%), var(--surface);
}

/* Layout */
.grid{display:grid;grid-template-columns:1.2fr .8fr;gap:16px;align-items:start}
@media (max-width:980px){.grid{grid-template-columns:1fr}}

h2{
  margin:0 0 10px;
  font-size:18px;
  color:var(--eu-blue);
}
body.theme-dark h2{color:#fff}
h2::after{
  content:"";
  display:block;
  width:54px;
  height:3px;
  margin-top:8px;
  background:var(--eu-gold);
  border-radius:999px;
}

.muted{color:var(--muted)}
.small{font-size:12px}
.strong{font-weight:800}

.notice{
  border-radius:14px;padding:12px 14px;margin-bottom:12px;
  border:1px solid var(--border);white-space:pre-wrap
}
.notice.success{border-color:rgba(255,204,0,.45);background:rgba(255,204,0,.10)}
.notice.error{border-color:rgba(239,68,68,.45);background:rgba(239,68,68,.10)}

.form{display:flex;flex-direction:column;gap:10px;max-width:520px}
.label{font-size:13px;color:var(--muted);font-weight:750}
.input{
  width:100%;padding:10px 12px;border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  outline:none;
}
body.theme-dark .input{background:rgba(255,255,255,.06); color:var(--text)}
.input:focus{
  border-color:rgba(255,204,0,.85);
  box-shadow:0 0 0 4px rgba(255,204,0,.18);
}

/* Login dropdown */
.login-box summary{list-style:none}
.login-box summary::-webkit-details-marker{display:none}
.login-form{margin-top:10px;display:flex;flex-direction:column;gap:8px;min-width:220px}

/* Player */
.player-controls{display:flex;flex-direction:column;gap:10px}
.btn-row{display:flex;gap:10px;flex-wrap:wrap}

.progress-row{display:flex;gap:10px;align-items:center}
.progress-row input[type="range"]{width:100%}
.time{font-variant-numeric:tabular-nums;color:var(--muted);min-width:44px;text-align:center}

.player-wrap{margin-top:12px}
video#player{
  width:100%;
  border-radius:14px;
  border:2px solid var(--eu-gold);
  box-shadow:0 14px 40px rgba(0,51,153,.18);
  background:#000;
  height:360px;
}
video#player.is-audio{height:70px}

.nowplaying{
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
}

/* News */
.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.icon-btn{
  width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:12px;
  border:1px solid rgba(255,204,0,.75);
  text-decoration:none;
  background:rgba(255,255,255,.90);
  color:var(--eu-blue);
}
body.theme-dark .icon-btn{color:#fff}
.icon-btn:hover{filter:brightness(1.03)}

.news-block{margin-top:14px;padding-top:12px;border-top:1px dashed rgba(255,204,0,.55)}
.news-title{font-weight:900;margin-bottom:6px;color:var(--eu-blue)}
body.theme-dark .news-title{color:#fff}
.news-list{margin:0;padding-left:18px}
.news-list li{margin:6px 0}

/* Tables */
.table-wrap{overflow:auto;border-radius:14px;border:1px solid var(--border)}
.table{width:100%;border-collapse:collapse;min-width:720px}
.table th,.table td{padding:12px 10px;border-bottom:1px solid var(--border);vertical-align:top}
.table thead th{text-align:left;font-size:13px;color:var(--muted)}
.right{text-align:right}
