/* =========================================================
   ORTAK KARİYER — MODERN FUTBOL SCOUTING & BENTO STİLİ
   (Dribbble Football Dashboard ilhamlı — koyu çam/grafit + saha yeşili + krem)
   ========================================================= */
:root {
  color-scheme: dark;
  --pitch-bg: #080d0b;
  --pitch-card: #0f1714;
  --pitch-card-2: #15211c;
  --pitch-border: rgba(255, 255, 255, 0.08);
  --pitch-green: #22c55e;
  --pitch-mint: #4ade80;
  --pitch-cream: #f3efe6;
  --pitch-amber: #f59e0b;
  --pitch-sky: #38bdf8;
}

html,
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

body {
  background-color: var(--pitch-bg);
  background-image:
    radial-gradient(ellipse 70% 45% at 20% -10%, rgba(34, 197, 94, 0.14), transparent 65%),
    radial-gradient(ellipse 60% 40% at 85% 5%, rgba(245, 158, 11, 0.08), transparent 65%),
    linear-gradient(180deg, #09100d 0%, #060908 100%);
  color: #f4f7f5;
}

.pitch-bg {
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 50% 48%, transparent 140px, rgba(34, 197, 94, 0.28) 141px, transparent 143px),
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  animation: pitchPulse 14s ease-in-out infinite alternate;
}

@keyframes pitchPulse {
  0% { opacity: 0.14; }
  100% { opacity: 0.22; }
}

.app-container {
  max-width: 1200px;
  padding: 16px 20px 28px;
  gap: 16px;
}

/* TOP BAR */
.top-bar {
  position: relative;
  overflow: hidden;
  background: rgba(15, 23, 20, 0.9);
  border: 1px solid var(--pitch-border);
  border-radius: 16px;
  padding: 12px 18px;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

.top-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--pitch-green) 40%, var(--pitch-amber) 70%, transparent 100%);
  background-size: 200% 100%;
  animation: scoutSweep 5s linear infinite;
}

@keyframes scoutSweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.brand-crest {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: transparent;
  border: none;
  filter: drop-shadow(0 6px 16px rgba(16, 185, 129, 0.35));
}

.brand-crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.38);
  display: block;
}

.logo {
  display: inline-block;
  font-family: "Barlow Condensed", "Chakra Petch", sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--pitch-cream);
  background: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.logo span {
  display: inline-block;
  padding: 0 4px 0 2px;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.35px #10b981;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.48));
}

.brand-sub {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #86efac;
}

.portal-back-link {
  border-radius: 9px;
  border: 1px solid rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.12);
  color: #fed7aa;
  font-weight: 700;
  padding: 7px 14px;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.18s ease;
}

.portal-back-link:hover {
  background: rgba(249, 115, 22, 0.25);
  transform: translateY(-1px);
}

/* CENTERED COMMAND STAGE + RULES/FAQ BELOW */
.arena-lobby-grid {
  display: grid;
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
  gap: 18px;
}

.arena-side-col {
  width: 100%;
  align-items: center;
}

.lobby-info-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.info-toggle-buttons {
  justify-content: center;
}

.app-footer {
  justify-content: center;
  text-align: center;
}

.footer-info {
  text-align: center;
}

.report-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1px solid rgba(255, 59, 92, 0.38);
  background: rgba(255, 59, 92, 0.12);
  color: #fda4af;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.report-pill-btn:hover {
  background: rgba(255, 59, 92, 0.22);
  border-color: rgba(255, 59, 92, 0.65);
  transform: translateY(-1px);
}

.header-report-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 59, 92, 0.45);
  background: rgba(255, 59, 92, 0.14);
  color: #fda4af;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.header-report-btn:hover {
  background: rgba(255, 59, 92, 0.28);
  border-color: rgba(255, 59, 92, 0.75);
}

.arena-main-card {
  background: linear-gradient(180deg, rgba(16, 25, 21, 0.95) 0%, rgba(11, 17, 15, 0.98) 100%);
  border: 1px solid var(--pitch-border);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.48);
}

.lobby-intro {
  margin-bottom: 18px;
}

.lobby-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.45rem);
  letter-spacing: 0.02em;
  color: var(--pitch-cream);
  background: none;
  -webkit-text-fill-color: currentColor;
  margin-bottom: 6px;
}

.lobby-subtitle {
  color: #9caea4;
}

/* PLAYER PROFILE BAR */
.player-profile-bar {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(8, 13, 11, 0.78);
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-left: 4px solid var(--pitch-green);
  margin: 0 0 18px;
}

.profile-input-group {
  flex: 1 1 260px;
  width: auto;
  max-width: none;
  margin: 0;
  text-align: left;
}

#playerNameInput {
  text-align: left;
  height: 38px;
}

.consent-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: #cbd5e1;
  cursor: pointer;
}

.consent-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
}

/* PLAYER PROFILE & MODE SELECT BAR */
.player-profile-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  margin-bottom: 16px;
}

.player-profile-bar .form-group {
  margin-bottom: 0;
}

.player-profile-bar input[type="text"],
.player-profile-bar .arena-select-trigger {
  height: 38px !important;
  min-height: 38px !important;
  box-sizing: border-box;
  margin: 0;
}

.mode-select-group select {
  width: 100%;
  font-weight: 600;
  border-color: rgba(34, 197, 94, 0.35);
}

@media (max-width: 640px) {
  .player-profile-bar {
    grid-template-columns: 1fr;
  }
}

/* SEGMENTED MODE TABS */
.mode-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: #080d0b;
  border: 1px solid var(--pitch-border);
  margin-bottom: 16px;
}

.mode-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #8fa398;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.mode-tab-btn:hover {
  color: var(--pitch-cream);
  background: rgba(255, 255, 255, 0.04);
}

.mode-tab-btn.is-active[data-mode="create"] {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.5);
  color: var(--pitch-mint);
}

.mode-tab-btn.is-active[data-mode="join"] {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.5);
  color: var(--pitch-sky);
}

.mode-tab-btn.is-active[data-mode="solo"] {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.5);
  color: var(--pitch-amber);
}

.mode-tab-num {
  font-size: 0.72rem;
  opacity: 0.75;
}

/* MODE STAGE */
.lobby-tabs.single-stage {
  display: block;
}

.lobby-box {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 24px 26px;
  background: linear-gradient(170deg, rgba(21, 33, 28, 0.94) 0%, rgba(12, 19, 16, 0.98) 100%);
  border: 1px solid var(--pitch-border);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.lobby-box::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 30%), rgba(34, 197, 94, 0.14), transparent 72%);
  transition: opacity 0.25s ease;
}

.lobby-box:hover::before {
  opacity: 1;
}

.lobby-box.mode-panel-hidden {
  display: none;
}

.create-box {
  border-top: 3px solid var(--pitch-green);
}

.join-box {
  border-top: 3px solid var(--pitch-sky);
}

.solo-box {
  border-top: 3px solid var(--pitch-amber);
}

/* RIGHT SIDEBAR: DAILY PUZZLE BENTO CARD */
.arena-side-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.daily-banner {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-top: 3px solid var(--pitch-amber);
  background:
    radial-gradient(280px circle at var(--mx, 80%) var(--my, 15%), rgba(245, 158, 11, 0.16), transparent 68%),
    linear-gradient(175deg, rgba(31, 24, 14, 0.92) 0%, rgba(12, 18, 15, 0.98) 55%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.daily-banner-main {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.daily-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.daily-leaderboard-list {
  margin-top: 12px;
  max-height: 240px;
  overflow-y: auto;
}

.card.has-open-select,
.lobby-box.has-open-select,
.arena-main-card.has-open-select {
  overflow: visible !important;
  clip-path: none !important;
  z-index: 30;
}

/* MODERN CUSTOM DROPDOWN (.arena-select-*) */
.arena-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.arena-select-wrap {
  position: relative;
  width: 100%;
}

.arena-select-trigger {
  width: 100%;
  height: 38px !important;
  min-height: 38px !important;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-radius: 9px;
  background: #080d0b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--pitch-cream);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.arena-select-trigger:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: #0b120f;
}

.arena-select-wrap.is-open .arena-select-trigger,
.arena-select-trigger:focus-visible {
  outline: none;
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.arena-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arena-select-arrow {
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), color 0.16s ease;
}

.arena-select-wrap.is-open .arena-select-arrow {
  transform: rotate(180deg);
  color: var(--pitch-mint);
}

.arena-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  padding: 6px;
  max-height: 240px;
  overflow-y: auto;
  border-radius: 12px;
  background: rgba(11, 18, 15, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.62);
  display: none;
  flex-direction: column;
  gap: 2px;
}

.arena-select-wrap.is-open .arena-select-menu {
  display: flex;
  animation: selectMenuIn 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes selectMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.arena-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.arena-select-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.arena-select-option.is-selected {
  background: rgba(34, 197, 94, 0.16);
  color: var(--pitch-mint);
  font-weight: 700;
}

.arena-select-check {
  flex-shrink: 0;
  opacity: 0;
}

.arena-select-option.is-selected .arena-select-check {
  opacity: 1;
}

/* INPUTS & BUTTONS */
input[type="text"],
input[type="number"],
select {
  height: 38px !important;
  min-height: 38px !important;
  box-sizing: border-box;
  background: #080d0b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  color: #f4f7f5;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: var(--pitch-green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.btn {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 10px;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), filter 0.16s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.07);
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.primary-btn {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #04130a;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.24);
}

.cyan-btn {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #03121a;
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.22);
}

.gold-btn {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: #160f01;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.24);
}

/* GAMEPLAY CLUB CARDS */
.club-card {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  padding: 18px 14px;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(34, 197, 94, 0.18), transparent 65%),
    linear-gradient(175deg, #16241d 0%, #0b120f 100%);
  border: 1px solid rgba(34, 197, 94, 0.26);
  border-top: 3px solid var(--pitch-green);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease;
}

.club-card:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: var(--pitch-mint);
}

.scoreboard-panel {
  background: linear-gradient(180deg, rgba(16, 25, 21, 0.94) 0%, rgba(10, 15, 13, 0.97) 100%);
  border: 1px solid var(--pitch-border);
  border-top: 3px solid var(--pitch-green);
  border-radius: 15px;
}

@media (max-width: 960px) {
  .arena-lobby-grid {
    grid-template-columns: 1fr;
  }

  .player-profile-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .mode-switcher {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pitch-bg,
  .top-bar::after {
    animation: none !important;
  }

  .lobby-box,
  .club-card,
  .btn,
  .mode-tab-btn {
    transition: none !important;
  }
}
