/* Rise Online Sayı Tahmin Arenası - MMORPG Koyu Tasarım */
:root {
  --bg-deep: #05070e;
  --bg-card: rgba(13, 18, 36, 0.88);
  --border-gold: rgba(245, 158, 11, 0.4);
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --gold-glow: rgba(245, 158, 11, 0.5);
  --cyan: #38bdf8;
  --emerald: #10b981;
  --rose: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.16) 0%, transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(56, 189, 248, 0.12) 0%, transparent 45%),
    linear-gradient(180deg, rgba(8, 12, 24, 0.7) 0%, rgba(5, 7, 14, 0.95) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.guess-app-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 20px 20px 20px;
  max-width: 1560px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

/* Top Bar */
.guess-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 8px 16px;
  box-shadow: 0 4px 25px rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
}

.live-pill {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.live-pill.active {
  background: rgba(16, 185, 129, 0.25);
  color: #4ade80;
  border-color: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.guess-layout {
  display: flex;
  gap: 20px;
  width: 100%;
  flex: 1;
}

.guess-layout.has-sidebar {
  display: grid;
  grid-template-columns: 1fr 380px;
}

/* Stage Bottom Grid */
.stage-bottom-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  flex: 1;
}

@media (max-width: 900px) {
  .stage-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* Stage */
.guess-stage-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.stage-card {
  background: var(--bg-card);
  border: 2px solid var(--border-gold);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7), inset 0 0 35px rgba(245, 158, 11, 0.08);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #38bdf8, #ec4899, #f59e0b);
  background-size: 300% 100%;
  animation: barFlow 4s linear infinite;
}

@keyframes barFlow {
  0% { background-position: 0% 0%; }
  100% { background-position: 300% 0%; }
}

.stage-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.category-tag {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 14px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reward-tag {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 9999px;
}

/* Mystery Box */
.mystery-display-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
}

.mystery-box {
  width: 130px;
  height: 130px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 3px solid var(--gold);
  box-shadow: 0 0 35px var(--gold-glow), inset 0 0 20px rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: boxGlow 2s ease-in-out infinite alternate;
}

@keyframes boxGlow {
  from { box-shadow: 0 0 25px rgba(245, 158, 11, 0.4); transform: scale(1); }
  to { box-shadow: 0 0 45px rgba(245, 158, 11, 0.8); transform: scale(1.04); }
}

.mystery-q {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--gold-light);
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.8);
}

.mystery-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

/* Winner Spotlight Card */
.winner-spotlight {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
  border: 2px solid #10b981;
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.45);
  animation: popIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.winner-crown {
  font-size: 2.4rem;
  margin-bottom: 2px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.winner-name {
  font-size: 1.85rem;
  font-weight: 900;
  color: #6ee7b7;
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

.winner-detail {
  color: #e2e8f0;
  font-size: 0.95rem;
  margin-top: 4px;
}

.revealed-target-box {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 1rem;
  color: #fff;
  border: 1px solid var(--border-gold);
  text-align: center;
  box-shadow: 0 0 20px rgba(245,158,11,0.25);
}

/* Range Bar */
.range-bar-wrap {
  width: 100%;
}

.range-bar-track {
  height: 28px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  position: relative;
}

.range-min, .range-max {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 700;
}

/* Feed Card */
.feed-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.feed-header {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
}

.guesses-stream-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.guess-item {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(255, 255, 255, 0.1);
  padding: 6px 10px;
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.guess-item.correct {
  background: rgba(16, 185, 129, 0.2);
  border-left-color: #10b981;
}

.guess-item.higher {
  border-left-color: #f59e0b;
}

.guess-item.lower {
  border-left-color: #38bdf8;
}

.guess-user {
  font-weight: 700;
  color: var(--cyan);
}

.guess-val {
  color: #fff;
  font-weight: 800;
  margin: 0 4px;
}

.guess-hint {
  font-size: 0.75rem;
  font-weight: 700;
}

/* Sidebar */
.guess-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-card {
  background: rgba(11, 15, 26, 0.95);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.panel-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.input-text {
  background: #060913;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 7px 10px;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s;
}

.input-text:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.secret-target-wrap {
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed var(--gold);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.secret-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-row {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  flex: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
}

.btn-danger:hover {
  background: #ef4444;
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Leaderboard */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 200px;
  overflow-y: auto;
}

.leader-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(245, 158, 11, 0.3); border-radius: 99px; }
