@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;800;900&family=Sora:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #05010d;
  --bg-2: #0b041c;
  --cyan: #22e6ff;
  --cyan-2: #4d7cff;
  --magenta: #c43bff;
  --pink: #ff3df0;
  --text: #eef6ff;
  --muted: rgba(238, 246, 255, 0.62);
  --line: rgba(90, 170, 255, 0.18);
  --glass: rgba(10, 8, 28, 0.62);
  --ok: #3dffc5;
  --danger: #ff5d8f;
  --shadow: 0 0 40px rgba(34, 230, 255, 0.18), 0 0 80px rgba(196, 59, 255, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Sora, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(34, 230, 255, 0.16), transparent 55%),
    radial-gradient(800px 480px at 90% 0%, rgba(196, 59, 255, 0.2), transparent 50%),
    radial-gradient(700px 500px at 50% 110%, rgba(77, 124, 255, 0.12), transparent 50%),
    var(--bg);
  letter-spacing: 0.01em;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  z-index: 0;
}

a { color: var(--cyan); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 10px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.brand img {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 0 14px rgba(34, 230, 255, 0.55)) drop-shadow(0 0 22px rgba(196, 59, 255, 0.35));
}
.brand strong {
  font-family: Orbitron, sans-serif;
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 15px;
}
.nav-links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.userchip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 10, 28, 0.5);
}
.userchip img { width: 28px; height: 28px; border-radius: 50%; }

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(34, 230, 255, 0.16), rgba(196, 59, 255, 0.16));
  color: var(--text);
  transition: 0.2s transform, 0.2s box-shadow, 0.2s border-color;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary {
  background: linear-gradient(120deg, #1be1ff 0%, #4d7cff 45%, #d94bff 100%);
  color: #061018;
  font-weight: 700;
}
.btn-ghost {
  background: transparent;
  border-color: var(--line);
}
.btn-danger {
  background: rgba(255, 93, 143, 0.12);
  border-color: rgba(255, 93, 143, 0.35);
}
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.hero {
  min-height: calc(100vh - 90px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px 0 80px;
}
.orb {
  position: relative;
  width: min(430px, 86vw);
  margin: 0 auto 18px;
}
.orb img {
  width: 100%;
  filter: drop-shadow(0 0 28px rgba(34, 230, 255, 0.45)) drop-shadow(0 0 48px rgba(196, 59, 255, 0.28));
  animation: floaty 6s ease-in-out infinite;
}
.orb::after, .orb::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px solid rgba(34, 230, 255, 0.18);
  animation: spin 18s linear infinite;
  pointer-events: none;
}
.orb::before {
  inset: -2%;
  border-color: rgba(196, 59, 255, 0.2);
  animation-duration: 26s;
  animation-direction: reverse;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.kicker {
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 12px;
  font-weight: 600;
}
h1, h2, h3 { font-family: Orbitron, sans-serif; margin: 0 0 10px; }
h1 {
  font-size: clamp(42px, 8vw, 86px);
  font-weight: 900;
  letter-spacing: 0.14em;
  background: linear-gradient(92deg, #7af3ff 10%, #ffffff 42%, #d56bff 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}
.lead {
  color: var(--muted);
  max-width: 560px;
  margin: 8px auto 26px;
  line-height: 1.7;
}

.grid-3, .grid-2 {
  display: grid;
  gap: 16px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1.2fr 0.8fr; }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.card h3 {
  font-size: 16px;
  letter-spacing: 0.08em;
}
.muted { color: var(--muted); line-height: 1.65; }
.section { padding: 28px 0 70px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: rgba(34, 230, 255, 0.08);
}
.badge.tryout { color: #7af3ff; }
.badge.titulaire { color: #d56bff; }
.badge.sub { color: #9ad0ff; }
.badge.admin { color: #ffd36b; }
.badge.fan { color: var(--muted); }

.flash {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(34, 230, 255, 0.08);
}
.flash.error {
  border-color: rgba(255, 93, 143, 0.4);
  background: rgba(255, 93, 143, 0.1);
  color: #ffd0dc;
}
.flash.warn {
  border-color: rgba(255, 211, 107, 0.35);
  background: rgba(255, 211, 107, 0.08);
}

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.tab {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.tab.active {
  background: linear-gradient(120deg, rgba(34, 230, 255, 0.2), rgba(196, 59, 255, 0.2));
  box-shadow: var(--shadow);
}

.table-wrap { overflow: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th { color: var(--muted); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; font-size: 11px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field span { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
input, select, textarea {
  background: rgba(6, 8, 22, 0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(34, 230, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 230, 255, 0.12);
}

.avail-grid {
  display: grid;
  grid-template-columns: 92px repeat(4, 1fr);
  gap: 8px;
}
.avail-head, .avail-cell, .avail-day {
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  border: 1px solid var(--line);
}
.avail-head { color: var(--muted); font-size: 12px; background: rgba(255,255,255,0.02); }
.avail-head strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.avail-day { text-align: left; font-weight: 600; }
.avail-day.today {
  color: var(--cyan);
  border-color: rgba(34, 230, 255, 0.35);
}
.avail-cell {
  cursor: pointer;
  background: rgba(255,255,255,0.03);
  user-select: none;
  min-height: 46px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.avail-cell.on {
  background: linear-gradient(160deg, rgba(34, 230, 255, 0.28), rgba(196, 59, 255, 0.22));
  box-shadow: inset 0 0 0 1px rgba(34, 230, 255, 0.35);
  color: #fff;
}

.plan-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--muted);
}
.plan-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.plan-legend-sep { opacity: 0.35; }
.plan-legend .slot-chip { min-width: 22px; }

.planning-table {
  min-width: 860px;
}
.planning-table .col-player {
  min-width: 170px;
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(8, 6, 22, 0.96);
}
.planning-table .col-day {
  text-align: center;
  width: 72px;
}
.planning-table th.col-day {
  font-size: 11px;
  letter-spacing: 0.08em;
}
.planning-table th.today,
.planning-table td.today {
  background: rgba(34, 230, 255, 0.05);
}
.today-tag {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--cyan);
}
.day-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
}
.slot-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.35);
  color: rgba(238, 246, 255, 0.28);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-style: normal;
}
.slot-chip.on {
  color: #041018;
  background: linear-gradient(120deg, #1be1ff, #7af3ff 55%, #d56bff);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(34, 230, 255, 0.35);
}
.count-mini {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.you {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 600;
}

.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  opacity: 0.9;
}

.member {
  display: flex;
  align-items: center;
  gap: 10px;
}
.player-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.player-name {
  font-size: 15px;
  font-weight: 700;
}
.pos-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pos-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: Orbitron, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  border: 1px solid transparent;
}
.pos-tag.gk {
  color: #041018;
  background: linear-gradient(135deg, #1be1ff, #4d7cff);
  box-shadow: 0 0 14px rgba(34, 230, 255, 0.45);
}
.pos-tag.dc {
  color: #140418;
  background: linear-gradient(135deg, #c43bff, #7a5cff);
  box-shadow: 0 0 14px rgba(196, 59, 255, 0.45);
}
.pos-tag.bu {
  color: #14040c;
  background: linear-gradient(135deg, #ff3df0, #ff8a3d);
  box-shadow: 0 0 14px rgba(255, 61, 240, 0.4);
}
.pos-tag.empty {
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border-color: var(--line);
  font-size: 11px;
  letter-spacing: 0.04em;
  font-family: Sora, sans-serif;
  font-weight: 600;
}

.safety {
  border: 1px solid rgba(61, 255, 197, 0.28);
  background: rgba(61, 255, 197, 0.06);
  color: #bffff0;
}

.hidden { display: none !important; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

footer {
  padding: 28px 16px 48px;
  text-align: center;
}
#lang-switch {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
footer .credit {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(238, 246, 255, 0.42);
}

.zen-lang {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid rgba(90, 170, 255, 0.22);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
}
.zen-lang button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0.42;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.zen-lang button:hover { opacity: 0.9; }
.zen-lang button.is-on {
  opacity: 1;
  background: rgba(34, 230, 255, 0.16);
}
.zen-flag {
  display: block;
  width: 20px;
  height: 14px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.zen-lang-welcome {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(2, 0, 10, 0.82);
  backdrop-filter: blur(12px);
}
.zen-lang-welcome__panel {
  width: min(28rem, 100%);
  border: 1px solid rgba(90, 170, 255, 0.22);
  background: linear-gradient(165deg, rgba(34, 230, 255, 0.08), rgba(196, 59, 255, 0.08)),
    rgba(10, 6, 24, 0.96);
  padding: 1.7rem 1.45rem 1.4rem;
  box-shadow: var(--shadow);
  border-radius: 22px;
  text-align: center;
}
.zen-lang-welcome__kicker {
  margin: 0 0 0.55rem;
  font-family: Orbitron, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
}
.zen-lang-welcome__title {
  margin: 0;
  font-family: Orbitron, sans-serif;
  font-size: 1.55rem;
  letter-spacing: 0.04em;
}
.zen-lang-welcome__copy {
  margin: 0.8rem 0 1.3rem;
  color: var(--muted);
  line-height: 1.55;
}
.zen-lang-welcome__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}
.zen-lang-welcome__actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: rgba(0,0,0,0.35);
  padding: 2px 6px;
  border-radius: 6px;
}

@media (max-width: 720px) {
  .avail-grid { grid-template-columns: 74px repeat(4, 1fr); font-size: 12px; }
  h1 { letter-spacing: 0.08em; }
}

.mapping-grid { display: flex; flex-direction: column; gap: 18px; }
.map-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.pos-picks { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.timetable {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  overflow-x: auto;
}
.time-col {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(8, 10, 28, 0.4);
  min-width: 130px;
}
.time-col h4 { margin: 0 0 8px; font-size: 13px; font-family: Orbitron, sans-serif; }
.time-slot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(34, 230, 255, 0.06);
  font-size: 12px;
}
.time-slot.type-match { background: rgba(196, 59, 255, 0.12); }
.time-slot em { color: var(--muted); font-style: normal; font-size: 11px; }
.chat-card { display: flex; flex-direction: column; gap: 12px; min-height: 420px; }
.chat-rooms { display: flex; gap: 8px; flex-wrap: wrap; }
.chat-log {
  flex: 1;
  min-height: 280px;
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0,0,0,0.25);
}
.chat-msg { margin-bottom: 12px; }
.chat-msg p { margin: 4px 0 0; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; min-height: 44px; height: 44px; }
.strat-card { margin-top: 14px; }
.strat-map {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-top: 10px;
}

@media (max-width: 900px) {
  .timetable { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}
