@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */

* {
  box-sizing: border-box;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #0f1117;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* ── Full-page background image + dark overlay ── */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('/wp-content/uploads/2026/01/tippvilag_background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.82) 0%, rgba(10, 10, 20, 0.88) 100%);
  z-index: -1;
  pointer-events: none;
}

/* KRITIKUS: WordPress konténerek teljes felülírása */
.alignfull,
.has-global-padding,
.wp-block-group,
.wp-site-blocks,
.site-content,
.entry-content,
.wp-block-post-content,
.wp-block-template-part,
article,
main,
footer,
header {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  min-height: auto !important;
}

/* Main bracket container wrapper */
#wp-bracket-root {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

/* Hide WordPress default user menu if it appears outside dashboard */
body:not(.admin-bar) .logged-in-as,
body:not(.admin-bar) #wpadminbar,
.post-edit-link,
.entry-meta {
  display: none !important;
}

.wp-block-post-title {
  display: none;
}

/* ========================================
   BRACKET TREE LAYOUT - MODERN DESIGN
   ======================================== */

.bracket {
  display: flex;
  gap: 100px;
  padding: 60px 80px;
  overflow-x: auto;
  min-height: 600px;
  position: relative;
  background: rgba(20, 24, 36, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  margin: 20px 60px;
  width: auto;
}

/* Custom scrollbar */
.bracket::-webkit-scrollbar {
  height: 10px;
}

.bracket::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.bracket::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(109, 40, 217, 0.4) 100%);
  border-radius: 10px;
}

.bracket::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.6) 0%, rgba(109, 40, 217, 0.6) 100%);
}

.round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  min-width: 240px;
  position: relative;
  z-index: 2;
}

/* Round labels */
.round::before {
  content: attr(data-round-name);
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
}

/* Round labels are now set dynamically via JavaScript (data-round-name attribute) */


/* ========================================
   MATCH CONTAINERS
   ======================================== */

.match {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* ========================================
   PLAYER BOXES - PREMIUM DESIGN
   ======================================== */

.bracket .player {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 16px 18px !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  background: rgba(30, 34, 46, 0.85) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  position: relative !important;
  min-height: 52px !important;
  display: flex !important;
  align-items: center !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  color: #e2e8f0 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

.bracket .player:hover:not(.disabled) {
  background: rgba(40, 44, 58, 0.95) !important;
  transform: translateX(4px) translateY(-1px) !important;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
}

/* Empty slot */
.bracket .player:empty::before,
.bracket .player:contains("—")::before {
  content: "TBD";
  color: #64748b;
  font-weight: 500;
  font-style: italic;
}

/* ========================================
   CONNECTING LINES - DRAWN BY JAVASCRIPT
   ======================================== */

#bracket-lines-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

/* ========================================
   PLAYER STATES - MODERN COLORS
   ======================================== */

/* User's pick (purple glow) */
.player.pick {
  background: rgba(139, 92, 246, 0.5) !important;
  border: 2px solid #c4b5fd !important;
  font-weight: 700 !important;
  color: #f5f0ff !important;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.6), inset 0 0 15px rgba(139, 92, 246, 0.15) !important;
}

.player.pick:hover:not(.disabled) {
  transform: translateX(4px) translateY(-2px) !important;
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.7), inset 0 0 20px rgba(139, 92, 246, 0.2) !important;
}

/* Correct prediction (green glow) */
.player.correct {
  background: rgba(16, 185, 129, 0.45) !important;
  border: 2px solid #6ee7b7 !important;
  color: #d1fae5 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.5), inset 0 0 15px rgba(16, 185, 129, 0.1) !important;
  position: relative !important;
}

.player.correct::after {
  content: "✓";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  font-size: 18px;
  color: #a7f3d0;
  animation: checkmark-pop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmark-pop {
  0% {
    transform: translateY(-50%) scale(0);
  }

  50% {
    transform: translateY(-50%) scale(1.2);
  }

  100% {
    transform: translateY(-50%) scale(1);
  }
}

/* Wrong prediction (red glow) */
.player.wrong {
  background: rgba(239, 68, 68, 0.45) !important;
  border: 2px solid #fca5a5 !important;
  color: #fee2e2 !important;
  text-decoration: line-through;
  opacity: 0.95;
  font-weight: 600 !important;
  box-shadow: 0 0 28px rgba(239, 68, 68, 0.4), inset 0 0 12px rgba(239, 68, 68, 0.1) !important;
}

/* Disabled state */
.player.disabled {
  pointer-events: none;
  opacity: 0.4;
  cursor: not-allowed !important;
  filter: grayscale(0.3);
}

/* ========================================
   SPACING FOR TREE EFFECT
   ======================================== */

.round:nth-child(1) .match {
  margin: 8px 0;
}

.round:nth-child(2) .match {
  margin: 24px 0;
}

.round:nth-child(3) .match {
  margin: 56px 0;
}

.round:nth-child(4) .match {
  margin: 120px 0;
}

.round:nth-child(5) .match {
  margin: 248px 0;
}

.round:nth-child(6) .match {
  margin: 504px 0;
}

.round:nth-child(7) .match {
  margin: 1016px 0;
}

/* ========================================
   DASHBOARD - PREMIUM DESIGN
   ======================================== */

#bracket-dashboard {
  margin: 0 auto 40px auto;
  max-width: 900px;
}

/* === DARK GLASS HEADER BAR === */
.dash-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 34, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 24px;
  border-radius: 14px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dash-header-back {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  transition: all 0.3s;
  white-space: nowrap;
  -webkit-text-fill-color: #a78bfa;
}

.dash-header-back:hover {
  background: rgba(139, 92, 246, 0.3);
  color: #fff;
  -webkit-text-fill-color: #fff;
  transform: translateX(-2px);
}

.dash-header-title {
  font-size: 22px;
  font-weight: 800;
  color: #e2e8f0;
  -webkit-text-fill-color: #e2e8f0;
  letter-spacing: -0.02em;
  text-align: center;
  flex: 1;
  padding: 0 16px;
}

.dash-header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  white-space: nowrap;
}

.dash-header-username {
  font-weight: 600;
  color: #e2e8f0;
  -webkit-text-fill-color: #e2e8f0;
}

.dash-header-logout {
  text-decoration: none;
  color: #a78bfa;
  font-weight: 700;
  font-size: 13px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
  -webkit-text-fill-color: #a78bfa;
}

.dash-header-logout:hover {
  color: #c4b5fd;
  -webkit-text-fill-color: #c4b5fd;
}

/* === INFO BAR (stats below) === */
#bracket-infobar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 20px;
  padding: 0;
}

.dash-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 28px;
  background: rgba(30, 34, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 140px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dash-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #64748b;
  margin-bottom: 6px;
  font-weight: 700;
}

.dash-value {
  font-size: 28px;
  font-weight: 800;
  color: #e2e8f0;
  font-family: "Inter", sans-serif;
  letter-spacing: -0.03em;
}

.dash-value.blue {
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dash-value.gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dash-value.timer {
  color: #f87171;
  font-family: "SF Mono", "Monaco", monospace;
  font-size: 24px;
}

/* ========================================
   LEADERBOARD - MODERN DESIGN
   ======================================== */

#bracket-leaderboard {
  max-width: 700px;
  margin: 50px auto;
  background: rgba(20, 24, 36, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 32px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

#bracket-leaderboard h3 {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, #8b5cf6 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- Leaderboard Row --- */
.leaderboard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.leaderboard-row:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* --- Left side (rank + medal + name) --- */
.leaderboard-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.leaderboard-rank {
  font-weight: 800;
  font-size: 14px;
  color: #64748b;
  -webkit-text-fill-color: #64748b;
  min-width: 28px;
}

.leaderboard-medal {
  font-size: 20px;
  min-width: 28px;
  text-align: center;
}

.leaderboard-name {
  font-weight: 700;
  font-size: 15px;
  color: #e2e8f0 !important;
  -webkit-text-fill-color: #e2e8f0;
  letter-spacing: 0.3px;
}

/* --- Score --- */
.leaderboard-score {
  font-weight: 800;
  font-size: 15px;
  color: #a78bfa !important;
  -webkit-text-fill-color: #a78bfa;
  white-space: nowrap;
}

/* --- Gold (1st place) --- */
.leaderboard-row.gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.15) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.leaderboard-row.gold .leaderboard-rank {
  color: #fbbf24;
  -webkit-text-fill-color: #fbbf24;
}

.leaderboard-row.gold .leaderboard-score {
  color: #fbbf24 !important;
  -webkit-text-fill-color: #fbbf24;
}

/* --- Silver (2nd place) --- */
.leaderboard-row.silver {
  background: linear-gradient(135deg, rgba(156, 163, 175, 0.2) 0%, rgba(107, 114, 128, 0.12) 100%);
  border: 1px solid rgba(156, 163, 175, 0.3);
  box-shadow: 0 0 16px rgba(156, 163, 175, 0.12);
}

.leaderboard-row.silver .leaderboard-rank {
  color: #d1d5db;
  -webkit-text-fill-color: #d1d5db;
}

.leaderboard-row.silver .leaderboard-score {
  color: #d1d5db !important;
  -webkit-text-fill-color: #d1d5db;
}

/* --- Bronze (3rd place) --- */
.leaderboard-row.bronze {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2) 0%, rgba(234, 88, 12, 0.12) 100%);
  border: 1px solid rgba(249, 115, 22, 0.35);
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.15);
}

.leaderboard-row.bronze .leaderboard-rank {
  color: #fb923c;
  -webkit-text-fill-color: #fb923c;
}

.leaderboard-row.bronze .leaderboard-score {
  color: #fb923c !important;
  -webkit-text-fill-color: #fb923c;
}

/* --- Current User Highlight --- */
.leaderboard-row.me {
  background: rgba(139, 92, 246, 0.25);
  border: 2px solid rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.25);
}

.leaderboard-row.me .leaderboard-name {
  color: #c4b5fd !important;
  -webkit-text-fill-color: #c4b5fd;
}

.leaderboard-row.me .leaderboard-score {
  color: #c4b5fd !important;
  -webkit-text-fill-color: #c4b5fd;
}

/* ========================================
   LOBBY - MODERN CARDS
   ======================================== */

/* Lobby User Header */
.lobby-user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #0BA927 0%, #099222 100%);
  color: white;
  padding: 15px 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(11, 169, 39, 0.25);
}

.lobby-user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  justify-content: space-between;
}

.lobby-user-header .user-name {
  font-size: 1.1em;
  font-weight: 600;
}

.lobby-user-header .logout-link {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease;
}

.lobby-user-header .logout-link:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   LOBBY – DARK PREMIUM DESIGN
   ======================================== */

.bracket-lobby-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #e2e8f0;
  z-index: 1;
  min-height: 100vh;
}

/* Full-page background image + dark overlay */
.bracket-lobby-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('/wp-content/uploads/2026/01/tippvilag_background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}

.bracket-lobby-container::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.82) 0%, rgba(10, 10, 20, 0.88) 100%);
  z-index: -1;
}

/* ── User Header (same as tippjatek-user-header) ── */
.lobby-user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 34, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 24px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.lobby-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lobby-user-info .user-name {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 1.05em;
}

.lobby-user-info .logout-link {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  padding: 8px 18px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.lobby-user-info .logout-link:hover {
  background: rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
  color: white;
}

/* ── Section Headers (gradient bar, same as tippjatek-active-matches h2) ── */
.lobby-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
  border: 1px solid rgba(139, 92, 246, 0.2);
  padding: 16px 24px;
  border-radius: 16px;
  margin-bottom: 25px;
}

.lobby-section-header h2 {
  margin: 0;
  padding: 0;
  border: none;
  color: white !important;
  -webkit-text-fill-color: white;
  font-size: 1.2em;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lobby-section-header-btn {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 600;
  font-size: 0.85em;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.lobby-section-header-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
  color: white !important;
}

/* Tippjáték section uses green header */
.lobby-section-tippjatek .lobby-section-header {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.lobby-section h2 {
  font-size: 1.6em;
  font-weight: 700;
  color: #e2e8f0 !important;
  -webkit-text-fill-color: #e2e8f0;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  letter-spacing: -0.02em;
}

.lobby-section-tippjatek h2 {
  color: white !important;
  -webkit-text-fill-color: white;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.lobby-section {
  margin-bottom: 36px;
}

.bracket-lobby-container p {
  color: #94a3b8;
  font-size: 0.95em;
}

/* ── Grid ── */
.lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── Lobby Cards (dark glass, like tippelés tournament-card) ── */
.lobby-item {
  background: rgba(30, 34, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(139, 92, 246, 0.4);
  padding: 0;
  position: relative;
}

/* Purple→blue accent line (bracket default) */
.lobby-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6);
  z-index: 1;
}

.lobby-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
}

/* Tippjáték cards — green accent */
.lobby-item-tippjatek {
  border-color: rgba(16, 185, 129, 0.4);
}

.lobby-item-tippjatek::before {
  background: linear-gradient(90deg, #10b981, #059669);
}

.lobby-item-tippjatek:hover {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(16, 185, 129, 0.25);
}

/* Locked cards — gray accent */
.lobby-item.locked {
  border-color: rgba(100, 116, 139, 0.3);
}

.lobby-item.locked::before {
  background: linear-gradient(90deg, #475569, #64748b);
}

.lobby-item.locked:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border-color: rgba(100, 116, 139, 0.4);
}

/* ── Card Header (inline, no color block) ── */
.lobby-header {
  background: none;
  color: #e2e8f0;
  padding: 24px 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.lobby-item.locked .lobby-header {
  background: none;
}

.lobby-item-tippjatek .lobby-header {
  background: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lobby-header h3 {
  margin: 0;
  font-size: 1.15em;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* ── Content Area ── */
.lobby-content {
  padding: 16px 24px 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Status Badge ── */
.status-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Bracket badges — purple */
.status-open {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.status-locked {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Tippjáték badges — no background, just subtle text */
.status-tippjatek {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Tipp Standing ── */
.lobby-tipp-standing {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lobby-tipp-standing .standing-rank,
.lobby-tipp-standing .standing-points {
  color: #a78bfa;
  font-weight: 600;
  font-size: 14px;
}

/* ── Buttons (uniform purple gradient) ── */
.lobby-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff !important;
  padding: 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
  margin-top: auto;
}

.lobby-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45);
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff !important;
}

/* Tippjáték button — green to distinguish from bracket */
.lobby-btn-tippjatek {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.lobby-btn-tippjatek:hover {
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

/* ── Archive Page Header ── */
.archive-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  margin-bottom: 30px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.archive-page-header h2 {
  margin: 0;
  padding: 0;
  border: none;
  color: white !important;
  -webkit-text-fill-color: white;
}

.archive-back-btn {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.archive-back-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

/* ── Archive Link ── */
.lobby-archive-link {
  display: inline-block;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa !important;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.lobby-archive-link:hover {
  background: rgba(139, 92, 246, 0.3);
  color: #c4b5fd !important;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.2);
}

.lobby-section.secondary .lobby-item {
  opacity: 0.75;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .bracket {
    gap: 60px;
    padding: 40px 20px;
  }

  #bracket-infobar {
    flex-direction: column;
    gap: 12px;
  }

  .dash-segment {
    width: 100%;
  }

  .dash-title {
    font-size: 22px;
  }

  .round::before {
    font-size: 11px;
  }
}

@media print {
  body {
    background: white;
  }

  .bracket {
    overflow: visible;
    box-shadow: none;
  }

  .dash-top-bar,
  .lobby-btn,
  #bracket-leaderboard {
    display: none;
  }
}

/* ========================================
   BACK TO LOBBY BUTTON
   ======================================== */

.dash-top-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  /* Changed from flex-end */
  align-items: center;
  padding: 0 20px;
  margin-bottom: 10px;
}

.back-to-lobby-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-radius: 50px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.back-to-lobby-btn:hover {
  background: rgba(139, 92, 246, 0.3);
  color: white;
  transform: translateX(-4px);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.3);
}

/* ========================================
   RESPONSIVE - Better mobile handling
   ======================================== */

@media (max-width: 768px) {
  .bracket {
    gap: 60px;
    padding: 40px 20px;
    margin: 20px 10px;
    /* 🆕 Kisebb margin mobilon */
  }

  #bracket-infobar {
    flex-direction: column;
    gap: 12px;
  }

  .dash-segment {
    width: 100%;
  }

  .dash-title {
    font-size: 22px;
  }

  .round::before {
    font-size: 11px;
  }
}

/* ========================================
   RESPONSIVE - Lobby mobile handling
   ======================================== */

@media (max-width: 600px) {
  .bracket-lobby-container {
    padding: 0 12px 30px;
  }

  /* User header */
  .lobby-user-header {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
  }

  .lobby-user-info {
    gap: 8px;
  }

  .lobby-user-info .user-name {
    font-size: 0.95em;
  }

  .lobby-user-info .logout-link {
    padding: 6px 14px;
    font-size: 0.8em;
  }

  /* Section headers — stack vertically */
  .lobby-section-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
  }

  .lobby-section-header h2 {
    font-size: 1em;
  }

  .lobby-section-header-btn {
    align-self: stretch;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.82em;
  }

  /* Grid — single column on mobile */
  .lobby-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Cards — less padding */
  .lobby-item {
    border-radius: 14px;
  }

  .lobby-header {
    padding: 18px 18px 0;
  }

  .lobby-header h3 {
    font-size: 1.05em;
  }

  .lobby-content {
    padding: 14px 18px 18px;
  }

  .lobby-btn {
    padding: 12px;
    font-size: 14px;
    border-radius: 10px;
  }

  /* Sections */
  .lobby-section {
    margin-bottom: 24px;
  }

  /* Archive page header */
  .archive-page-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 18px;
  }

  /* Leaderboard */
  #bracket-leaderboard {
    margin: 30px 8px;
    padding: 20px 16px;
    border-radius: 16px;
  }

  #bracket-leaderboard h3 {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 14px;
  }

  .leaderboard-row {
    padding: 12px 14px;
  }

  .leaderboard-name {
    font-size: 13px;
  }

  .leaderboard-score {
    font-size: 13px;
  }
}

/* Hozzáadandó stílusok a meglévő style.css fájlhoz */

/* Archív link a lobby oldalon */
.lobby-archive-link {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  color: white !important;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.lobby-archive-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.5);
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

/* Vissza link az archív oldalon */
.lobby-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa !important;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.lobby-back-link:hover {
  background: rgba(139, 92, 246, 0.3);
  color: white !important;
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateX(-4px);
}

/* TIPPJÁTÉK LOBBY SECTION — styles consolidated above in main lobby section */

/* Divider between sections */
.lobby-divider {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 35px 0;
  color: #64748b;
}

.lobby-divider::before,
.lobby-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
}

.lobby-divider span {
  font-size: 18px;
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}