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

:root {
  --accent: #1a56db;
  --accent-dark: #1346c0;
  --accent-light: #eff4ff;
  --gold: #f59e0b;
  --green: #16a34a;
  --green-light: #f0fdf4;
  --red: #dc2626;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* NAV */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}
.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent); }

/* HERO */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1a56db 100%);
  color: white;
  padding: 56px 20px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.hero p {
  font-size: 17px;
  opacity: 0.85;
  max-width: 520px;
  margin: 0 auto 24px;
}
.hero-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
}

/* SECTION */
.section { padding: 48px 0; }
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.section-sub {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 24px;
}

/* CASINO CARD */
.casino-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.casino-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.casino-card:hover { box-shadow: var(--shadow-md); }
.casino-card.featured {
  border-color: var(--accent);
  border-width: 2px;
}
.casino-rank {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-3);
  min-width: 32px;
  text-align: center;
}
.casino-card.featured .casino-rank { color: var(--accent); }
.casino-logo {
  width: 72px;
  height: 48px;
  background: var(--accent-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.casino-info { flex: 1; }
.casino-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.casino-name { font-size: 18px; font-weight: 700; }
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}
.badge-featured { background: var(--accent-light); color: var(--accent); }
.badge-new { background: #fef3c7; color: #92400e; }
.badge-category { background: var(--green-light); color: var(--green); }
.stars {
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.star-num { font-size: 13px; color: var(--text-2); margin-left: 4px; }
.casino-bonus {
  background: var(--green-light);
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #15803d;
}
.casino-bonus-sub { font-size: 12px; font-weight: 400; color: #166534; margin-top: 2px; }
.casino-desc { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.casino-pros {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.pro-tag {
  font-size: 12px;
  background: #f1f5f9;
  color: var(--text-2);
  padding: 3px 8px;
  border-radius: 6px;
}
.casino-cta { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.btn-cta {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  display: block;
  text-align: center;
  min-width: 140px;
}
.btn-cta:hover { background: var(--accent-dark); }
.btn-review {
  font-size: 13px;
  color: var(--text-2);
  text-align: center;
  cursor: pointer;
}
.btn-review:hover { color: var(--accent); }

/* TWO-COL LAYOUT */
.two-col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

/* NEWS */
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.news-card:hover { box-shadow: var(--shadow-md); }
.news-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
}
.tag-bonus { background: #fef3c7; color: #92400e; }
.tag-opas { background: #ede9fe; color: #5b21b6; }
.tag-uutiset { background: var(--accent-light); color: var(--accent); }
.news-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.news-title a:hover { color: var(--accent); }
.news-excerpt { font-size: 14px; color: var(--text-2); line-height: 1.5; margin-bottom: 10px; }
.news-date { font-size: 12px; color: var(--text-3); }

/* SIDEBAR */
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.sidebar-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.sidebar-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.sidebar-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.sidebar-list li:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-rating { color: var(--gold); font-size: 13px; }

/* FOOTER */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 20px 24px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-logo { font-size: 18px; font-weight: 700; color: white; margin-bottom: 10px; }
.footer-desc { font-size: 13px; line-height: 1.7; }
.footer-heading { font-size: 13px; font-weight: 600; color: white; margin-bottom: 12px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: #94a3b8; }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  font-size: 12px;
  text-align: center;
  line-height: 1.8;
}

/* DISCLAIMER BAR */
.disclaimer-bar {
  background: #1e293b;
  color: #64748b;
  font-size: 12px;
  text-align: center;
  padding: 8px 20px;
}

/* ADMIN */
.admin-bar {
  background: #0f172a;
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.admin-badge {
  background: var(--accent);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
}
.admin-actions { display: flex; gap: 12px; }
.admin-btn {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.admin-btn:hover { background: rgba(255,255,255,0.2); }
.admin-btn.primary { background: var(--accent); border-color: var(--accent); }

/* ADMIN PANEL */
.admin-panel {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 24px 20px;
}
.admin-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.admin-tab {
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  margin-bottom: -1px;
}
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.admin-content { display: none; }
.admin-content.active { display: block; }

/* FORM */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 14px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 5px; display: block; }
.form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: white;
  transition: border-color 0.15s;
}
.form-input:focus { outline: none; border-color: var(--accent); }
textarea.form-input { min-height: 100px; resize: vertical; }
select.form-input { cursor: pointer; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn-secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: white;
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-2);
}

/* AI BOX */
.ai-box {
  background: var(--accent-light);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.ai-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-gen-row { display: flex; gap: 8px; margin-bottom: 8px; }
.ai-result { font-size: 13px; color: var(--text-2); min-height: 24px; line-height: 1.5; }

/* LOADING */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 16px; height: 16px;
  border: 2px solid #bfdbfe;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .casino-card { grid-template-columns: 1fr; gap: 12px; }
  .casino-rank { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
