/* ============================================================
   KARAOKE HOMEPAGE — javni ulaz
   ============================================================ */

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

:root {
  --bg-0: #0a0e1a;
  --bg-1: #0f1424;
  --bg-2: #161c30;
  --bg-3: #1d2440;
  --text-1: #f0f3fa;
  --text-2: #9aa4b8;
  --text-3: #5a6480;
  --accent: #00d2ff;
  --accent-2: #ff2d7d;
  --success: #00e676;
  --warn: #ffb300;
  --err: #ff4757;
  --radius: 14px;
  --radius-sm: 8px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 210, 255, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(255, 45, 125, 0.08), transparent 50%),
    var(--bg-0);
  color: var(--text-1);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }
html { scroll-behavior: smooth; }

/* ============ HEADER ============ */
.kz-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 20, 36, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.kz-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; gap: 24px;
}
.kz-logo { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.kz-logo-icon { font-size: 26px; }
.kz-logo-text b { color: var(--accent); }
.kz-nav { display: flex; gap: 24px; flex: 1; margin-left: 32px; }
.kz-nav-link { color: var(--text-2); font-size: 14px; font-weight: 500; transition: color 0.2s; }
.kz-nav-link:hover { color: var(--accent); }
.kz-header-right { display: flex; align-items: center; gap: 8px; }
.kz-auth-guest, .kz-auth-user { display: flex; gap: 8px; align-items: center; }
.kz-nav-name { font-size: 14px; color: var(--text-2); margin: 0 8px; }
.kz-mini-badge {
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  margin-right: 4px;
}
.kz-mini-active { background: rgba(0, 230, 118, 0.15); color: var(--success); }
.kz-mini-free { background: rgba(255, 179, 0, 0.15); color: var(--warn); }
.kz-mini-locked { background: rgba(255, 71, 87, 0.15); color: var(--err); }

/* ============ BUTTONS ============ */
.kz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
  transition: all 0.18s; white-space: nowrap; cursor: pointer;
}
.kz-btn-lg { padding: 13px 26px; font-size: 15px; }
.kz-btn-primary {
  background: linear-gradient(135deg, var(--accent), #0099cc);
  color: #001020; box-shadow: 0 2px 12px rgba(0, 210, 255, 0.3);
}
.kz-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(0, 210, 255, 0.5); }
.kz-btn-ghost {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-1);
}
.kz-btn-ghost:hover { background: rgba(255,255,255,0.10); }
.kz-btn-full { width: 100%; }
.kz-btn-play {
  background: var(--accent); color: #001020;
  display: inline-flex; align-items: center; gap: 6px;
}
.kz-btn-play:hover:not(.kz-locked-btn) { background: #00bce5; }
.kz-btn-play svg { width: 14px; height: 14px; }
.kz-locked-btn { background: rgba(255,255,255,0.08); color: var(--text-3); cursor: pointer; }
.kz-locked-btn:hover { background: rgba(255, 71, 87, 0.15); color: var(--err); }

/* ============ HERO ============ */
.kz-hero { position: relative; padding: 80px 24px 100px; text-align: center; overflow: hidden; }
.kz-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0, 210, 255, 0.20), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(255, 45, 125, 0.15), transparent 60%);
}
.kz-hero-inner { position: relative; max-width: 800px; margin: 0 auto; }
.kz-hero-title {
  font-size: clamp(40px, 7vw, 72px); font-weight: 900; letter-spacing: -0.03em;
  line-height: 1.05; margin-bottom: 18px;
}
.kz-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kz-hero-sub { font-size: 18px; color: var(--text-2); margin-bottom: 32px; max-width: 580px; margin-left: auto; margin-right: auto; }
.kz-hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ BANNER ============ */
.kz-banner-wrap { max-width: 1100px; margin: -20px auto 32px; padding: 0 24px; }
.kz-banner {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 24px; border-radius: var(--radius);
  flex-wrap: wrap;
  border: 1px solid transparent;
}
.kz-banner-icon { font-size: 32px; flex-shrink: 0; }
.kz-banner-text { flex: 1; min-width: 220px; }
.kz-banner-text strong { display: block; font-size: 16px; margin-bottom: 2px; }
.kz-banner-text span { color: var(--text-2); font-size: 14px; }
.kz-banner-text span b { color: var(--accent); }
.kz-banner-cta { display: flex; gap: 8px; }
.kz-banner-locked { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
.kz-banner-free { background: rgba(255, 179, 0, 0.06); border-color: rgba(255, 179, 0, 0.2); }
.kz-banner-active {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.10), rgba(0, 210, 255, 0.10));
  border-color: rgba(0, 230, 118, 0.3);
}
.kz-banner-active .kz-banner-icon { color: var(--success); }

/* ============ SECTIONS ============ */
.kz-section {
  max-width: 1200px; margin: 0 auto;
  padding: 60px 24px;
}
.kz-section-alt { background: rgba(255,255,255,0.02); max-width: none; }
.kz-section-alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.kz-section-head { text-align: center; margin-bottom: 32px; }
.kz-section-head h2 { font-size: clamp(24px, 4vw, 36px); margin-bottom: 8px; }
.kz-section-head p { color: var(--text-2); font-size: 15px; }

/* ============ EVENTS ============ */
.kz-events-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.kz-event-card {
  display: flex; flex-direction: column; gap: 0;
  background: var(--bg-1); border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius); overflow: hidden;
  transition: all 0.2s; position: relative;
}
.kz-event-card:hover { transform: translateY(-2px); border-color: rgba(0, 210, 255, 0.3); }
.kz-event-live-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: var(--err); color: #fff; padding: 4px 10px;
  border-radius: 6px; font-size: 11px; font-weight: 800;
  letter-spacing: 1px; animation: kzPulse 1.5s infinite;
}
@keyframes kzPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }
.kz-event-cover {
  height: 160px; background: var(--bg-3); position: relative; overflow: hidden;
}
.kz-event-cover img { width: 100%; height: 100%; object-fit: cover; }
.kz-event-info { padding: 16px 18px; flex: 1; }
.kz-event-title { font-weight: 700; font-size: 17px; margin-bottom: 10px; }
.kz-event-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); }
.kz-event-cta {
  padding: 12px 18px; background: rgba(0, 210, 255, 0.08);
  border-top: 1px solid rgba(0, 210, 255, 0.15);
  color: var(--accent); font-weight: 600; font-size: 14px;
  text-align: center;
}

/* ============ SONGS ============ */
.kz-filters {
  display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap;
  max-width: 1200px; margin-left: auto; margin-right: auto;
}
.kz-filters input, .kz-filters select {
  padding: 11px 16px; background: var(--bg-1);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
  color: var(--text-1);
}
.kz-filters input { flex: 1; min-width: 220px; }
.kz-filters input:focus, .kz-filters select:focus { outline: none; border-color: var(--accent); }

.kz-song-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  max-width: 1200px; margin: 0 auto;
}
.kz-song-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-1); border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius); padding: 12px;
  transition: all 0.2s;
}
.kz-song-card:hover { border-color: rgba(0, 210, 255, 0.3); transform: translateY(-1px); }
.kz-song-card.kz-locked { opacity: 0.7; }
.kz-song-card.kz-locked:hover { opacity: 1; }
.kz-song-thumb {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
  background: var(--bg-3);
}
.kz-song-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kz-song-info { flex: 1; min-width: 0; }
.kz-song-title {
  font-weight: 600; font-size: 14.5px; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kz-song-artist { color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kz-song-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.kz-lang-badge { font-size: 13px; }
.kz-dur { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.kz-source { font-size: 10px; padding: 2px 5px; border-radius: 4px; font-weight: 700; }
.kz-source.yt { background: rgba(255, 0, 0, 0.15); color: #ff6b6b; }
.kz-source.up { background: rgba(0, 210, 255, 0.15); color: var(--accent); }

.kz-show-more {
  grid-column: 1 / -1; text-align: center; padding: 24px;
  color: var(--text-2); font-size: 14px;
}

/* ============ PRICING ============ */
.kz-pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; max-width: 720px; margin: 0 auto;
}
.kz-price-card {
  background: var(--bg-1); border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius); padding: 28px 24px;
  position: relative; transition: all 0.2s;
}
.kz-price-featured {
  border-color: rgba(0, 210, 255, 0.4);
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.06), rgba(255, 45, 125, 0.06));
  transform: scale(1.02);
}
.kz-price-ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #001020; font-size: 11px; font-weight: 800;
  padding: 4px 12px; border-radius: 999px; letter-spacing: 1px;
}
.kz-price-name { font-size: 16px; color: var(--text-2); font-weight: 600; margin-bottom: 8px; }
.kz-price-amount {
  font-size: 42px; font-weight: 900; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kz-price-period { font-size: 14px; color: var(--text-3); font-weight: 500; }
.kz-price-features {
  list-style: none; margin-bottom: 22px;
}
.kz-price-features li {
  padding: 6px 0; padding-left: 22px; position: relative; font-size: 14px;
  color: var(--text-2);
}
.kz-price-features li::before {
  content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 800;
}
.kz-price-features li b { color: var(--accent); }

/* ============ EMPTY / LOADING ============ */
.kz-empty, .kz-loading {
  text-align: center; padding: 60px 20px; color: var(--text-3);
  font-size: 14px;
}
.kz-empty-icon { font-size: 48px; margin-bottom: 12px; }
.kz-empty h3 { color: var(--text-2); font-size: 18px; margin-bottom: 6px; }
.kz-spinner {
  display: inline-block; width: 28px; height: 28px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: kzSpin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes kzSpin { to { transform: rotate(360deg); } }
.kz-show-more { grid-column: 1 / -1; }

/* ============ FOOTER ============ */
.kz-footer {
  margin-top: 60px; padding: 28px 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  color: var(--text-3); font-size: 13px;
}
.kz-footer-links { display: flex; gap: 18px; }
.kz-footer-links a { color: var(--text-2); transition: color 0.2s; }
.kz-footer-links a:hover { color: var(--accent); }

/* ============ MODAL ============ */
.kz-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: kzFade 0.2s;
}
@keyframes kzFade { from { opacity: 0; } to { opacity: 1; } }
.kz-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 8, 16, 0.85); backdrop-filter: blur(8px);
}
.kz-modal-box {
  position: relative; background: var(--bg-1);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px; padding: 28px;
  max-width: 420px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: kzModalIn 0.25s;
}
@keyframes kzModalIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.kz-modal-close {
  position: absolute; top: 12px; right: 16px;
  width: 32px; height: 32px; font-size: 24px; line-height: 1;
  border-radius: 8px; color: var(--text-2);
}
.kz-modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text-1); }

.kz-auth-tabs {
  display: flex; gap: 4px; margin-bottom: 20px; padding-right: 40px;
  background: var(--bg-2); padding: 4px; border-radius: 10px;
}
.kz-auth-tab {
  flex: 1; padding: 10px; border-radius: 8px; font-size: 14px; font-weight: 600;
  color: var(--text-2); transition: all 0.2s;
}
.kz-auth-tab.active { background: var(--accent); color: #001020; }
.kz-auth-panel label { display: block; font-size: 12.5px; color: var(--text-2); margin: 12px 0 4px; }
.kz-auth-panel input {
  width: 100%; padding: 11px 14px; background: var(--bg-2);
  border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-sm);
  color: var(--text-1);
}
.kz-auth-panel input:focus { outline: none; border-color: var(--accent); }
.kz-err {
  margin-top: 12px; padding: 10px 12px; background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3); color: var(--err);
  border-radius: var(--radius-sm); font-size: 13px;
}
.kz-auth-test-hint {
  margin-top: 18px; padding: 10px 12px;
  background: rgba(0, 210, 255, 0.06); border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: 8px; font-size: 12px; color: var(--text-2); line-height: 1.6;
}
.kz-auth-test-hint strong { color: var(--accent); }

.kz-modal-upgrade { text-align: center; padding: 36px 28px; }
.kz-upgrade-icon { font-size: 56px; margin-bottom: 12px; }
.kz-modal-upgrade h3 { font-size: 22px; margin-bottom: 6px; }
.kz-modal-upgrade p { color: var(--text-2); font-size: 14px; margin-bottom: 18px; }
.kz-upgrade-price {
  font-size: 36px; font-weight: 900; margin: 18px 0 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kz-upgrade-price span { font-size: 14px; color: var(--text-3); font-weight: 500; -webkit-text-fill-color: var(--text-3); }
.kz-modal-upgrade .kz-btn { margin-top: 8px; }

/* ============ PLAYER OVERLAY ============ */
.kz-player-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 8, 16, 0.92); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: kzFade 0.2s;
}
.kz-player-modal {
  background: var(--bg-1); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px; max-width: 900px; width: 100%; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.kz-player-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.kz-player-modal-title { font-size: 18px; font-weight: 700; }
.kz-player-modal-artist { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.kz-player-modal-media { flex: 1; background: #000; min-height: 360px; display: flex; align-items: center; justify-content: center; }
.kz-player-modal-media > div, .kz-player-modal-media > audio, .kz-player-modal-media > video,
.kz-player-modal-media iframe { width: 100%; height: 100%; min-height: 360px; }
.kz-player-modal-foot {
  padding: 14px 22px; text-align: center; color: var(--text-2);
  font-size: 13px; background: var(--bg-2);
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ============ TOAST ============ */
.kz-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-3); color: var(--text-1); padding: 12px 20px;
  border-radius: 10px; font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 200; opacity: 0; transition: all 0.25s;
  border: 1px solid rgba(255,255,255,0.08);
}
.kz-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.kz-toast-ok { border-color: rgba(0, 230, 118, 0.4); }
.kz-toast-err { border-color: rgba(255, 71, 87, 0.4); }

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
  .kz-header-inner { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .kz-nav { order: 3; width: 100%; margin-left: 0; justify-content: center; gap: 16px; }
  .kz-header-right { gap: 6px; }
  .kz-nav-name { display: none; }
  .kz-hero { padding: 50px 16px 60px; }
  .kz-section { padding: 40px 16px; }
  .kz-banner { flex-direction: column; align-items: flex-start; }
  .kz-banner-cta { width: 100%; }
  .kz-banner-cta .kz-btn { flex: 1; }
  .kz-song-list { grid-template-columns: 1fr; }
  .kz-filters { flex-direction: column; }
  .kz-filters input { min-width: 0; }
  .kz-pricing-grid { grid-template-columns: 1fr; }
  .kz-price-featured { transform: none; }
}
