@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700;800;900&family=Share+Tech+Mono&display=swap');

:root {
  /* Lumora Studios High-End Design System Tokens */
  --brand-dark: #1b261e;
  --brand-slate: #2b3a30;
  --brand-steel: #485c50;
  --brand-muted: #8fa194;
  --brand-mist: #c2d4c8;
  --brand-ice: #e4f5ea;

  /* Lumora Electric Lime & Neon Volt Accents */
  --neon-lime: #c0ff72;
  --neon-lime-hover: #d2ff8f;
  --neon-lime-glow: transparent;
  --electric-lime: #a6ff38;
  --accent-gradient: linear-gradient(135deg, #c0ff72 0%, #a6ff38 60%, #76e60b 100%);
  --accent-gradient-hover: linear-gradient(135deg, #d2ff8f 0%, #b8ff52 60%, #8bf024 100%);

  /* Primary color mapping to Lumora Electric Lime (#c0ff72) */
  --primary-color: #c0ff72;
  --primary-hover: #d2ff8f;
  --primary-dark: #9ee830;
  --primary-glow: transparent;
  --primary-border: rgba(192, 255, 114, 0.5);
  --primary-text: #080d04;

  /* Legacy tokens mapped directly to Lumora Lime */
  --neon-cyan: #c0ff72;
  --neon-cyan-hover: #d2ff8f;
  --neon-cyan-glow: transparent;
  --electric-blue: #a6ff38;

  /* Deep Broadcast Canvas Backgrounds */
  --bg-main: #0b0f17;
  --bg-surface: #111822;
  --bg-card: rgba(17, 24, 34, 0.85);
  --bg-card-border: rgba(202, 220, 230, 0.14);

  --row-bg: #111822;
  --row-border: rgba(74, 93, 107, 0.3);
  --table-bg: #0b0f17;

  --text-white: #ffffff;
  --text-dim: #9da6ad;
  --text-ice: #cadce6;

  /* Typography */
  --font-brand: 'Outfit', sans-serif;
  --font-main: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --font-gotham: var(--font-brand);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  background-color: var(--bg-main);
  background-image: radial-gradient(ellipse 60% 400px at 85% 15%, rgba(46, 62, 77, 0.22), transparent 70%);
  background-attachment: fixed;
  color: var(--text-white);
  font-family: var(--font-main);
  min-height: 100vh;
  padding: 24px 16px 80px;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  font-weight: 500;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ========================================================== */
/* LUMORA STUDIOS FLOATING CAPSULE NAVBAR                     */
/* ========================================================== */
.lumora-navbar {
  position: sticky;
  top: 16px;
  z-index: 1000;
  margin: 0 auto 36px auto;
  max-width: 1220px;
  width: calc(100% - 24px);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 24px;
  background: rgba(17, 24, 34, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(202, 220, 230, 0.16);
  border-radius: 9999px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lumora-navbar:hover {
  border-color: rgba(192, 255, 114, 0.25);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.75);
}

.lumora-nav-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.lumora-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  user-select: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.lumora-brand:hover {
  transform: scale(1.03);
}

.lumora-brand-logo {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
  filter: none;
  transition: filter 0.25s ease;
}

.lumora-brand:hover .lumora-brand-logo {
  filter: none;
}

.brand-text-lumora {
  color: #ffffff;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
}

.brand-text-studios {
  color: var(--brand-ice);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.brand-dot {
  color: var(--neon-cyan);
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 0;
  margin-left: -2px;
  text-shadow: none;
}

/* Center Navigation Links - Clean, Elegant Lumora Typography */
.lumora-nav-menu {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lumora-nav-item {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 8px 12px;
  font-family: var(--font-brand);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.22s ease;
  outline: none;
  white-space: nowrap;
}

.lumora-nav-item:hover {
  color: #ffffff;
  background: rgba(202, 220, 230, 0.06);
  text-shadow: none;
}

.lumora-nav-item.active {
  color: var(--neon-cyan);
  text-shadow: none;
}

/* Right Navigation Section */
.lumora-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Admin Capsule Pill */
.lumora-admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 14px;
  border-radius: 9999px;
  background: rgba(46, 62, 77, 0.35);
  border: 1px solid rgba(202, 220, 230, 0.22);
  font-family: var(--font-brand);
  font-size: 0.78rem;
  color: var(--brand-ice);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.admin-live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00E676;
  box-shadow: none;
  animation: pulseLiveDot 2s infinite;
}

.admin-label {
  font-weight: 800;
  color: var(--brand-muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.admin-name {
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.admin-logout-btn {
  background: rgba(255, 51, 102, 0.15);
  border: 1px solid rgba(255, 51, 102, 0.3);
  color: #ff3366;
  cursor: pointer;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 4px;
  transition: all 0.2s ease;
}

.admin-logout-btn:hover {
  background: #ff3366;
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: none;
}

/* Mobile Toggle Hamburger */
.lumora-mobile-toggle {
  display: none;
  background: rgba(46, 62, 77, 0.35);
  border: 1px solid rgba(202, 220, 230, 0.2);
  color: var(--brand-ice);
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.lumora-mobile-toggle:hover {
  background: rgba(192, 255, 114, 0.15);
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

/* Mobile Dropdown Drawer */

.mobile-user-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(46, 62, 77, 0.4);
  border: 1px solid rgba(202, 220, 230, 0.2);
  border-radius: 10px;
  margin-bottom: 6px;
  font-family: var(--font-brand);
  font-size: 0.8rem;
  color: var(--brand-ice);
}

.mobile-user-label {
  font-weight: 800;
  color: var(--neon-cyan);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.mobile-user-name {
  font-weight: 800;
  color: #ffffff;
}

.lumora-mobile-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  background: rgba(17, 24, 34, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(202, 220, 230, 0.18);
  border-radius: 20px;
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  animation: dropdownFadeIn 0.22s ease-out;
}

.lumora-mobile-menu.open {
  display: flex !important;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  font-family: var(--font-brand);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-ice);
  background: transparent;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover {
  background: rgba(192, 255, 114, 0.1);
  color: var(--neon-cyan);
  transform: translateX(4px);
}

.container {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
}

/* Header & Brand Title - Left Aligned Navigation Bar */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
  width: 100%;
}

.brand-header-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 4px;
}

.app-title {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  line-height: 1.15;
  text-shadow: none;
  text-align: left;
}

.brand-title-main {
  font-family: var(--font-brand);
  font-size: 2.35rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-transform: uppercase;
  margin: 0;
}

.brand-title-main .title-glow {
  color: var(--primary-color);
}

.brand-title-sub {
  font-family: var(--font-brand);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-ice);
  text-transform: uppercase;
  opacity: 0.88;
}

.title-badge-container {
  display: flex;
  justify-content: flex-start;
  margin-top: 2px;
}

.title-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(192, 255, 114, 0.09);
  border: 1px solid rgba(192, 255, 114, 0.32);
  color: var(--neon-cyan);
  font-family: var(--font-brand);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 9999px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  box-shadow: none;
}

.title-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: none;
  animation: pulseLiveDot 2s infinite;
}

/* App Footer - Moved to bottom of UI */
.app-footer {
  text-align: center;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #141824;
}

.app-copyright {
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Control Panel */
.control-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.control-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--primary-color);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mode-info {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 700;
}

.input-group {
  margin-bottom: 16px;
}

.input-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  color: #e0e6f0;
  margin-bottom: 6px;
}

.match-textarea {
  width: 100%;
  background: #080a0f;
  border: 1.5px solid #232838;
  border-radius: 8px;
  padding: 12px 14px;
  color: #ffffff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  resize: vertical;
  min-height: 70px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.match-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: none;
}

/* Individual Match Slots Grid */
.slots-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  padding: 0;
  background: transparent;
  border: none;
}

.slot-item {
  display: flex;
  align-items: center;
  background: #12151f;
  border: 1.5px solid #232838;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.slot-item:focus-within {
  border-color: var(--primary-color);
  box-shadow: none;
}

.slot-label {
  background: rgba(24, 35, 46, 0.75);
  color: var(--neon-cyan);
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  white-space: nowrap;
  border-right: 1.5px solid rgba(74, 93, 107, 0.4);
  user-select: none;
  min-width: 92px;
  flex-shrink: 0;
  text-align: center;
  box-sizing: border-box;
}

.slot-input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 9px 12px;
  color: #fff;
  font-family: 'Share Tech Mono', monospace, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.slot-input::placeholder {
  color: #4f5872;
  font-family: var(--font-gotham);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: normal;
}

.slot-input:focus {
  outline: none;
  background: rgba(192, 255, 114, 0.08);
}

.slots-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 2px 2px;
  gap: 12px;
}

.btn-add-match {
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px dashed #3b4664;
  color: var(--primary-color);
  background: rgba(192, 255, 114, 0.05);
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-add-match:hover:not(:disabled) {
  background: rgba(192, 255, 114, 0.15);
  border-color: var(--primary-color);
  border-style: solid;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-add-match:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: #262e42;
  color: #717d96;
}

.slots-counter-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* Buttons - Humanised & Balanced Hierarchy */
.actions-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.btn-action-calc {
  width: 100%;
  justify-content: center;
  padding: 10px 18px;
  font-size: 0.92rem;
}

.secondary-actions-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.secondary-actions-row .btn {
  flex: 1;
  justify-content: center;
  font-size: 0.85rem;
  padding: 8px 12px;
}

.btn {
  font-family: var(--font-gotham);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: none; /* Modern natural casing instead of aggressive full caps */
  letter-spacing: 0.3px;
  padding: 8px 18px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
  line-height: 1.25;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--primary-text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #141824;
  color: #e2e8f5;
  border: 1px solid #262e42;
}

.btn-secondary:hover {
  background: #1e2436;
  border-color: #3b4664;
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: #8b93a7;
  border: 1px solid #232a3c;
}

.btn-outline:hover {
  color: #ffffff;
  border-color: var(--primary-color);
  background: rgba(192, 255, 114, 0.08);
}

/* Theme Editor Button */
.btn-theme-trigger {
  background: #141824;
  border: 1px solid #262e42;
  color: #8da4d8;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 7px;
}

.btn-theme-trigger:hover {
  background: #1e2436;
  border-color: #3b4664;
  color: #ffffff;
}

/* ========================================================== */
/* THEME CUSTOMIZER DRAWER / MODAL */
/* ========================================================== */
.theme-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.theme-modal-backdrop.open {
  display: flex;
}

.theme-modal {
  background: #0f121a;
  border: 2px solid var(--primary-color);
  border-radius: 16px;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  padding: 26px;
}

.theme-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #232838;
}

.theme-modal-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-close-btn {
  background: transparent;
  border: none;
  color: #8b93a7;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.theme-close-btn:hover {
  color: #fff;
}

.theme-section {
  margin-bottom: 22px;
}

.theme-section-title {
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Presentation Layout Selector Bar */
.layout-selector-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(10, 15, 23, 0.7);
  border: 1.5px solid rgba(74, 93, 107, 0.35);
  border-radius: 12px;
  padding: 5px;
  box-sizing: border-box;
  width: 100%;
}

.layout-toggle-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 9px;
  padding: 10px 14px;
  color: var(--brand-mist, #c3ccd1);
  font-family: var(--font-brand, 'Outfit', sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-align: center;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-sizing: border-box;
}

.layout-toggle-btn:hover:not(.active) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.layout-toggle-btn.active {
  background: linear-gradient(135deg, rgba(192, 255, 114, 0.16) 0%, rgba(166, 255, 56, 0.22) 100%);
  border-color: var(--neon-cyan);
  color: #ffffff;
  font-weight: 800;
  box-shadow: none;
}

.layout-toggle-btn:active {
  transform: scale(0.98);
}

@media (max-width: 480px) {
  .layout-toggle-btn {
    font-size: 0.82rem;
    padding: 9px 8px;
  }
}


.color-picker-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.custom-color-input {
  width: 48px;
  height: 40px;
  border: 2px solid #2b3147;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 2px;
}

.color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-chip {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
}

.color-chip:hover {
  transform: scale(1.15);
  border-color: #ffffff;
}

/* Overlay Background Options */
.bg-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

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

.bg-option-card {
  background: #141824;
  border: 1.5px solid #232838;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
  transition: all 0.2s;
}

.bg-option-card:hover {
  border-color: #3b4461;
}

.bg-option-card.selected {
  border-color: var(--primary-color);
  background: rgba(192, 255, 114, 0.12);
  color: #fff;
  box-shadow: none;
}

.file-import-box {
  background: #0b0d14;
  border: 2px dashed #2b3247;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  margin-top: 10px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.file-import-box:hover {
  border-color: var(--primary-color);
}

.file-import-preview {
  max-width: 100%;
  max-height: 120px;
  border-radius: 6px;
  margin-top: 10px;
  display: none;
  object-fit: cover;
  border: 1px solid #30374f;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 14px;
  font-size: 0.95rem;
  font-weight: 800;
  display: none;
}

.alert-error {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid #dc3545;
  color: #ff6b7b;
}

.alert-info {
  background: rgba(192, 255, 114, 0.15);
  border: 1px solid #c0ff72;
  color: #79aeff;
}

/* Tabs & Export Bar */
.results-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.tabs-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

.tab-btn {
  background: #141722;
  border: 1px solid #262c3e;
  color: #a5adc4;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font-gotham);
  font-weight: 900;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  border-color: var(--primary-color);
  color: #fff;
}

.tab-btn.active {
  background: var(--primary-color);
  color: var(--primary-text);
  border-color: var(--primary-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.export-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Layout Mode Selector (Two-Sided vs One-Sided) */
.layout-toggle-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.layout-toggle-label {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}

.layout-segmented-control {
  display: flex;
  background: #0d1017;
  border: 1.5px solid #232838;
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
}

.btn-layout-toggle {
  background: transparent;
  border: none;
  color: #8b93a7;
  font-family: var(--font-gotham);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-layout-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-layout-toggle.active {
  background: var(--primary-color);
  color: var(--primary-text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  font-weight: 900;
}

/* Presentation Views */
.presentation-view {
  width: 100%;
}

.view-one-sided .single-table-column {
  max-width: 900px;
  margin: 0 auto;
}

/* ========================================================== */
/* POINTS TABLE BOARD - EXACT LAYOUT REPLICA */
/* ========================================================== */
.points-board-outer {
  background: linear-gradient(145deg, rgba(24, 35, 46, 0.65) 0%, rgba(13, 19, 28, 0.9) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.board-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

@media (max-width: 980px) {
  .lumora-nav-menu {
    display: none !important;
  }
  .lumora-mobile-toggle {
    display: inline-flex !important;
  }
}

@media (max-width: 1024px) {
  .board-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.table-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Header Bar */
.table-header {
  background: var(--header-bg, var(--primary-color));
  color: var(--header-text, var(--primary-text));
  border-radius: 12px;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 46px 1fr 58px 104px 90px 96px;
  align-items: center;
  font-family: var(--font-gotham);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.col-rank {
  text-align: center;
}

.col-team {
  text-align: left;
  padding-left: 14px;
}

.booyah-header-icon {
  height: 24px;
  width: auto;
  max-width: 36px;
  object-fit: contain;
  vertical-align: middle;
  filter: none;
}

.col-booyah, .col-rankpts, .col-killpts, .col-total {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  white-space: normal;
}

/* Row Cards */
.table-row {
  background: var(--row-bg);
  border: 1.5px solid var(--row-border);
  border-radius: 12px;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 46px 1fr 58px 104px 90px 96px;
  align-items: center;
  min-height: 64px;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.table-row:hover {
  border-color: var(--primary-dark);
  transform: scale(1.005);
}

/* Rank Badge */
.rank-badge {
  background: var(--badge-bg, var(--primary-color));
  color: var(--badge-text, var(--primary-text));
  font-family: var(--font-gotham);
  font-weight: 900;
  font-size: 1.45rem;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* Team Name */
.team-name-cell {
  font-family: var(--font-gotham);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: var(--text-white, #ffffff);
  text-transform: uppercase;
  padding-left: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Booyah, Rank Pts, Kill Pts */
.stat-cell {
  font-family: 'Share Tech Mono', var(--font-gotham), monospace;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-white, #ffffff);
  text-align: center;
}

/* Total Points Badge */
.total-badge {
  background: var(--badge-bg, var(--primary-color));
  color: var(--badge-text, var(--primary-text));
  font-family: var(--font-gotham);
  font-weight: 900;
  font-size: 1.35rem;
  padding: 6px 14px;
  border-radius: 8px;
  text-align: center;
  min-width: 64px;
  margin: 0 auto;
}

/* Loading Indicator */
.loading-indicator {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--primary-color);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(192, 255, 114, 0.25);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================================== */
/* LUMORA STUDIOS AUTHENTICATION GATEWAY                       */
/* ========================================================== */
body.auth-locked {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
  position: fixed !important;
  width: 100% !important;
  touch-action: none;
}

body.auth-locked .container,
body.auth-locked .lumora-navbar {
  display: none !important;
  visibility: hidden !important;
}

.auth-gateway-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: rgba(8, 11, 16, 0.95) !important;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  box-sizing: border-box;
}

.auth-gateway-overlay.unlocked,
body:not(.auth-locked) .auth-gateway-overlay {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.auth-gateway-card {
  background: linear-gradient(155deg, rgba(24, 35, 46, 0.92) 0%, rgba(13, 19, 28, 0.97) 100%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(192, 255, 114, 0.28);
  border-radius: 26px;
  padding: 38px 32px 30px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  animation: cardFadeIn 0.35s ease-out;
  box-sizing: border-box;
}

@keyframes cardFadeIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.auth-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  position: relative;
}

.auth-logo-img {
  height: 52px;
  width: auto;
  max-width: 230px;
  object-fit: contain;
  filter: none;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.auth-logo-wrapper:hover .auth-logo-img {
  transform: scale(1.03);
  filter: none;
}

.auth-kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(192, 255, 114, 0.08);
  border: 1px solid rgba(192, 255, 114, 0.28);
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.auth-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: none;
  animation: pulseLiveDot 2s infinite;
}

.auth-kicker-text {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--neon-cyan);
  text-transform: uppercase;
}

.auth-title {
  font-family: var(--font-brand);
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-transform: uppercase;
  margin: 0 0 4px 0;
}

.auth-title .title-glow {
  color: var(--primary-color);
}

.auth-byline {
  font-family: var(--font-brand);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand-ice);
  text-transform: uppercase;
  margin-bottom: 22px;
  opacity: 0.85;
}

.auth-field-group {
  margin-bottom: 16px;
  text-align: left;
}

.auth-field-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-brand);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-ice);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.auth-input-wrapper {
  position: relative;
  width: 100%;
}

.auth-key-input {
  width: 100%;
  background: rgba(10, 15, 23, 0.9);
  border: 1.5px solid rgba(74, 93, 107, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  color: #ffffff;
  font-family: var(--font-brand);
  font-size: 0.94rem;
  font-weight: 600;
  box-sizing: border-box;
  transition: all 0.22s ease;
}

.auth-key-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: none;
  background: rgba(7, 10, 16, 0.98);
}

.auth-input-wrapper .auth-key-input {
  padding-right: 44px;
}

.btn-toggle-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--brand-steel);
  cursor: pointer;
  padding: 4px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.btn-toggle-eye:hover {
  color: var(--neon-cyan);
}

.auth-error-alert {
  background: rgba(255, 51, 102, 0.12);
  border: 1px solid rgba(255, 51, 102, 0.4);
  color: #ff6b8b;
  font-family: var(--font-brand);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.auth-submit-btn {
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  background: var(--accent-gradient);
  color: #070d14 !important;
  font-family: var(--font-brand);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.22s ease;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-submit-btn:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  color: #000000 !important;
}

.auth-footer-tag {
  margin-top: 22px;
  font-family: var(--font-brand);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-muted);
  letter-spacing: 0.04em;
  opacity: 0.75;
}

/* User Profile Pill & Dropdown Menu */
.header-user-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

.user-profile-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(19, 25, 41, 0.95), rgba(12, 16, 28, 0.95));
  border: 1.5px solid #2e3b56;
  padding: 4px 6px 4px 12px;
  border-radius: 24px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #8fa0c2;
  cursor: pointer;
  user-select: none;
  backdrop-filter: blur(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.user-profile-badge:hover {
  border-color: #3b82f6;
  background: linear-gradient(135deg, rgba(26, 35, 58, 0.98), rgba(16, 22, 38, 0.98));
  box-shadow: none;
}

.user-badge-main {
  display: flex;
  align-items: center;
  gap: 7px;
}

.user-status-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: none;
}

.user-avatar-icon {
  color: #60a5fa;
  flex-shrink: 0;
}

.user-role-label {
  color: #7284a6;
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-name-text {
  color: #f1f5f9;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.btn-user-menu-toggle {
  background: #1e2638;
  border: 1px solid #364462;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 13px;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-user-menu-toggle:hover,
.user-profile-badge:hover .btn-user-menu-toggle {
  background: var(--primary-color, #2563eb);
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: none;
}

.btn-user-menu-toggle .dropdown-caret-icon {
  transition: transform 0.2s ease;
}

.user-profile-badge:has(.user-dropdown-menu.show) .dropdown-caret-icon {
  transform: rotate(180deg);
}

.user-profile-badge:has(.user-dropdown-menu.show) .btn-user-menu-toggle {
  background: var(--primary-color, #2563eb);
  border-color: #3b82f6;
  color: #ffffff;
}

/* Floating Dropdown Menu */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: #0f131e;
  border: 1.5px solid #28334a;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  animation: dropdownFadeIn 0.15s ease forwards;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown-menu.show {
  display: flex;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: #c4d1eb;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-dropdown-item svg {
  color: #7b8ea8;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.user-dropdown-item:hover {
  background: rgba(192, 255, 114, 0.14);
  color: #ffffff;
}

.user-dropdown-item:hover svg {
  color: var(--primary-color);
}

.user-dropdown-divider {
  height: 1px;
  background: #232c3f;
  margin: 4px 6px;
}

.user-dropdown-logout {
  color: #ff6b6b;
}

.user-dropdown-logout svg {
  color: #ff6b6b;
}

.user-dropdown-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ff8787;
}

.user-dropdown-logout:hover svg {
  color: #ff8787;
}

/* ========================================================== */
/* RESPONSIVE DESIGN - PHONES, TABLETS & ALL SCREEN SIZES    */
/* ========================================================== */

/* Responsive Column Header Labels */
.short-label {
  display: none;
}
.full-label {
  display: inline;
}

/* Tablets and Medium Screens (<= 1024px) */
@media (max-width: 1024px) {
  .board-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .points-board-outer {
    padding: 18px 14px;
    border-radius: 16px;
  }
  .table-header, .table-row {
    grid-template-columns: 42px 1fr 54px 96px 84px 90px;
    padding: 10px 14px;
  }
}

/* Tablets and Large Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  body {
    padding: 14px 10px 40px;
  }

  .lumora-navbar {
    height: 54px;
    margin: 0 auto 18px auto;
    width: 100%;
    padding: 0 10px 0 14px;
    box-sizing: border-box;
  }

  .lumora-brand-logo {
    height: 26px;
    max-width: 115px;
  }

  .lumora-nav-right {
    gap: 8px;
    flex-shrink: 0;
  }

  .lumora-admin-pill {
    padding: 3px 8px;
    font-size: 0.72rem;
    gap: 5px;
    max-width: 130px;
  }

  .lumora-admin-pill .admin-label {
    display: none; /* Hide 'CONNECTED:' text on mobile to ensure hamburger button always fits */
  }

  .admin-name {
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
  }

  .admin-logout-btn {
    width: 20px;
    height: 20px;
    margin-left: 2px;
  }

  .lumora-mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 50%;
    background: rgba(192, 255, 114, 0.12);
    border: 1px solid rgba(192, 255, 114, 0.4);
    color: var(--neon-cyan);
    flex-shrink: 0;
    cursor: pointer;
  }

  .app-header {
    margin-bottom: 20px;
    gap: 12px;
  }

  .brand-title-main {
    font-size: 1.65rem;
  }

  .brand-title-sub {
    font-size: 0.88rem;
  }

  .title-badge {
    font-size: 0.70rem;
    padding: 2px 10px;
  }

  .user-profile-badge {
    font-size: 0.72rem;
    padding: 4px 8px;
    gap: 6px;
  }

  .user-role-label {
    display: none;
  }

  .control-card {
    padding: 16px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
  }

  .control-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .control-title > div {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .actions-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .btn-action-calc {
    width: 100%;
    justify-content: center;
  }

  .secondary-actions-row {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .secondary-actions-row .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.88rem;
    padding: 9px 12px;
  }

  /* Smooth horizontal scrollable tabs bar for matches */
  .results-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .layout-toggle-group {
    width: 100%;
    justify-content: space-between;
  }

  .layout-segmented-control {
    flex: 1;
  }

  .btn-layout-toggle {
    flex: 1;
    justify-content: center;
    font-size: 0.82rem;
    padding: 7px 10px;
  }

  .view-one-sided .single-table-column {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .tabs-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: thin;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .tab-btn {
    flex-shrink: 0;
    padding: 7px 14px;
    font-size: 0.88rem;
  }

  .export-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .export-actions .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.85rem;
    padding: 10px 10px;
  }

  .points-board-outer {
    padding: 12px 8px;
    border-radius: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .presentation-view,
  .view-two-sided,
  .view-one-sided {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .table-header {
    font-size: 0.74rem;
    padding: 8px 8px;
    grid-template-columns: 34px 1fr 42px 74px 66px 72px;
    letter-spacing: 0.2px;
  }

  .table-row {
    padding: 8px 8px;
    min-height: 52px;
    grid-template-columns: 34px 1fr 42px 74px 66px 72px;
  }

  .rank-badge {
    width: 32px;
    height: 32px;
    font-size: 1.15rem;
  }

  .team-name-cell {
    font-size: 0.95rem;
    padding-left: 8px;
  }

  .stat-cell {
    font-size: 1.05rem;
  }

  .total-badge {
    font-size: 1.1rem;
    padding: 4px 10px;
    min-width: 52px;
  }
}

/* Mobile Phones (<= 480px) */
@media (max-width: 480px) {
  body {
    padding: 10px 6px 30px;
  }

  .lumora-navbar {
    height: 52px;
    margin: 0 auto 14px auto;
    width: 100%;
    padding: 0 8px 0 12px;
    box-sizing: border-box;
  }

  .lumora-brand-logo {
    height: 23px;
    max-width: 100px;
  }

  .lumora-nav-right {
    gap: 6px;
  }

  .lumora-admin-pill {
    padding: 2px 6px;
    max-width: 105px;
  }

  .admin-name {
    max-width: 55px;
  }

  .lumora-mobile-toggle {
    display: inline-flex !important;
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .app-header {
    margin-bottom: 16px;
    gap: 8px;
  }

  .brand-header-block {
    align-items: flex-start;
    text-align: left;
  }

  .app-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
  }

  .brand-title-main {
    font-size: 1.35rem;
    letter-spacing: -0.02em;
  }

  .brand-title-sub {
    font-size: 0.76rem;
    letter-spacing: 0.4px;
  }

  .title-badge-container {
    justify-content: flex-start;
  }

  .title-badge {
    font-size: 0.66rem;
    padding: 2px 8px;
  }

  .user-profile-badge {
    font-size: 0.68rem;
    padding: 3px 6px;
    gap: 4px;
  }

  .user-role-label {
    display: none;
  }

  .user-dropdown-menu {
    min-width: 180px;
  }

  .app-footer {
    margin-top: 24px;
    padding-top: 14px;
  }

  .app-copyright {
    font-size: 0.72rem;
  }

  .actions-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .btn-action-calc {
    width: 100%;
    justify-content: center;
  }

  .secondary-actions-row {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .secondary-actions-row .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.82rem;
    padding: 8px 8px;
  }

  .slots-container {
    grid-template-columns: 1fr;
  }

  .slots-footer-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .btn-add-match {
    width: 100%;
    justify-content: center;
    padding: 9px 12px;
  }

  .slots-counter-note {
    text-align: center;
  }

  .layout-toggle-label {
    font-size: 0.75rem;
  }

  .btn-layout-toggle {
    font-size: 0.76rem;
    padding: 6px 8px;
    gap: 4px;
  }

  /* Switch table column labels to compact abbreviations on phones */
  .short-label {
    display: inline;
  }
  .full-label {
    display: none;
  }

  .points-board-outer {
    padding: 6px 4px;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65);
  }

  .table-header {
    font-size: 0.65rem;
    padding: 6px 4px;
    grid-template-columns: 26px 1fr 30px 44px 44px 48px;
    letter-spacing: 0;
  }

  .table-row {
    padding: 6px 4px;
    min-height: 44px;
    grid-template-columns: 26px 1fr 30px 44px 44px 48px;
  }

  .booyah-header-icon {
    height: 18px;
    max-width: 24px;
  }

  .col-team {
    padding-left: 6px;
  }

  .rank-badge {
    width: 24px;
    height: 24px;
    font-size: 0.88rem;
    border-radius: 5px;
  }

  .team-name-cell {
    font-size: 0.82rem;
    padding-left: 6px;
    letter-spacing: 0;
  }

  .stat-cell {
    font-size: 0.88rem;
  }

  .total-badge {
    font-size: 0.9rem;
    padding: 3px 5px;
    min-width: 42px;
    border-radius: 5px;
  }

  /* Compact Auth Gateway Dialog on Mobile */
  .auth-gateway-overlay {
    padding: 12px;
  }

  .auth-gateway-card {
    padding: 24px 16px 20px;
    border-radius: 14px;
    max-width: 100%;
  }

  .auth-icon-badge {
    width: 46px;
    height: 46px;
    font-size: 20px;
    margin-bottom: 12px;
  }

  .auth-title {
    font-size: 1.35rem;
    letter-spacing: 1px;
  }

  .auth-subtitle {
    font-size: 0.72rem;
    margin-bottom: 14px;
  }

  .auth-prompt {
    font-size: 0.82rem;
    margin-bottom: 10px;
  }

  .auth-key-input {
    font-size: 0.9rem;
    padding: 10px 36px 10px 10px;
  }

  .auth-submit-btn {
    font-size: 0.92rem;
    padding: 11px;
  }

  /* Compact Theme Modal on Mobile */
  .theme-modal {
    padding: 16px 12px;
    border-radius: 12px;
    max-height: 85vh;
  }

  .theme-modal-title {
    font-size: 1.15rem;
  }
}

/* ========================================================== */
/* FULL-SCREEN DOWNLOAD & THEME CUSTOMIZER WORKSTATION        */
/* ========================================================== */
.png-fullscreen-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0a0c12;
  z-index: 99999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.png-fullscreen-page.open {
  display: flex !important;
}

.png-fullscreen-header {
  height: 64px;
  min-height: 64px;
  background: #0f121a;
  border-bottom: 1px solid #1c2233;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  box-sizing: border-box;
}

.png-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.png-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #191e2b;
  color: #cdd6f4;
  border: 1px solid #283045;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.png-back-btn:hover {
  background: #232b3d;
  color: #ffffff;
  border-color: var(--primary-color);
  transform: translateX(-2px);
}

.png-header-divider {
  width: 1px;
  height: 28px;
  background: #232838;
}

.png-header-title-box {
  display: flex;
  flex-direction: column;
}

.png-page-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.3px;
}

.png-page-subtitle {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.png-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-png-download {
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 9px 20px;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Split Workstation Body */
.png-fullscreen-body {
  flex: 1;
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
}

.png-sidebar-controls {
  width: 440px;
  min-width: 380px;
  max-width: 460px;
  height: 100%;
  background: #11141d;
  border-right: 1px solid #1c2233;
  overflow-y: auto;
  padding: 22px 20px 40px;
  box-sizing: border-box;
}

.png-sidebar-controls::-webkit-scrollbar {
  width: 6px;
}
.png-sidebar-controls::-webkit-scrollbar-thumb {
  background: #262e42;
  border-radius: 4px;
}

/* Right Interactive Preview Stage */
.png-preview-stage {
  flex: 1;
  height: 100%;
  background: #08090d;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px 20px 20px;
  box-sizing: border-box;
}

.png-preview-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #131722;
  border: 1px solid #22293d;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: #cdd6f4;
  margin-bottom: 12px;
  z-index: 5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.preview-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00E676;
  box-shadow: none;
  display: inline-block;
  animation: pulseLiveDot 2s infinite;
}

@keyframes pulseLiveDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.preview-scale-tag {
  background: #202738;
  color: var(--primary-color);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 6px;
}

.png-preview-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.png-preview-scaler {
  transform-origin: center center;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.png-checker-bg {
  background-color: #0d0f15;
  background-image:
    linear-gradient(45deg, #161a24 25%, transparent 25%),
    linear-gradient(-45deg, #161a24 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #161a24 75%),
    linear-gradient(-45deg, transparent 75%, #161a24 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
}

.png-preview-board {
  box-sizing: border-box;
}




/* Responsive Full-Screen Workstation (Tablets & Mobile) */
@media (max-width: 960px) {
  .png-fullscreen-page {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    height: 100vh;
    height: 100dvh;
  }

  .png-fullscreen-header {
    height: auto !important;
    min-height: unset !important;
    padding: 12px 14px 10px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    background: #0f121a !important;
    border-bottom: 1px solid #1c2233 !important;
  }

  .png-header-left {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .png-header-divider {
    display: none !important;
  }

  .png-header-title-box {
    text-align: right !important;
    flex: 1 !important;
  }

  .png-page-title {
    font-size: 0.95rem !important;
    justify-content: flex-end !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .png-page-subtitle {
    display: none !important; /* Hides crowded subtitle on mobile to give ample breathing room */
  }

  .png-header-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .png-back-btn {
    padding: 7px 12px !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .btn-png-download {
    padding: 8px 14px !important;
    font-size: 0.84rem !important;
    flex: 1 !important;
    justify-content: center !important;
  }

  .png-header-right .btn-outline {
    padding: 8px 10px !important;
    font-size: 0.78rem !important;
    flex-shrink: 0 !important;
  }

  /* Body & Preview Stage Layout */
  .png-fullscreen-body {
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
    flex: 1 !important;
  }

  .png-preview-stage {
    height: auto !important;
    min-height: 290px !important;
    padding: 22px 14px 18px !important;
    order: 1 !important;
    overflow: visible !important;
    flex: none !important;
    background: #08090d !important;
  }

  .png-preview-meta-pill {
    margin-bottom: 18px !important;
    padding: 5px 14px !important;
    font-size: 0.75rem !important;
  }

  .png-preview-viewport {
    height: 220px !important;
    min-height: 220px !important;
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .png-sidebar-controls {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    order: 2 !important;
    overflow: visible !important;
    border-right: none !important;
    border-top: 1px solid rgba(202, 220, 230, 0.14) !important;
    padding: 24px 16px 80px !important;
    flex: none !important;
    box-sizing: border-box !important;
  }
}