/* Card Fighter Global Design Tokens & Header Styles */

:root {
  /* Brand Primary Colors */
  --brand: #145CE6;
  --brand-deep: #0E47C0;
  --brand-light: #E8F0FD;
  --brand-soft: #BFDBFE;

  /* Neutral Background & Surface Colors */
  --bg: #F5F7FA;
  --panel: #FFFFFF;
  --panel2: #F8FAFC;
  --line: #E2E8F0;

  /* Typography Colors */
  --txt: #1E293B;
  --muted: #64748B;
  --sub: #475569;

  /* Accent & Semantic Colors */
  --accent: #2563EB;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;

  /* Border Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 18px rgba(20, 92, 230, 0.07);

  /* Layout */
  --header-height: 60px;
  --max-width: 1200px;

  /* Header Light Mode Tokens */
  --header-bg: rgba(255, 255, 255, 0.94);
  --header-border: #E2E8F0;
  --header-txt: #1E293B;
  --header-muted: #64748B;
  --header-hover-bg: #E8F0FD;
  --header-hover-txt: #145CE6;
  --header-active-bg: #E8F0FD;
  --header-active-txt: #145CE6;
  --header-search-bg: #F1F5F9;
  --header-search-border: #E2E8F0;
}

/* Header Dark Mode Variant */
.cf-global-header.cf-header-dark,
[data-theme="dark"] .cf-global-header,
.dark-theme .cf-global-header,
body.prem-theme .cf-global-header {
  --header-bg: rgba(14, 16, 21, 0.92);
  --header-border: rgba(201, 164, 92, 0.25);
  --header-txt: #e8c886;
  --header-muted: #c8b489;
  --header-hover-bg: rgba(42, 34, 19, 0.8);
  --header-hover-txt: #e3b448;
  --header-active-bg: rgba(184, 134, 11, 0.25);
  --header-active-txt: #e3b448;
  --header-search-bg: #191b23;
  --header-search-border: rgba(201, 164, 92, 0.3);
}

body.calc-theme .cf-global-header {
  --header-bg: rgba(9, 27, 24, 0.92);
  --header-border: rgba(22, 168, 150, 0.25);
  --header-txt: #7fe0a5;
  --header-muted: #7ab5ac;
  --header-hover-bg: rgba(14, 41, 38, 0.8);
  --header-hover-txt: #5ee8d0;
  --header-active-bg: rgba(14, 127, 110, 0.25);
  --header-active-txt: #5ee8d0;
  --header-search-bg: #0d2522;
  --header-search-border: rgba(22, 168, 150, 0.3);
}

/* Premium Dark Gold Body Background Theme */
body.prem-theme {
  background-color: #0e1015 !important;
  background-image: radial-gradient(circle at top right, rgba(201, 164, 92, 0.12), transparent 45%),
                    radial-gradient(circle at bottom left, rgba(184, 134, 11, 0.1), transparent 40%) !important;
  color: #f5f3ee !important;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Calculator Dark Emerald Body Background Theme */
body.calc-theme {
  background-color: #071715 !important;
  background-image: radial-gradient(circle at top right, rgba(22, 168, 150, 0.15), transparent 50%),
                    radial-gradient(circle at bottom left, rgba(14, 127, 110, 0.12), transparent 45%) !important;
  color: #e0f7f4 !important;
  transition: background 0.3s ease, color 0.3s ease;
}

body.prem-theme .sec-h2,
body.prem-theme #cards-title {
  color: #e8c886 !important;
}

body.prem-theme .sec-sub {
  color: #9aa0ac !important;
}

body.prem-theme .lnb,
.prem-theme .lnb {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  border-bottom: 2px solid rgba(201, 164, 92, 0.25) !important;
  margin-bottom: 20px !important;
  background: transparent !important;
}

body.prem-theme .lnb-item,
.prem-theme .lnb-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 10px 18px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  white-space: nowrap !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 2.5px solid transparent !important;
  margin-bottom: -2px !important;
  border-radius: 0 !important;
  color: #c8b489 !important;
  transition: color 0.15s ease, border-color 0.15s ease, filter 0.15s ease !important;
}

body.prem-theme .lnb-item::after {
  display: none !important;
}

body.prem-theme .lnb-item:hover,
.prem-theme .lnb-item:hover {
  background: transparent !important;
  color: #e8c886 !important;
}

body.prem-theme .lnb-item.active,
body.prem-theme .lnb-item.lnb-prem.active,
.prem-theme .lnb-item.active,
.prem-theme .lnb-item.lnb-prem.active {
  background: transparent !important;
  color: #e8c886 !important;
  border-bottom: 2.5px solid #e3b448 !important;
  font-weight: 800 !important;
  filter: drop-shadow(0 2px 6px rgba(227, 180, 72, 0.5)) !important;
}

body.prem-theme .count-badge {
  background: #2a2213 !important;
  color: #e8c886 !important;
  border-color: #5c4a1f !important;
}

body.calc-theme .count-badge {
  background: #0d2f2b !important;
  color: #7fe0a5 !important;
  border-color: #165c52 !important;
}

body.prem-theme #section-cards,
body.calc-theme #section-cards {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.prem-theme .cards-layout,
body.calc-theme .cards-layout {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}


/* Premium Detail Page Theme Overrides */
body.prem-theme .hero,
body.prem-theme .sum-card,
body.prem-theme .sec-box,
body.prem-theme .disclaimer {
  background: linear-gradient(180deg, #191b23, #141519) !important;
  border-color: #3a3320 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(232, 200, 134, 0.08) !important;
}

body.prem-theme .hero img {
  background: #0f1014 !important;
  border-color: #3a3320 !important;
}

body.prem-theme .hero .h-name,
body.prem-theme .sum-card .val,
body.prem-theme .sec-box h3,
body.prem-theme .binfo strong,
body.prem-theme .binfo th {
  color: #f5f3ee !important;
}

body.prem-theme .sum-card .lab,
body.prem-theme .hero .h-corp,
body.prem-theme .disclaimer,
body.prem-theme .binfo p,
body.prem-theme .binfo td {
  color: #c8b489 !important;
}

body.prem-theme .sec-box h3 {
  border-bottom-color: #e3b448 !important;
}

body.prem-theme .hero .h-tags span,
body.prem-theme .cat-chip {
  background: #20222c !important;
  border-color: #5c4a1f !important;
  color: #e8c886 !important;
}

body.prem-theme .sum-card .val.accent,
body.prem-theme .disclaimer .d-head,
body.prem-theme .ext-link {
  color: #e8c886 !important;
  border-color: #e3b448 !important;
}

body.prem-theme .kb-tab {
  background: #181a22 !important;
  border-color: #3a3320 !important;
  color: #c8b489 !important;
}

body.prem-theme .kb-tab:hover,
body.prem-theme .ext-link:hover {
  background: #20222c !important;
  border-color: #e3b448 !important;
  color: #e8c886 !important;
}

body.prem-theme .kb-tab.active {
  background: linear-gradient(90deg, #b8860b, #e3b448) !important;
  border-color: #e3b448 !important;
  color: #1a150a !important;
  font-weight: 800 !important;
}

body.prem-theme .compare-hero-btn,
body.prem-theme .back {
  background: linear-gradient(90deg, #b8860b, #e3b448) !important;
  color: #1a150a !important;
  box-shadow: 0 2px 10px rgba(201, 164, 92, 0.3) !important;
}

body.prem-theme .binfo th,
body.prem-theme .binfo .b-table-top {
  background: #20222c !important;
  color: #e8c886 !important;
  border-color: #3a3320 !important;
}

body.prem-theme .binfo td {
  border-color: #2a2d38 !important;
}

/* Premium Detail Page Inline Calculator (.calc-box) Overrides */
body.prem-theme .calc-box {
  background: linear-gradient(180deg, #191b23, #141519) !important;
  border-color: #3a3320 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(232, 200, 134, 0.08) !important;
}

body.prem-theme .calc-box h3 {
  color: #f5f3ee !important;
  border-bottom-color: #e3b448 !important;
}

body.prem-theme .calc-row {
  border-bottom-color: #2a2d38 !important;
}

body.prem-theme .calc-name {
  color: #f5f3ee !important;
}

body.prem-theme .calc-amount {
  color: #e8c886 !important;
}

body.prem-theme .calc-amount.zero {
  color: #8a8f9a !important;
}

body.prem-theme .calc-slider {
  background: #2a2d38 !important;
}

body.prem-theme .calc-toggle input:checked + .calc-slider {
  background: linear-gradient(90deg, #b8860b, #e3b448) !important;
}

body.prem-theme .calc-total {
  background: #20222c !important;
  border: 1px solid #3a3320 !important;
}

body.prem-theme .calc-total .tot-label {
  color: #e8c886 !important;
}

body.prem-theme .calc-total .tot-amt {
  color: #f5d77f !important;
}

body.prem-theme .calc-rate {
  background: #2a2213 !important;
  border-color: #5c4a1f !important;
  color: #e8c886 !important;
}

body.prem-theme .calc-inp input {
  background: #0f1014 !important;
  border-color: #3a3320 !important;
  color: #f5f3ee !important;
}

body.prem-theme .calc-inp input:focus {
  border-color: #e3b448 !important;
}

body.prem-theme .calc-inp em,
body.prem-theme .calc-hint,
body.prem-theme .calc-net {
  color: #c8b489 !important;
}

body.prem-theme .calc-type {
  background: linear-gradient(90deg, #b8860b, #e3b448) !important;
  color: #1a150a !important;
}

body.prem-theme .calc-disc {
  background: #1f1b14 !important;
  border-color: #5c4a1f !important;
  color: #e8c886 !important;
}

/* Header Base Styling */
.cf-global-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-border);
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cf-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cf-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--header-txt);
  cursor: pointer;
}

.cf-logo-icon {
  font-size: 22px;
  line-height: 1;
}

.cf-logo-text {
  font-family: 'GmarketSans', 'Noto Sans KR', sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: var(--header-txt);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.cf-gnb-divider {
  width: 1px;
  height: 20px;
  background: var(--header-border);
  margin: 0 4px;
}

.cf-gnb {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cf-gnb::-webkit-scrollbar {
  display: none;
}

.cf-gnb-item {
  color: var(--header-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.cf-gnb-item:hover {
  background: var(--header-hover-bg);
  color: var(--header-hover-txt);
}

.cf-gnb-item.active {
  background: var(--header-active-bg);
  color: var(--header-active-txt);
  font-weight: 800;
}

.cf-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cf-search-box {
  display: flex;
  align-items: center;
  background: var(--header-search-bg);
  border: 1.5px solid var(--header-search-border);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cf-search-box:focus-within {
  border-color: var(--brand);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(20, 92, 230, 0.12);
}

.cf-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--header-txt);
  width: 180px;
  font-family: inherit;
}

.cf-search-btn {
  border: none;
  background: transparent;
  color: var(--header-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.cf-search-btn:hover {
  color: var(--header-hover-txt);
}

@media (max-width: 640px) {
  .cf-global-header {
    padding: 0 16px;
  }
  .cf-search-input {
    width: 120px;
  }
  .cf-search-box {
    display: none;
  }
}

body {
  word-break: keep-all;
}

/* Global Standardized Card Tile Components */
.c-card, .card, .sr-row, .sr-reco-card {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.c-card:hover, .card:hover, .sr-row:hover, .sr-reco-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

.c-img-wrap, .img-wrap {
  position: relative;
  width: 120px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.c-img, .card-media img, .sr-row img, .sr-reco-card img, .hero img {
  max-width: 100px;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-xs);
  filter: drop-shadow(0 6px 12px rgba(15, 23, 42, 0.12));
}

/* Global Standardized Chips System */
.c-chip, .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--muted);
}

.c-chip-fee, .chip.fee {
  background: #EFF6FF !important;
  border-color: #BFDBFE !important;
  color: #1D4ED8 !important;
}

.c-chip-pre, .chip.pre {
  background: #F0FDF4 !important;
  border-color: #BBF7D0 !important;
  color: #15803D !important;
}

.c-chip-chk, .chip.chk {
  background: #FFF7ED !important;
  border-color: #FED7AA !important;
  color: #C2410C !important;
  font-weight: 700 !important;
}

.c-chip-prem, .chip.prem {
  background: linear-gradient(90deg, #B8860B, #E3B448) !important;
  border: none !important;
  color: #1A150A !important;
  font-weight: 800 !important;
}

/* Global Button & Micro-Interactions */
button, .detail-btn, .compare-btn, .back, .calc-btn, .c-btn {
  font-family: inherit;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

button:hover:not(:disabled), .detail-btn:hover, .compare-btn:hover, .back:hover, .calc-btn:hover, .c-btn:hover {
  transform: translateY(-2px);
}

button:active:not(:disabled), .detail-btn:active, .compare-btn:active, .back:active, .calc-btn:active, .c-btn:active {
  transform: translateY(0);
}

button:focus-visible, .detail-btn:focus-visible, .compare-btn:focus-visible, .back:focus-visible, .calc-btn:focus-visible, .c-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 92, 230, 0.25);
}

.detail-btn, .back, .c-btn-primary {
  border-radius: var(--radius-sm);
}

#more {
  border-radius: var(--radius-md);
}

/* Skeleton Shimmer Loading UI */
@keyframes cf-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-card {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.skeleton-img {
  width: 120px;
  height: 76px;
  border-radius: var(--radius-xs);
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: cf-shimmer 1.5s infinite;
  flex-shrink: 0;
}

.skeleton-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: cf-shimmer 1.5s infinite;
}

.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-30 { width: 30%; }

/* Standard Empty State Component */
.c-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.c-empty-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
}

.c-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 6px;
}

.c-empty-sub {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Global Modal & Bottom Sheet System */
.c-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.c-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.c-modal-content {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.c-modal-overlay.active .c-modal-content {
  transform: scale(1);
}

.c-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}

/* Mobile Bottom Sheet Modal Overrides */
@media (max-width: 640px) {
  .c-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .c-modal-content {
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
  }
  .c-modal-overlay.active .c-modal-content {
    transform: translateY(0);
  }
  .c-modal-drag-handle {
    width: 36px;
    height: 4px;
    border-radius: 99px;
    background: var(--line);
    margin: 0 auto 16px;
  }
}

/* Global Footer Styling */
.cf-global-footer {
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 40px 24px 48px;
  margin-top: 60px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

.cf-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cf-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  color: var(--txt);
}

.cf-footer-disclaimer {
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* Dark Footer Themes for Premium & Calculator */
body.prem-theme .cf-global-footer,
body.prem-theme footer {
  background: #090a0d !important;
  border-top: 1px solid rgba(201, 164, 92, 0.2) !important;
  color: #9aa0ac !important;
}
body.prem-theme .cf-footer-brand {
  color: #e8c886 !important;
}
body.prem-theme .cf-footer-disclaimer {
  color: #6b7280 !important;
  border-top-color: rgba(201, 164, 92, 0.2) !important;
}

body.calc-theme .cf-global-footer,
body.calc-theme footer {
  background: #040e0c !important;
  border-top: 1px solid rgba(22, 168, 150, 0.2) !important;
  color: #7ab5ac !important;
}
body.calc-theme .cf-footer-brand {
  color: #7fe0a5 !important;
}
body.calc-theme .cf-footer-disclaimer {
  color: #4a7a72 !important;
  border-top-color: rgba(22, 168, 150, 0.2) !important;
}

/* Global Typography Scale System */
h1, .c-h1 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 800;
}

h2, .c-h2 {
  font-size: 19px;
  line-height: 1.35;
  font-weight: 800;
}

h3, .c-h3 {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
}

.c-body1 {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
}

.c-body2 {
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 500;
}

.c-caption {
  font-size: 11.5px;
  line-height: 1.4;
  font-weight: 600;
}

/* Global Responsive Breakpoint Utilities */
@media (max-width: 640px) {
  .hide-on-mobile {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .hide-on-desktop {
    display: none !important;
  }
}

/* ── Card Worldcup UI/UX Overhaul Animations & Components ── */
@keyframes vsPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(37, 99, 235, 0.4)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 16px rgba(37, 99, 235, 0.8)); }
}

@keyframes roundBannerPop {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(0.8); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1); }
}

@keyframes cardWinnerPick {
  0% { transform: scale(1); }
  50% { transform: scale(1.08) translateY(-6px); filter: drop-shadow(0 16px 32px rgba(37, 99, 235, 0.3)); }
  100% { transform: scale(1); }
}

@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.cf-bracket-modal {
  max-width: 720px !important;
  background: var(--panel) !important;
}

.cf-bracket-tree {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 480px;
  overflow-y: auto;
  padding: 8px 4px;
}

.cf-bracket-stage {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.cf-bracket-stage-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 8px;
}

.cf-bracket-match-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.cf-bracket-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}

.cf-bracket-item.winner {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand-deep);
  font-weight: 800;
}

/* ── Common Global UI Polish & Consistency Styles ── */

/* 1. Common Footer Styling */
.cf-global-footer {
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 48px 24px 40px;
  margin-top: 60px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

body.prem-theme .cf-global-footer {
  background: #0f1118 !important;
  border-top: 1px solid rgba(201, 164, 92, 0.25) !important;
  color: #94a3b8 !important;
}

body.calc-theme .cf-global-footer {
  background: #061412 !important;
  border-top: 1px solid rgba(22, 168, 150, 0.2) !important;
  color: #94a3b8 !important;
}

.cf-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cf-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.cf-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  color: var(--txt);
}

body.prem-theme .cf-footer-brand { color: #e8c886 !important; }

.cf-footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.cf-footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: color 0.15s ease;
}

.cf-footer-links a:hover {
  color: var(--brand);
}

.cf-footer-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.7;
  padding: 14px 18px;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

body.prem-theme .cf-footer-desc {
  background: #141620 !important;
  border-color: rgba(201, 164, 92, 0.15) !important;
  color: #8b96a5 !important;
}

.cf-footer-copy {
  font-size: 12px;
  color: var(--muted);
}

/* 2. Global Toast Notification */
.cf-toast-notification {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 99px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  pointer-events: none;
}

.cf-toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 3. Global Scroll to Top Button */
.cf-scroll-top-btn {
  position: fixed;
  bottom: 96px;
  right: 28px;
  background: var(--panel);
  color: var(--brand);
  border: 1.5px solid var(--line);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  font-size: 13px;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 99px;
  cursor: pointer;
  z-index: 150;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.25s ease;
}

body.prem-theme .cf-scroll-top-btn {
  background: #181a22 !important;
  color: #e8c886 !important;
  border-color: #3a3320 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

body.prem-theme .cf-scroll-top-btn:hover {
  background: linear-gradient(90deg, #b8860b, #e3b448) !important;
  color: #1a150a !important;
  border-color: #e3b448 !important;
}

body.calc-theme .cf-scroll-top-btn {
  background: #0e2622 !important;
  color: #7fe0a5 !important;
  border-color: #165c52 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

body.calc-theme .cf-scroll-top-btn:hover {
  background: linear-gradient(90deg, #0e7f6e, #16a896) !important;
  color: #ffffff !important;
  border-color: #16a896 !important;
}

.cf-scroll-top-btn.show {
  opacity: 1;
  transform: translateY(0);
}

.cf-scroll-top-btn:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

/* 4. Skeleton Loading UI & Breadcrumbs */
@keyframes cfSkeletonPulse {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.cf-skeleton {
  background: linear-gradient(90deg, #e2e8f0 0px, #f1f5f9 50px, #e2e8f0 100px);
  background-size: 200px 100%;
  animation: cfSkeletonPulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.cf-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 20px;
}

.cf-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.cf-breadcrumb a:hover {
  color: var(--brand);
}

.cf-breadcrumb-current {
  color: var(--txt);
  font-weight: 700;
}

body.prem-theme .cf-breadcrumb,
body.prem-theme .cf-breadcrumb a,
body.prem-theme .cf-breadcrumb-sep {
  color: #9aa0ac !important;
}

body.prem-theme .cf-breadcrumb a:hover {
  color: #e8c886 !important;
}

body.prem-theme .cf-breadcrumb-current {
  color: #e8c886 !important;
  font-weight: 800 !important;
}

