/* ===== EUROVISION 2026 — tirco.tv ===== */
:root {
  --bg:          #0b001e;
  --bg2:         #13003a;
  --card:        rgba(255,255,255,0.07);
  --card-hover:  rgba(255,255,255,0.11);
  --card-border: rgba(255,255,255,0.12);
  --gold:        #FFD700;
  --gold-dim:    rgba(255,215,0,0.18);
  --pink:        #FF1493;
  --blue:        #4fc3f7;
  --purple:      #9c4dcc;
  --text:        #ffffff;
  --text-dim:    rgba(255,255,255,0.55);
  --radius:      12px;
  --header-h:    54px;
  --tab-h:       44px;
}

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* Everything above the canvas */
#consent-overlay, #notif-overlay, header, .tab-bar, main, #login-nudge {
  position: relative; z-index: 1;
}

ul { list-style: none; }
a  { color: inherit; text-decoration: none; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar            { width: 5px; height: 5px; }
::-webkit-scrollbar-track      { background: transparent; }
::-webkit-scrollbar-thumb      { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,0.3); }

/* ══════════════════════════════════════════════════════════
   NOTIFICATION OVERLAY
══════════════════════════════════════════════════════════ */
#notif-overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 99999;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
#notif-overlay.visible { opacity: 1; pointer-events: auto; }

#notif-box {
  background: linear-gradient(145deg, #1a0050, #3d0080);
  border: 2px solid var(--gold);
  border-radius: 22px;
  padding: 32px 40px 28px;
  text-align: center;
  max-width: 90vw; width: 380px;
  box-shadow: 0 0 70px rgba(255,215,0,0.25), 0 24px 60px rgba(0,0,0,0.6);
  position: relative;
  transform: scale(0.8) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
#notif-overlay.visible #notif-box { transform: scale(1) translateY(0); }

/* severity border colors */
#notif-box.sip-1 { border-color: #FFD700; }
#notif-box.sip-2 { border-color: #FF8C00; }
#notif-box.sip-3 { border-color: #FF4500; }
#notif-box.chug  { animation: rgbGlow 0.6s ease infinite alternate; }

#notif-icon   { font-size: 2.8rem; margin-bottom: 10px; animation: bounce 0.6s ease infinite alternate; }
#notif-title  { font-size: 1rem; font-weight: 700; color: var(--text-dim); margin-bottom: 6px; }
#notif-message{
  font-size: 2rem; font-weight: 900; color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.06em;
  text-shadow: 0 0 20px rgba(255,215,0,0.5);
  margin-bottom: 14px; line-height: 1.1;
}
#notif-sender { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 14px; }
#notif-progress{
  height: 4px; background: rgba(255,255,255,0.15); border-radius: 2px; overflow: hidden;
}
#notif-progress-bar{
  height: 100%; background: var(--gold); border-radius: 2px; width: 100%;
  transition: width linear;
}
#notif-close {
  position: absolute; top: 10px; right: 12px;
  background: rgba(255,255,255,0.08); border: none; border-radius: 50%;
  width: 28px; height: 28px; color: var(--text-dim);
  cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
#notif-close:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ══════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════ */
header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(11,0,30,0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,215,0,0.25);
  box-shadow: 0 1px 30px rgba(255,215,0,0.08), 0 4px 20px rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  z-index: 200;
}
header::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--pink), var(--blue), var(--purple), var(--pink), var(--gold));
  background-size: 200% auto;
  animation: gradientSlide 8s linear infinite;
}

.back-btn {
  color: var(--text-dim); font-size: 0.8rem;
  padding: 5px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.2s; white-space: nowrap;
}
.back-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }

.header-brand { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.brand-esc   { font-size: 0.55rem; letter-spacing: 0.35em; color: var(--text-dim); text-transform: uppercase; }
.brand-year  {
  font-size: 1.35rem; font-weight: 900; letter-spacing: 0.1em;
  background: linear-gradient(90deg, var(--gold), var(--pink), var(--blue), var(--pink), var(--gold));
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: gradientSlide 10s linear infinite;
}

/* ── User icon ───────────────────────────────────────────── */
.user-icon { position: relative; cursor: pointer; }
#user-avatar {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 10px; border-radius: 20px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  transition: all 0.2s; user-select: none; cursor: pointer;
}
#user-avatar img {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3); flex-shrink: 0;
  filter: brightness(1.2);
}
#user-avatar img.logged-in { border-color: #4CAF50; }
#user-label {
  font-size: 0.78rem; font-weight: 600; color: var(--text); white-space: nowrap;
}
#user-avatar:hover { background: rgba(255,255,255,0.14); border-color: var(--gold-dim); }

#user-dropdown {
  display: none; position: absolute; top: calc(100% + 10px); right: 0;
  background: #1a0050; border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 12px; min-width: 190px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6); z-index: 300;
}
#user-dropdown.open { display: block; }
#user-dropdown p {
  font-size: 0.82rem; color: var(--text-dim); padding: 4px 0 8px;
  border-bottom: 1px solid var(--card-border); margin-bottom: 6px;
}
#user-dropdown p strong { color: var(--text); }
.dropdown-btn {
  display: block; width: 100%; padding: 8px 10px; margin-top: 5px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 8px;
  color: var(--text); cursor: pointer; font-size: 0.82rem; text-align: left;
  transition: all 0.2s;
}
.dropdown-btn:hover { background: var(--gold-dim); border-color: var(--gold-dim); color: var(--gold); }

/* ══════════════════════════════════════════════════════════
   MOBILE TAB BAR
══════════════════════════════════════════════════════════ */
.tab-bar {
  display: none; position: fixed;
  top: var(--header-h); left: 0; right: 0; height: var(--tab-h);
  background: rgba(11,0,30,0.97); border-bottom: 1px solid var(--card-border); z-index: 199;
}
.tab-btn {
  flex: 1; height: 100%; background: transparent; border: none;
  border-bottom: 2px solid transparent; color: var(--text-dim);
  font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: all 0.18s;
}
.tab-btn.active {
  color: var(--gold); border-bottom-color: var(--gold);
  text-shadow: 0 0 12px rgba(255,215,0,0.6);
}

/* ══════════════════════════════════════════════════════════
   MAIN LAYOUT  (desktop: 3 columns)
══════════════════════════════════════════════════════════ */
main {
  display: flex;
  padding-top: var(--header-h);
  min-height: 100vh;
}

/* ── Left panel — country info ───────────────────────────── */
.left-panel {
  width: 270px; min-width: 220px; flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.1);
  background: rgba(11,0,30,0.6);
  backdrop-filter: blur(24px);
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.country-bg {
  width: 100%; min-height: 100%;
  background-color: var(--bg2);
  background-size: cover; background-position: center top;
  background-repeat: no-repeat;
  position: relative;
}
.country-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(11,0,30,0.93) 55%);
}
.country-info-content { position: relative; z-index: 2; padding: 24px 16px 20px; }

#country-name {
  font-size: 1.3rem; font-weight: 800; color: var(--gold);
  margin-bottom: 12px;
  text-shadow: 0 0 18px rgba(255,215,0,0.5), 0 2px 8px rgba(0,0,0,0.5);
}
.artist-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; margin-bottom: 5px;
}
.artist-row .icon { font-size: 0.95rem; flex-shrink: 0; }
.artist-row .label { color: var(--text-dim); }
.artist-row .value { color: var(--text); font-weight: 600; }

#country-info {
  font-size: 0.78rem; color: var(--text-dim); line-height: 1.65;
  margin: 14px 0; max-height: 38vh; overflow-y: auto;
}

.esc-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; margin-top: 4px;
  background: linear-gradient(90deg, #5e35b1, #7b1fa2);
  border-radius: 8px; color: #fff; font-size: 0.8rem; font-weight: 600;
  transition: all 0.2s; border: none; cursor: pointer;
}
.esc-link:hover { opacity: 0.85; transform: translateY(-1px); }

/* ── Center panel — rating form + list ──────────────────── */
.center-panel {
  flex: 1; min-width: 0;
  padding: 28px 24px;
  overflow-y: auto;
}

.page-title {
  text-align: center; font-size: 2.1rem; font-weight: 900;
  background: linear-gradient(90deg, var(--gold), var(--pink), var(--blue), var(--pink), var(--gold));
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 24px; letter-spacing: 0.04em;
  animation: gradientSlide 14s linear infinite;
}
.page-subtitle {
  text-align: center; font-size: 0.78rem; color: var(--text-dim);
  margin-top: -18px; margin-bottom: 24px; letter-spacing: 0.12em; text-transform: uppercase;
}

/* Country selector */
.field-label {
  display: block; font-size: 0.72rem; font-weight: 700;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 6px;
}
select {
  width: 100%; padding: 11px 36px 11px 12px;
  background: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath fill='%23ffffff55' d='M5 7L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  border: 1px solid var(--card-border); border-radius: var(--radius);
  color: var(--text); font-size: 0.95rem; cursor: pointer;
  appearance: none; transition: border-color 0.2s;
}
select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
select option, select optgroup { background: #1a0050; color: var(--text); }

.country-select-wrapper { margin-bottom: 18px; }

/* Rating form card */
#rating-form {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.14);
  border-top-color: rgba(255,255,255,0.22);
  border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}

.rating-group     { margin-bottom: 14px; }
.rating-label-row { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.rating-label     {
  font-size: 0.7rem; font-weight: 700;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.12em;
}

/* Category tooltip */
.cat-tip {
  width: 15px; height: 15px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; color: var(--text-dim);
  cursor: help; position: relative; flex-shrink: 0;
  line-height: 1;
}
.cat-tip::before { content: '?'; }
.cat-tip::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: rgba(15,0,45,0.97);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px; padding: 7px 11px;
  font-size: 0.72rem; font-weight: 400;
  text-transform: none; letter-spacing: 0; color: #fff;
  width: 210px; white-space: normal; line-height: 1.45;
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s;
  z-index: 50;
}
.cat-tip:hover::after,
.cat-tip:focus::after { opacity: 1; }

.rating-buttons   { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.rating-buttons input[type="radio"] { display: none; }
.rating-buttons label {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px; cursor: pointer;
  font-size: 0.78rem; font-weight: 700;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.13);
  color: var(--text-dim); transition: all 0.12s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.rating-buttons label:hover        { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }
.rating-buttons input:checked+label{
  background: var(--gold); color: #000; border-color: var(--gold);
  box-shadow: 0 0 16px rgba(255,215,0,0.55), 0 0 4px rgba(255,215,0,0.8);
  font-weight: 900; transform: scale(1.12);
}

/* Submit button */
.submit-btn {
  display: block; width: 100%; padding: 13px;
  background: linear-gradient(90deg, var(--purple), #c2185b, #7b1fa2);
  border: none; border-radius: var(--radius);
  color: #fff; font-size: 0.95rem; font-weight: 700; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.1em;
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
  margin-top: 18px; position: relative; overflow: hidden;
}
.submit-btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.22) 50%, transparent 65%);
  transform: translateX(-100%); transition: transform 0.5s ease;
}
.submit-btn:hover::after { transform: translateX(100%); }
.submit-btn:hover  {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(155,48,255,0.5), 0 0 20px rgba(255,20,147,0.2);
  background: linear-gradient(90deg, #c2185b, var(--blue), var(--purple));
}
.submit-btn:active { transform: translateY(0); }
.submit-btn.success{ background: linear-gradient(90deg, #2e7d32, #388e3c); }

/* Ratings list */
.ratings-list-section        { margin-top: 8px; }
.ratings-list-section h2     { font-size: 1.1rem; font-weight: 700; color: var(--gold); margin-bottom: 12px; }
.sort-row                    { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.sort-row label              { font-size: 0.78rem; color: var(--text-dim); white-space: nowrap; }
.sort-row select             { flex: 1; padding: 8px 32px 8px 10px; font-size: 0.85rem; }

.rating-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.11);
  border-top-color: rgba(255,255,255,0.18);
  border-radius: var(--radius); padding: 11px 14px; margin-bottom: 7px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.rating-item:hover {
  border-color: rgba(255,215,0,0.3);
  background: rgba(255,215,0,0.04);
  box-shadow: 0 0 20px rgba(255,215,0,0.07);
}
.rating-item-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px;
}
.rating-country { font-size: 0.92rem; font-weight: 700; }
.rating-total   { font-size: 1.05rem; font-weight: 900; color: var(--gold); }
.rating-scores  { display: flex; flex-wrap: wrap; gap: 4px; }
.score-chip {
  font-size: 0.68rem; padding: 2px 7px;
  background: rgba(255,255,255,0.07); border-radius: 100px; color: var(--text-dim);
}
.score-chip strong { color: var(--text); }

.clear-btn {
  display: block; margin: 16px auto 0; padding: 8px 22px;
  background: rgba(255,50,50,0.1); border: 1px solid rgba(255,50,50,0.3);
  border-radius: 8px; color: #ff7070; cursor: pointer;
  font-size: 0.8rem; font-weight: 600; transition: all 0.2s;
}
.clear-btn:hover { background: rgba(255,50,50,0.22); border-color: rgba(255,50,50,0.55); }

/* ── Right panel — drinking game ────────────────────────── */
.right-panel {
  width: 290px; min-width: 250px; flex-shrink: 0;
  border-left: 1px solid rgba(255,255,255,0.1);
  background: rgba(11,0,30,0.6);
  backdrop-filter: blur(24px);
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h)); overflow-y: auto;
  padding: 20px 14px;
}

.drinks-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 16px;
}
.drinks-title {
  grid-column: 2;
  font-size: 1rem; font-weight: 800; color: var(--gold);
  letter-spacing: 0.05em;
}
.notif-toggle {
  display: flex;
  grid-column: 1;
  justify-self: start;
  align-items: center; gap: 5px;
}
.vibration-toggle {
  display: none; /* shown by JS only on mobile + vibration-capable devices */
  grid-column: 3;
  justify-self: end;
  align-items: center; gap: 5px;
}
.vibration-toggle.supported { display: flex; }
.vibration-toggle-label {
  font-size: 0.62rem; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.08em; line-height: 1;
}
/* pill toggle */
.vib-switch {
  position: relative; width: 30px; height: 17px; flex-shrink: 0;
}
.vib-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.vib-track {
  position: absolute; inset: 0; border-radius: 100px;
  background: rgba(255,255,255,0.12);
  transition: background 0.2s; cursor: pointer;
}
.vib-track::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 13px; height: 13px; border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transition: transform 0.2s, background 0.2s;
}
.vib-switch input:checked + .vib-track {
  background: rgba(74, 222, 128, 0.35);
}
.vib-switch input:checked + .vib-track::after {
  transform: translateX(13px);
  background: #4ade80;
}

.rule-section        { margin-bottom: 18px; }
.rule-section-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.rule-section-title  {
  font-size: 0.68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold);
}
.rule-reset-btn {
  background: transparent; border: 1px solid rgba(255,215,0,0.25);
  color: var(--gold); font-size: 0.72rem; padding: 2px 8px;
  border-radius: 4px; cursor: pointer; transition: all 0.18s;
}
.rule-reset-btn:hover { background: var(--gold-dim); }

.rule-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--card);
  border: 1px solid var(--card-border); border-radius: 9px;
  margin-bottom: 5px; cursor: pointer; transition: all 0.18s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.rule-item:hover  { background: var(--card-hover); }

.sip-badge {
  font-size: 0.65rem; font-weight: 800; padding: 2px 7px;
  border-radius: 100px; white-space: nowrap; flex-shrink: 0;
}
.sip-badge.s1   { background: rgba(255,215,0,0.18); color: #FFD700; }
.sip-badge.s2   { background: rgba(255,140,0,0.18); color: #FF8C00; }
.sip-badge.s3   { background: rgba(255,69,0,0.18);  color: #FF4500; }
.sip-badge.schug{ background: rgba(255,20,147,0.18); color: #FF1493; }
.rule-text { font-size: 0.78rem; color: var(--text); flex: 1; line-height: 1.3; }

/* Add custom rule */
.add-rule-section {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--card-border);
}
.add-rule-title {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 10px;
}
.add-rule-form  { display: flex; flex-direction: column; gap: 6px; }
.add-rule-form select, .add-rule-form input {
  padding: 8px 10px; font-size: 0.8rem;
}
.add-rule-form input {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 8px; color: var(--text); width: 100%;
}
.add-rule-form input::placeholder { color: var(--text-dim); }
.add-rule-form input:focus { outline: none; border-color: var(--gold); }
.add-rule-btn {
  padding: 8px; background: linear-gradient(90deg, var(--purple), #7b1fa2);
  border: none; border-radius: 8px; color: #fff;
  font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: opacity 0.2s;
}
.add-rule-btn:hover { opacity: 0.85; }

.panel-footer {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--card-border); text-align: center;
}
.panel-footer p { font-size: 0.72rem; color: var(--text-dim); margin-bottom: 8px; }
.donate-btn {
  display: inline-block; padding: 8px 18px;
  background: #e0bb35; border: none; border-radius: 8px;
  color: #333; font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: opacity 0.2s;
}
.donate-btn:hover { opacity: 0.85; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 900px)
══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .tab-bar  { display: flex; }

  main {
    padding-top: calc(var(--header-h) + var(--tab-h));
    flex-direction: column;
  }

  .left-panel, .right-panel { display: none; }

  .center-panel, .right-panel {
    display: none; width: 100%; max-width: 100%;
    padding: 16px; border: none; position: static; height: auto; overflow: visible;
  }
  .tab-pane.active { display: block !important; }

  .page-title    { font-size: 1.5rem; }
  .page-subtitle { margin-top: -12px; }

  .rating-buttons label { width: 30px; height: 30px; font-size: 0.72rem; border-radius: 7px; }

  #rating-form { padding: 14px; }
}

/* ══════════════════════════════════════════════════════════
   CONSENT / WELCOME MODAL
══════════════════════════════════════════════════════════ */
#consent-overlay {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#consent-overlay.visible { opacity: 1; pointer-events: auto; }

#consent-box {
  background: rgba(20, 0, 60, 0.85);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255,215,0,0.4);
  border-top-color: rgba(255,215,0,0.6);
  border-radius: 20px; padding: 36px 32px 28px;
  max-width: 420px; width: 92vw; text-align: center;
  box-shadow: 0 0 60px rgba(255,215,0,0.15), 0 30px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
  transform: scale(0.92) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  animation: borderPulse 3s ease-in-out infinite;
}
#consent-overlay.visible #consent-box { animation: borderPulse 3s ease-in-out infinite; }
#consent-overlay.visible #consent-box { transform: scale(1) translateY(0); }

#consent-logo {
  font-size: 2.5rem; margin-bottom: 12px;
}
#consent-title {
  font-size: 1.35rem; font-weight: 900; margin-bottom: 4px;
  background: linear-gradient(90deg, var(--gold), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
#consent-subtitle {
  font-size: 0.78rem; color: var(--text-dim); margin-bottom: 20px;
  letter-spacing: 0.1em; text-transform: uppercase;
}

.consent-info {
  list-style: none; text-align: left;
  background: rgba(255,255,255,0.04); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 22px;
}
.consent-info li {
  font-size: 0.82rem; color: var(--text-dim); padding: 5px 0; line-height: 1.4;
}
.consent-info li strong { color: var(--text); }
.consent-info li + li { border-top: 1px solid rgba(255,255,255,0.06); }

#consent-guest-actions, #consent-loggedin-actions {
  display: flex; flex-direction: column; gap: 8px;
}
#consent-welcome-msg {
  font-size: 0.88rem; color: #4ade80; margin-bottom: 4px; font-weight: 600;
}

.consent-btn {
  width: 100%; padding: 12px; border-radius: 10px;
  font-size: 0.9rem; font-weight: 700; cursor: pointer;
  border: none; transition: all 0.18s; font-family: inherit;
}
.consent-primary   { background: linear-gradient(90deg, var(--purple), #7b1fa2); color: #fff; }
.consent-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.consent-secondary {
  background: transparent; color: var(--gold);
  border: 1px solid rgba(255,215,0,0.4);
}
.consent-secondary:hover { background: var(--gold-dim); }
.consent-ghost     { background: transparent; color: var(--text-dim); font-size: 0.8rem; padding: 8px; }
.consent-ghost:hover { color: var(--text); }

/* ── Login nudge banner (shown after consent if not logged in) ── */
#login-nudge {
  display: none;
  background: rgba(155,77,204,0.15); border: 1px solid rgba(155,77,204,0.3);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 16px;
  font-size: 0.8rem; color: var(--text-dim);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
#login-nudge span { flex: 1; }
#login-nudge a {
  color: var(--gold); font-weight: 700; white-space: nowrap;
  background: rgba(255,215,0,0.1); padding: 4px 10px;
  border-radius: 6px; border: 1px solid var(--gold-dim); font-size: 0.78rem;
}
#login-nudge a:hover { background: var(--gold-dim); }
#login-nudge-close {
  background: transparent; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 1rem; padding: 0 2px; flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   COMMUNITY AVERAGE CARD
══════════════════════════════════════════════════════════ */
#community-avg {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,215,0,0.25);
  border-top-color: rgba(255,215,0,0.4);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,215,0,0.08);
  border-radius: var(--radius); padding: 14px 16px;
  margin-top: 12px; animation: fadeSlideIn 0.3s ease;
}
.avg-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.avg-header span:first-child { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.avg-badge {
  font-size: 0.65rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--gold);
  background: rgba(255,215,0,0.12); padding: 3px 8px; border-radius: 100px;
}
.avg-body {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.avg-col { flex: 1; text-align: center; }
.avg-col-label { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.avg-col-value { font-size: 1.6rem; font-weight: 900; color: var(--gold); line-height: 1; }
.avg-votes { font-size: 0.68rem; color: var(--text-dim); margin-top: 3px; }
.avg-divider { color: var(--text-dim); font-size: 0.78rem; font-weight: 600; flex-shrink: 0; }
.avg-delta {
  text-align: center; font-size: 0.82rem; font-weight: 700;
  padding: 5px 10px; border-radius: 8px; margin-bottom: 10px;
}
.avg-delta.up   { color: #4ade80; background: rgba(74,222,128,0.1); }
.avg-delta.down { color: #f87171; background: rgba(248,113,113,0.1); }
.avg-delta.even { color: var(--text-dim); background: rgba(255,255,255,0.05); }

.avg-breakdown {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
}
.avg-br-item {
  background: rgba(255,255,255,0.04); border-radius: 6px;
  padding: 5px 4px; text-align: center;
}
.avg-br-label { font-size: 0.58rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; display: block; }
.avg-br-val   { font-size: 0.8rem; font-weight: 700; color: var(--text); }

/* ══════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════ */
@keyframes twelveFlash {
  0%   { background: var(--gold); color: #000; box-shadow: 0 0 0 rgba(255,215,0,0); transform: scale(1.12); }
  25%  { background: #FF1493;     color: #fff; box-shadow: 0 0 28px rgba(255,20,147,0.8); transform: scale(1.28); }
  50%  { background: #4fc3f7;     color: #000; box-shadow: 0 0 28px rgba(79,195,247,0.8); transform: scale(1.22); }
  75%  { background: #c97bff;     color: #fff; box-shadow: 0 0 28px rgba(201,123,255,0.8); transform: scale(1.18); }
  100% { background: var(--gold); color: #000; box-shadow: 0 0 16px rgba(255,215,0,0.55); transform: scale(1.12); }
}
@keyframes fadeOut12 {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes gradientSlide {
  from { background-position: 0% center; }
  to   { background-position: 100% center; }
}
@keyframes borderPulse {
  0%, 100% { box-shadow: 0 0 60px rgba(255,215,0,0.15), 0 30px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1); }
  50%       { box-shadow: 0 0 90px rgba(255,215,0,0.28), 0 30px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1); }
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-7px); }
}
@keyframes rgbGlow {
  0%   { box-shadow: 0 0 35px #ff1493; border-color: #ff1493; }
  33%  { box-shadow: 0 0 35px #FFD700; border-color: #FFD700; }
  66%  { box-shadow: 0 0 35px #00BFFF; border-color: #00BFFF; }
  100% { box-shadow: 0 0 35px #ff1493; border-color: #ff1493; }
}

/* ── #1 Rating burst particles ───────────────────────────── */
.burst-particle {
  position: fixed; width: 7px; height: 7px; border-radius: 50%;
  pointer-events: none; z-index: 9000;
  animation: burstFly 0.6s ease-out forwards;
}
@keyframes burstFly {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* ── #3 Country panel transition ─────────────────────────── */
.country-info-content {
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.country-info-content.fading {
  opacity: 0; transform: translateY(6px);
}

/* ── #4 Drinking rule strikethrough ──────────────────────── */
.rule-item {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.rule-item.crossed {
  opacity: 0.35;
  transform: translateX(4px);
  text-decoration: none; /* handled by pseudo-element below */
  position: relative;
}
.rule-item.crossed .rule-text { position: relative; }
.rule-item.crossed .rule-text::after {
  content: '';
  position: absolute; top: 50%; left: 0; height: 1.5px;
  background: rgba(255,255,255,0.5); border-radius: 1px;
  width: 0; animation: strikeThrough 0.35s ease-out 0.05s forwards;
}
@keyframes strikeThrough {
  from { width: 0; }
  to   { width: 100%; }
}

/* ── #5 Screen-edge notification pulse ───────────────────── */
#notif-edge-pulse {
  position: fixed; inset: 0; z-index: 99998;
  pointer-events: none; border-radius: 0;
  opacity: 0; transition: opacity 0.1s ease;
}
#notif-edge-pulse.active { animation: edgePulse 0.9s ease-out forwards; }
@keyframes edgePulse {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ── #6 Confetti particles ───────────────────────────────── */
.confetti-particle {
  position: fixed; width: 8px; height: 8px;
  pointer-events: none; z-index: 9000; border-radius: 2px;
  animation: confettiFall var(--dur) ease-out forwards;
}
@keyframes confettiFall {
  0%   { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.3); opacity: 0; }
}
