/* ============================================================
   Planet Espor — Turnuva Sayfaları CSS
   style.css'ten sonra yüklenir, aynı değişkenleri kullanır
   ============================================================ */

/* ---------- Sayfa Başlığı ---------- */
.page-hero {
  position: relative;
  padding: 160px 5% 80px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255,85,0,0.14) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(255,184,0,0.07) 0%, transparent 60%);
}
.page-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.page-hero-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 2rem;
}

/* ---------- Filtre Bar ---------- */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.filter-bar select,
.filter-bar input[type="text"] {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font);
  padding: 9px 14px;
  outline: none;
  transition: var(--transition);
  min-width: 160px;
}
.filter-bar select:focus,
.filter-bar input[type="text"]:focus {
  border-color: var(--neon-purple);
}
.filter-bar select option { background: var(--bg-secondary); }
.filter-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; white-space: nowrap; }

/* ---------- Turnuva Grid ---------- */
.tournaments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

/* ---------- Turnuva Kartı ---------- */
.tournament-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}
.tournament-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.tournament-card.closed { opacity: 0.65; }

.tc-top {
  padding: 1.5rem 1.5rem 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.game-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(255,85,0,0.15);
  color: var(--neon-purple);
  border: 1px solid rgba(255,85,0,0.25);
  white-space: nowrap;
}
.deadline-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.deadline-badge.open   { background: rgba(255,140,0,0.12); color: var(--neon-green); border: 1px solid rgba(255,140,0,0.25); }
.deadline-badge.closed { background: rgba(239,68,68,0.12);  color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }

.tc-body {
  padding: 1rem 1.5rem 0;
  flex: 1;
}
.tc-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.tc-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.tc-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.tc-meta-row svg { width: 15px; height: 15px; color: var(--neon-purple); flex-shrink: 0; }
.tc-meta-row strong { color: var(--text-primary); }

/* Kapasite bar */
.capacity-wrap { margin-bottom: 1.2rem; }
.capacity-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.capacity-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.capacity-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
  background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
}
.capacity-fill.full  { background: #ef4444; }
.capacity-fill.high  { background: linear-gradient(90deg, #f59e0b, #ef4444); }

/* Ücret etiketi */
.entry-fee-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(245,158,11,0.1);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,0.2);
  margin-bottom: 1rem;
}
.entry-fee-badge.free {
  background: rgba(255,140,0,0.1);
  color: var(--neon-green);
  border-color: rgba(255,140,0,0.2);
}

.tc-footer {
  padding: 1rem 1.5rem 1.5rem;
}
.btn-tc-apply {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  text-align: center;
}
.btn-tc-apply.active {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  color: #fff;
  box-shadow: var(--glow-purple);
}
.btn-tc-apply.active:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(255,85,0,0.5); }
.btn-tc-apply.disabled {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  cursor: not-allowed;
  border: 1px solid var(--border);
}

/* ---------- Turnuva Detay ---------- */
.detail-hero {
  position: relative;
  padding: 140px 5% 60px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255,85,0,0.12) 0%, transparent 70%);
  overflow: hidden;
}
.detail-breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-breadcrumb a { color: var(--neon-purple); }
.detail-breadcrumb a:hover { text-decoration: underline; }

.detail-layout {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  padding: 3rem 5%;
}

.detail-main {}
.detail-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.detail-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 90px;
}
.dic-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,85,0,0.06);
}
.dic-header h3 { font-size: 1rem; font-weight: 700; }
.dic-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.dic-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.dic-row:last-child { border-bottom: none; padding-bottom: 0; }
.dic-row .label { color: var(--text-muted); }
.dic-row .value { font-weight: 700; color: var(--text-primary); }
.dic-row .value.prize { color: var(--neon-gold, #fbbf24); }
.dic-row .value.open  { color: var(--neon-green); }
.dic-row .value.closed { color: #ef4444; }

.btn-apply-big {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
  margin: 1.5rem;
  width: calc(100% - 3rem);
}
.btn-apply-big.active {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  color: #fff;
  box-shadow: var(--glow-purple);
}
.btn-apply-big.active:hover { transform: translateY(-2px); }
.btn-apply-big.disabled {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  cursor: not-allowed;
  border: 1px solid var(--border);
}

.detail-section { margin-bottom: 2.5rem; }
.detail-section h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-section h2 svg { width: 18px; height: 18px; color: var(--neon-purple); }
.detail-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-line;
}

/* Kurallar listesi */
.rules-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.rules-list li {
  display: flex;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}
.rules-list li::before {
  content: '✓';
  color: var(--neon-cyan);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---------- Başvuru Formu ---------- */
.apply-form-section {
  background: var(--bg-secondary);
  padding: 60px 5%;
  position: relative;
  z-index: 1;
}
.apply-form-wrap {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}
.apply-form-wrap h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.apply-form-wrap p.sub {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.player-fields { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0; }

.player-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
}

/* Oyuncu input — flex:1 + min-width:0 taşmayı önler */
.player-row .player-input {
  flex: 1 1 0;
  min-width: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font);
  padding: 10px 14px;
  outline: none;
  transition: var(--transition);
  width: auto; /* style.css'deki width:100% kuralını sıfırla */
}
.player-row .player-input:focus {
  border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px rgba(255,85,0,0.15);
}
.player-row .player-input::placeholder { color: var(--text-muted); }

.player-row .remove-player {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
}
.player-row .remove-player:hover { background: rgba(239,68,68,0.25); }

.add-player-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,184,0,0.08);
  border: 1px dashed rgba(255,184,0,0.3);
  color: var(--neon-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}
.add-player-btn:hover { background: rgba(255,184,0,0.12); border-color: var(--neon-cyan); }

.closed-banner {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  color: #ef4444;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.closed-banner svg { width: 22px; height: 22px; }

/* ---------- Boş Durum ---------- */
.no-tournaments {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}
.no-tournaments svg { width: 64px; height: 64px; opacity: 0.2; margin: 0 auto 1rem; }
.no-tournaments p { font-size: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-info-card { position: static; }
}
@media (max-width: 600px) {
  .tournaments-grid { grid-template-columns: 1fr; }
  .apply-form-wrap { padding: 1.5rem; }
}
