@font-face {
    font-family: Material Icons;
    font-style: normal;
    font-weight: 400;
    src: url(fonts/MaterialIcons-Regular.1e50f5c2ffa6aba4.eot);
    src: local("Material Icons"), local("MaterialIcons-Regular"), url(fonts/MaterialIconsOutlined-Regular.woff2) format("woff2"), url(MaterialIconsOutlined-Regular.2dbb9a8c91e347a0.otf) format("truetype")
}

@font-face {
    font-family: Rozetka;
    src: url(fonts/RozetkaWeb-Regular.woff) format("woff"), url(fonts/RozetkaWeb-Regular.woff2) format("woff2");
    font-display: swap
}

:root{
  --bg: #ffffff;
  --card: #ffffff;
  --card2: #ffffff;
  --text: #0f172a;       /* темний текст */
  --muted: #64748b;      /* сірий текст */
  --line: rgba(15,23,42,.10);
  --accent: #7c5cff;
  --accent2:#ff6db4;
  --good: #16a34a;
  --warn: #f59e0b;
}

*{ box-sizing:border-box; }

html, body{
  background: var(--bg);
}

body{
  font-family: Rozetka, Arial, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  margin:0;
  min-height:100vh;
}

.container{
  max-width: 940px;
  margin: 0 auto;
  padding: 24px 14px 60px;
}

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow:
    0 10px 28px rgba(15,23,42,.08),
    0 1px 0 rgba(255,255,255,.9) inset;
}

h1,h2,h3{
  margin: 0 0 10px 0;
  letter-spacing: .2px;
}

label{
  font-weight: 700;
  color: #0b1324;
}

input{
  width:100%;
  padding: 12px 14px;
  border-radius: 12px;
  border:1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  outline:none;
  transition: .15s ease;
  font-size: 16px;
}

input::placeholder{ color: #94a3b8; }

input:focus{
  border-color: rgba(124,92,255,.9);
  box-shadow: 0 0 0 3px rgba(124,92,255,.18);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 11px 14px;
  border-radius: 12px;
  border:1px solid var(--line);
  cursor:pointer;
  font-weight: 800;
  letter-spacing:.2px;
  background: #f8fafc;
  color: var(--text);
  transition:.15s ease;
  user-select:none;
  height:46px;
}

.btn:hover{
  transform: translateY(-1px);
  background: #eef2f7;
  border-color: rgba(15,23,42,.16);
}

.btn:active{ transform: translateY(0); }

.btn[disabled]{
  opacity:.55; cursor:not-allowed; transform:none;
}

.btn-accent{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: #fff;
  box-shadow: 0 8px 18px rgba(124,92,255,.25);
}

.btn-accent:hover{
  filter: brightness(1.04);
  box-shadow: 0 10px 22px rgba(124,92,255,.35);
}

.btn-ghost{
  background: transparent;
  border:1px dashed var(--line);
  color: var(--muted);
}

.small{ font-size: 13px; color: var(--muted); }
.muted{ opacity:.9; font-size:12px; color:var(--muted); }

.badge{
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px; font-weight:800;
  padding:4px 8px; border-radius:999px;
  background: #f1f5f9;
  border:1px solid var(--line);
  color:#0f172a;
}

/* ===== LOGIN ===== */
.login-wrap{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px 10px;
  background: var(--bg);
}
.login-card{
  width:min(440px, 100%);
  padding:22px;
}
.login-header{
  display:flex; align-items:center; gap:12px; margin-bottom:14px;
}
.login-logo{
  width:46px; height:46px; border-radius:12px;
  display:grid; place-items:center;
  background:
    radial-gradient(circle at 30% 20%, #f58529, transparent 55%),
    radial-gradient(circle at 70% 30%, #dd2a7b, transparent 55%),
    radial-gradient(circle at 40% 80%, #515bd4, transparent 60%),
    #ffffff;
  border:1px solid var(--line);
  box-shadow: 0 8px 18px rgba(15,23,42,.12);
}
.login-title{
  font-size:22px; font-weight:900;
}
.login-sub{
  font-size:13px; color:var(--muted);
}
.login-form{ margin-top:10px; display:grid; gap:10px; }
.login-footnote{ text-align:center; margin-top:2px; }

.err{
  color:#b91c1c; font-size:14px; font-weight:700;
  background: #fee2e2;
  border:1px solid #fecaca;
  padding:8px 10px; border-radius:10px;
}

/* ===== HEADER ===== */
.topbar{
  display:flex; gap:12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.ig-logo{ width:36px; height:36px; flex:0 0 auto; }
.top-title{ font-size:16px; font-weight:900; }
.logout{ margin-left:auto; }
.logout a{
  color:var(--muted); text-decoration:none; font-size:14px; font-weight:700;
}
.logout a:hover{ color:#0f172a; }

/* ===== INPUT AREA ===== */
.input-card{ padding:16px; }
.input-row{
  display:flex; gap:10px; align-items:center;
  margin-top:8px;
}
.token-block{ margin-top:12px; }
.token-hint{ margin-top:6px; }

.actions-row{
  display:flex; gap:8px; flex-wrap:wrap; margin-top:12px;
}

/* ===== STATUS ===== */
.status{
  display:none; align-items:center; gap:10px;
  padding:12px 14px;
  font-size:14px; font-weight:800;
  margin-top:12px;
  background: #f8fafc;
}

.spinner{
  width:18px; height:18px;
  border:3px solid rgba(15,23,42,.12);
  border-top-color: var(--good);
  border-radius:50%;
  animation:spin .9s linear infinite;
  display:none;
}

@keyframes spin { to{ transform:rotate(360deg);} }

.roulette-nick{
  font-weight:900; font-size:18px;
  background:#0f172a; color:#ecfeff;
  padding:2px 8px; border-radius:8px;
  display:inline-block; min-width:120px; text-align:center;
}

/* ===== PODIUM ===== */
#winnersWrap{ display:none; margin-top: 12px;}
.section-title{ margin:12px 0 6px; }

.podium{
  display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; align-items:end;
  margin-top:8px; position:relative;
}

.podium::before{
  content:""; position:absolute; inset:-10px;
  background:
    linear-gradient(45deg, rgba(15,23,42,.15) 25%, transparent 25%) -10px 0/20px 20px,
    linear-gradient(-45deg, rgba(15,23,42,.15) 25%, transparent 25%) -10px 0/20px 20px,
    linear-gradient(45deg, transparent 75%, rgba(15,23,42,.15) 75%) -10px 0/20px 20px,
    linear-gradient(-45deg, transparent 75%, rgba(15,23,42,.15) 75%) -10px 0/20px 20px;
  opacity:.05; border-radius:16px; pointer-events:none;
}

.podium-card{
  border-radius:16px; padding:14px; border:2px solid transparent;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15,23,42,.10);
  position:relative; overflow:hidden; min-height:120px;
  transition: transform .2s ease;
}
.podium-card:hover{ transform:translateY(-2px); }

.place-badge{
  position:absolute; top:10px; right:10px;
  font-weight:900; font-size:13px;
  padding:6px 9px; border-radius:999px;
  background: rgba(255,255,255,.9);
  border:1px solid var(--line);
  backdrop-filter: blur(4px);
}

.place-1{
  height:220px;
  background: linear-gradient(180deg, #fff7d6, #ffe08a);
  border-color:#f2c94c;
}
.place-2{
  height:190px;
  background: linear-gradient(180deg, #f6f7fb, #e5e7eb);
  border-color:#c1c7d0;
}
.place-3{
  height:175px;
  background: linear-gradient(180deg, #fde9d9, #f3b689);
  border-color:#d88a55;
}

.place-1 .place-badge{ color:#8a6a00; }
.place-2 .place-badge{ color:#4b5563; }
.place-3 .place-badge{ color:#7a3e12; }

.winner-title{
  font-size:18px; font-weight:900;
  margin-bottom:8px; display:flex; gap:8px; align-items:center;
}
.winner-login{ font-size:22px; font-weight:900; margin-bottom:6px; }
.winner-text{
  font-size:15px; white-space:pre-wrap; line-height:1.35; color:#111827;
}
.icon{
  font-size:22px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.15));
}

.order-2{ grid-column:1; }
.order-1{ grid-column:2; }
.order-3{ grid-column:3; }

.placeholder{
  opacity:.8; font-weight:800; font-size:14px;
  display:flex; align-items:center; justify-content:center;
  height:100%; text-align:center; flex-direction:column; gap:6px;
  color:#0f172a;
}

.placeholder .ph-roulette{ min-height:28px; }

/* ===== TABLE ===== */
.table-card{ padding:14px; margin-top:12px; background:#fff; }
table{ width:100%; border-collapse:collapse; margin-top:8px; background:#fff; }
th,td{
  border-bottom:1px solid var(--line);
  padding:9px 8px; text-align:left;
}
th{
  background: #f8fafc;
  position:sticky; top:0;
  font-size:13px; text-transform:uppercase;
  letter-spacing:.6px; color:#334155;
}

.logoin {
	text-align: center;
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.logoin img {
	max-height: 100px;
}

.logoin .img2 {
	margin-left: 30px;
}

.logotxt {
	font-weight: bold;
	font-size: 21px;
	margin: 20px 0 5px 0;
	text-align: center;
}

.placeholder {
    background-color: inherit !important;
}

#statusText {
	font-size: 21px;
}

#pickWrap {
  display:none;
  text-align:center;
  margin-top:12px;
}
#pickWrap .btn {
  min-width: 260px;
}

.ph-text, .ph-place {
	font-size: 18px;
}

#nowDatetime {
	font-size: 29px;
	font-weight: bold;
}

/* ===== RESPONSIVE ===== */
@media(max-width:760px){
  .podium{ grid-template-columns:1fr; }
  .order-1,.order-2,.order-3{ grid-column:auto; }
  .place-1,.place-2,.place-3{ height:auto; }
  .input-row{ flex-direction:column; align-items:stretch; }
  .input-row .btn{ width:100%; }
}

.winner-row td{
  background: #f0fff6;
  font-weight: 700;
}
