/* Eurotivo styles — kvällsstämning */
:root {
  --bg-1: #0a0a23;
  --bg-2: #1a0033;
  --accent: #ffd60a;
  --pink: #ff2e93;
  --cyan: #00e5ff;
  --green: #00f5a0;
}

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

.form-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}

.input-wrap {
  width: 100%;
  max-width: 240px;
}

.form-button {
  min-width: 150px;
  margin-top: 0.5rem;
  padding: 0.7rem 1.2rem;
}

.form-status {
  display: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  text-align: center;
  font-size: 0.85rem;
}

.form-status:not(:empty) {
  display: block;
  margin-top: 0.2rem;
}

.euro-input {
  display: block;
  width: 100% !important;
  max-width: 240px;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  text-align: center;
  font-size: 1.05rem;
}

.euro-input-code {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 1.15rem;
  font-weight: 600;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-color: var(--bg-1);
  background:
    radial-gradient(circle at 15% 20%, rgba(22,3,47,0.15), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(22,3,47,0.12), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(22,3,47,0.08), transparent 60%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  pointer-events: none;
  z-index: 0;
}

html {
  background: var(--bg-1);
  min-height: 100%;
  overscroll-behavior: none;
}

body {
  background:
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  color: #fff;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Sticky sync bar respects home-indicator */
#adminSyncBar {
  padding-bottom: calc(0.7rem + env(safe-area-inset-bottom)) !important;
}

button, .btn, .star, .esc-btn, .reaction-btn, .cat-card, .score-row {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,46,147,0.15), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(0,229,255,0.12), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255,214,10,0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

main, .layer { position: relative; z-index: 1; }

.glass {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
}

.btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
}
.btn:hover { background: rgba(255,255,255,0.15); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #1a0033; border-color: var(--accent); }
.btn-primary:hover { background: #ffe240; }
.btn-pink { background: var(--pink); border-color: var(--pink); }
.btn-cyan { background: var(--cyan); color: #0a0a23; border-color: var(--cyan); }


.country-banner {
  background: linear-gradient(120deg, rgba(255,46,147,0.2), rgba(0,229,255,0.2));
  border-radius: 24px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.country-banner .flag-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.18; filter: blur(20px) saturate(1.4);
}
.country-banner .flag-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent, rgba(10,10,35,0.7));
}

/* star rating */
.stars { display: flex; gap: 0.35rem; justify-content: flex-end; }
.star {
  font-size: 1.7rem;
  cursor: pointer;
  user-select: none;
  filter: grayscale(1) opacity(0.35);
  transition: transform 0.1s ease, filter 0.15s ease;
  line-height: 1;
}
.star.active { filter: none; color: var(--accent); }
.star:hover { transform: scale(1.18); }
.star:active { transform: scale(0.9); }

/* category card - horizontal row */
.cats { display: grid; grid-template-columns: 1fr; gap: 0.45rem; }
.cat-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 0.6rem 0.9rem;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
}
.cat-icon { font-size: 1.55rem; display: inline-block; margin: 0; line-height: 1; }
.cat-name { font-size: 0.95rem; opacity: 0.9; margin: 0; font-weight: 500; }

/* ESC point buttons */
.esc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.esc-grid .span2 { grid-column: span 2; }
.esc-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 0.7rem 0;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.esc-btn:hover { background: rgba(255,255,255,0.18); }
.esc-btn.active { background: var(--accent); color: #1a0033; border-color: var(--accent); transform: scale(1.05); }
.esc-btn.twelve { background: linear-gradient(135deg, var(--accent), var(--pink)); color: #fff; border: none; }
.esc-btn.twelve.active { transform: scale(1.08); box-shadow: 0 0 40px rgba(255,46,147,0.5); }

/* floating reactions */
.reaction-layer {
  position: fixed; left: 0; right: 0; bottom: 0; top: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}
.floating-emoji {
  position: absolute;
  font-size: 2rem;
  animation: floatUp 3.5s ease-out forwards;
  pointer-events: none;
}
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  10%  { opacity: 1; transform: translateY(-30px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-360px) scale(1.5) rotate(15deg); }
}

/* recap card (mina röster) */
.score-row {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  transition: all 0.15s;
}
.score-row:hover { background: rgba(255,255,255,0.09); }
.score-row.current { border-color: var(--accent); background: rgba(255,214,10,0.1); }
.score-row .pos { width: 1.8rem; font-weight: 700; opacity: 0.5; }
.score-row .flag { width: 28px; height: 20px; object-fit: cover; border-radius: 3px; }
.score-row .name { flex: 1; min-width: 0; }
.score-row .name b { display: block; }
.score-row .name span { font-size: 0.75rem; opacity: 0.6; }
.score-row .esc { font-weight: 700; color: var(--accent); }

.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.6rem;
}
.progress-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--accent));
  transition: width 0.5s linear;
}

/* modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal {
  background: #1a0033;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 90vw;
  width: 420px;
  max-height: 85vh;
  overflow-y: auto;
}

.reaction-bar {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  justify-content: center;
}
.reaction-btn {
  font-size: 1.5rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 48px; height: 48px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex; align-items: center; justify-content: center;
}
.reaction-btn:hover { transform: scale(1.15); background: rgba(255,255,255,0.18); }
.reaction-btn:active { transform: scale(0.95); }

h1, h2, h3 { font-weight: 700; }
a { color: var(--cyan); }

.shimmer {
  background: linear-gradient(90deg, var(--accent), var(--pink), var(--cyan), var(--accent));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 300% 0; } }

.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.5s ease-in-out infinite;
  margin-right: 0.4rem;
  vertical-align: middle;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.4; transform: scale(0.7); }
}

/* reveal anim */
.reveal-card {
  animation: revealIn 0.6s ease-out backwards;
}
@keyframes revealIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
