/* Events / tournaments — Rally Point */
.page-events {
  --ev-accent: #e8a33c;
  --ev-accent-dim: rgba(232, 163, 60, 0.14);
  --ev-panel: #141414;
  --ev-panel-2: #1a1a1a;
  --ev-line: #2a2a2a;
  --ev-mist: #9ca3af;
}

.ev-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.ev-hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: #fff;
}
.ev-hero p {
  margin: 0;
  color: var(--ev-mist);
  max-width: 42rem;
  line-height: 1.45;
}
.ev-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.ev-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #1c1c1c 0%, #121212 100%);
  border: 1px solid var(--ev-line);
  border-radius: 4px;
  overflow: hidden;
  min-height: 280px;
  transition: border-color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
  color: inherit;
}
.ev-card:hover {
  border-color: rgba(232, 163, 60, 0.55);
  transform: translateY(-2px);
}
.ev-card-media {
  position: relative;
  height: 132px;
  background:
    linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.75) 100%),
    radial-gradient(ellipse at 30% 20%, rgba(232,163,60,0.25), transparent 55%),
    #0d0d0d;
  background-size: cover;
  background-position: center;
}
.ev-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
  flex: 1;
}
.ev-card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  color: #f5f5f5;
}
.ev-card-desc {
  margin: 0;
  color: var(--ev-mist);
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.ev-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.ev-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #222;
  color: #cfcfcf;
  border: 1px solid #333;
}
.ev-chip.live { background: rgba(34,197,94,0.15); color: #4ade80; border-color: rgba(34,197,94,0.35); }
.ev-chip.reg { background: var(--ev-accent-dim); color: var(--ev-accent); border-color: rgba(232,163,60,0.4); }
.ev-chip.done { background: #1f1f1f; color: #888; }
.ev-chip.warn { background: rgba(239,68,68,0.12); color: #f87171; border-color: rgba(239,68,68,0.35); }

.ev-card-cta {
  border: 1px dashed rgba(232, 163, 60, 0.45);
  background:
    linear-gradient(160deg, rgba(232,163,60,0.08), transparent 50%),
    #141414;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 20px;
  cursor: pointer;
}
.ev-card-cta:hover { border-color: var(--ev-accent); }
.ev-card-cta strong {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ev-accent);
  display: block;
  margin-bottom: 8px;
}
.ev-card-cta span {
  color: var(--ev-mist);
  font-size: 0.92rem;
  line-height: 1.4;
  max-width: 18rem;
}

.ev-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ev-mist);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.ev-back:hover { color: var(--ev-accent); }

.ev-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 960px) {
  .ev-detail { grid-template-columns: 1fr; }
}

.ev-detail-main,
.ev-detail-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.ev-detail-banner {
  height: 200px;
  border-radius: 4px;
  border: 1px solid var(--ev-line);
  background:
    linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.7) 100%),
    radial-gradient(ellipse at 20% 0%, rgba(232,163,60,0.3), transparent 50%),
    #101010;
  background-size: cover;
  background-position: center;
}

.ev-detail-intro {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ev-detail-title {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1.1;
  color: #fff;
}
.ev-detail-desc {
  margin: 0;
  color: var(--ev-mist);
  line-height: 1.45;
}
.ev-panel-info { margin: 0; }
.ev-panel-bracket { min-height: 160px; }

.ev-panel {
  background: var(--ev-panel);
  border: 1px solid var(--ev-line);
  border-radius: 4px;
  padding: 16px;
}
.ev-panel h2, .ev-panel h3 {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ev-accent);
  margin: 0 0 10px;
  font-size: 1.15rem;
}
.ev-panel p, .ev-panel .ev-info {
  color: #c8c8c8;
  line-height: 1.5;
  white-space: pre-wrap;
  margin: 0 0 10px;
}
.ev-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.ev-btn {
  appearance: none;
  border: 1px solid #333;
  background: #222;
  color: #eee;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 9px 14px;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ev-btn:hover { border-color: #555; }
.ev-btn-sm {
  padding: 6px 10px;
  font-size: 0.7rem;
}
.ev-btn-primary {
  background: var(--ev-accent);
  border-color: var(--ev-accent);
  color: #111;
}
.ev-btn-primary:hover { filter: brightness(1.05); }
.ev-btn-danger {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}
.ev-btn-danger:hover {
  border-color: #ef4444;
  color: #fecaca;
}
.ev-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.ev-reg-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ev-reg-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #252525;
}
.ev-reg-list li:last-child { border-bottom: 0; }
.ev-reg-list img {
  width: 28px;
  height: 28px;
  border-radius: 2px;
  object-fit: cover;
  background: #222;
  flex-shrink: 0;
}
.ev-reg-main {
  flex: 1;
  min-width: 0;
}
.ev-reg-sub {
  font-size: 0.78rem;
  margin-top: 2px;
}
.ev-reg-sub a {
  color: #cfcfcf;
  text-decoration: none;
}
.ev-reg-sub a:hover { color: var(--ev-accent); }
.ev-reg-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
  margin-left: auto;
}

.ev-bracket {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.ev-round {
  min-width: 220px;
  flex: 0 0 auto;
}
.ev-round-label {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ev-mist);
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.ev-match {
  background: var(--ev-panel-2);
  border: 1px solid var(--ev-line);
  border-radius: 3px;
  padding: 10px;
  margin-bottom: 10px;
}
.ev-match.live { border-color: rgba(34,197,94,0.5); }
.ev-match.finished { opacity: 0.85; }
.ev-match-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #252525;
  font-size: 0.88rem;
}
.ev-match-slot:last-child { border-bottom: 0; }
.ev-match-slot.winner { color: var(--ev-accent); font-weight: 600; }
.ev-match-slot .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #888;
}
.ev-match-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ev-standings table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.ev-standings th, .ev-standings td {
  text-align: left;
  padding: 7px 6px;
  border-bottom: 1px solid #252525;
}
.ev-standings th {
  color: var(--ev-mist);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.ev-standings .place {
  font-family: 'JetBrains Mono', monospace;
  color: var(--ev-accent);
  width: 2rem;
}

.ev-form label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ev-mist);
  margin: 10px 0 4px;
}
.ev-form input,
.ev-form textarea,
.ev-form select {
  width: 100%;
  background: #0f0f0f;
  border: 1px solid #333;
  color: #eee;
  border-radius: 2px;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 0.95rem;
}
.ev-form textarea { min-height: 88px; resize: vertical; }
.ev-form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 600px) {
  .ev-form .row-2 { grid-template-columns: 1fr; }
}

.ev-server-need {
  padding: 10px 12px;
  border-radius: 3px;
  background: var(--ev-accent-dim);
  border: 1px solid rgba(232,163,60,0.35);
  color: #f0d9a8;
  font-size: 0.9rem;
  margin: 0 0 10px;
}
.ev-server-need.ok {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.35);
  color: #86efac;
}

.ev-empty {
  color: var(--ev-mist);
  padding: 24px 0;
  text-align: center;
}
.ev-err {
  color: #f87171;
  font-size: 0.9rem;
  margin-top: 8px;
}
.ev-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
}
.ev-modal {
  width: min(560px, 100%);
  background: #151515;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 18px 20px 20px;
}
.ev-modal h2 {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 6px;
  color: #fff;
}
.ev-modal .mist { margin: 0 0 12px; color: var(--ev-mist); font-size: 0.92rem; }
