/* ══════════════════════════════════════════
   Canlı Yayın Platformu — Global Styles
   ══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #12121a;
  --bg-card:       #1a1a28;
  --bg-card2:      #1e1e30;
  --accent:        #ff6b35;
  --accent2:       #ff9a3c;
  --accent-light:  rgba(255, 107, 53, 0.12);
  --live-red:      #ff2d55;
  --live-red-bg:   rgba(255, 45, 85, 0.15);
  --green:         #22c55e;
  --chat-bg:       #0f0f1a;
  --text-primary:  #f1f1f1;
  --text-muted:    #8888aa;
  --text-faint:    #555570;
  --border:        rgba(255,255,255,0.07);
  --border-accent: rgba(255,107,53,0.35);
  --glass:         rgba(255,255,255,0.04);
  --glass-hover:   rgba(255,255,255,0.08);
  --radius:        12px;
  --radius-lg:     18px;
  --shadow-card:   0 4px 32px rgba(0,0,0,0.5);
  --shadow-glow:   0 0 30px rgba(255,107,53,0.25);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Typography ── */
h1,h2,h3,h4 { font-weight: 700; line-height: 1.2; }

/* ══════════════════════════════════════════
   COMPONENTS
   ══════════════════════════════════════════ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,107,53,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255,107,53,0.55);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--glass);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--glass-hover); }

.btn-danger {
  background: rgba(255,45,85,0.15);
  color: var(--live-red);
  border: 1px solid rgba(255,45,85,0.3);
}
.btn-danger:hover { background: rgba(255,45,85,0.25); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 14px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* LIVE badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--live-red-bg);
  border: 1px solid rgba(255,45,85,0.4);
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--live-red);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.live-dot {
  width: 7px;
  height: 7px;
  background: var(--live-red);
  border-radius: 50%;
  animation: livePulse 1.2s ease-in-out infinite;
}
@keyframes livePulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Viewer count */
.viewer-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.viewer-count span { color: var(--text-primary); font-weight: 700; }

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.navbar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from { opacity:0; transform:translateY(16px) scale(0.97); }
  to { opacity:1; transform:translateY(0) scale(1); }
}
.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.modal-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 24px;
}

/* ── Inputs ── */
.input-group { margin-bottom: 16px; }
.input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--text-faint); }

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  min-width: 260px;
  animation: toastIn 0.3s ease;
  box-shadow: var(--shadow-card);
}
.toast.success { border-color: rgba(34,197,94,0.4); }
.toast.error { border-color: rgba(255,45,85,0.4); }
.toast.order { border-color: var(--border-accent); }
@keyframes toastIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }

/* ══════════════════════════════════════════
   WATCH PAGE
   ══════════════════════════════════════════ */
.watch-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  height: calc(100vh - 65px);
  overflow: hidden;
}

.player-section {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.video-wrapper {
  position: relative;
  background: #000;
  flex: 1;
  min-height: 0;
}
.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-overlay-top {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.offline-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #05050a;
  gap: 16px;
  color: var(--text-muted);
}
.offline-screen .offline-icon { font-size: 3rem; }
.offline-screen h2 { color: var(--text-primary); font-size: 1.4rem; }
.offline-screen p { font-size: 0.9rem; }

.player-bottom {
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.stream-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-alım {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #ff6b35, #ff9a3c);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,107,53,0.4);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.btn-alım:hover { transform: scale(1.04); box-shadow: 0 6px 28px rgba(255,107,53,0.55); }
.btn-alım:active { transform: scale(0.97); }
.btn-alım::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-alım:hover::after { opacity: 1; }

/* Chat Panel */
.chat-panel {
  display: flex;
  flex-direction: column;
  background: var(--chat-bg);
  border-left: 1px solid var(--border);
  overflow: hidden;
}
.chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chat-header h3 { font-size: 0.9rem; font-weight: 700; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-msg-header {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-nickname {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}
.chat-nickname.broadcaster { color: #ffd700; }
.chat-nickname.system { color: var(--text-faint); }
.chat-time {
  font-size: 0.68rem;
  color: var(--text-faint);
}
.chat-msg-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.4;
}
.chat-msg-text.system {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.8rem;
}
.chat-msg-text.order {
  color: var(--accent2);
  font-weight: 700;
  background: rgba(255,154,60,0.08);
  border-radius: 6px;
  padding: 3px 8px;
}

.chat-input-area {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.chat-input-area .input {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.88rem;
}

/* ══════════════════════════════════════════
   BROADCAST PANEL
   ══════════════════════════════════════════ */
.broadcast-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.panel-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-card-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-card-body { padding: 16px 20px; }

/* Orders list */
.orders-list {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--accent-light);
  border: 1px solid var(--border-accent);
  border-radius: 10px;
  animation: orderIn 0.4s ease;
}
@keyframes orderIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.order-nick { font-weight: 700; font-size: 0.9rem; }
.order-time { font-size: 0.75rem; color: var(--text-muted); }
.order-id { font-size: 0.75rem; color: var(--accent); font-weight: 600; }

/* Viewer list */
.viewer-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.viewer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s;
}
.viewer-item:hover { background: var(--glass); }
.viewer-nick { font-size: 0.87rem; font-weight: 500; }
.viewer-actions { display: flex; gap: 6px; }

/* Stream Info card */
.stream-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.info-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.info-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.info-value {
  font-size: 0.88rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--accent2);
  word-break: break-all;
}

/* Stats bar */
.stats-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  min-width: 110px;
  flex: 1;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ══════════════════════════════════════════
   HOMEPAGE
   ══════════════════════════════════════════ */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(255,107,53,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-live-badge { margin-bottom: 24px; }
.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero-title .accent { color: var(--accent); }
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Features */
.features {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all 0.25s ease;
}
.feature-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.feature-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-desc { font-size: 0.87rem; color: var(--text-muted); line-height: 1.6; }

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.85rem;
}
footer a { color: var(--accent); }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar { padding: 12px 16px; }
  .watch-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    height: auto;
    min-height: 100vh;
  }
  .video-wrapper { min-height: 240px; }
  .chat-panel { height: 50vh; }
  .broadcast-layout {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .stream-info-grid { grid-template-columns: 1fr; }
  .stats-bar { gap: 10px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.9rem; }
  .btn-alım { padding: 10px 18px; font-size: 0.9rem; }
  .player-bottom { flex-wrap: wrap; gap: 8px; }
}
