@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,900&f[]=cabinet-grotesk@400,500,700,800&display=swap');

:root {
  --bg-deep: #0a0a0f;
  --bg-dark: #12121a;
  --bg-card: rgba(18, 18, 26, 0.7);
  --bg-card-hover: rgba(22, 22, 32, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --primary-dark: #7c3aed;
  --accent: #c084fc;
  --accent-glow: rgba(139, 92, 246, 0.4);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  --gradient-accent: linear-gradient(135deg, #c084fc 0%, #8b5cf6 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-display: 'Cabinet Grotesk', sans-serif;
  --font-body: 'Satoshi', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background:
    linear-gradient(to bottom, rgba(10, 10, 15, 0.35), rgba(10, 10, 15, 0.45)),
    url('/background.jpg') center center fixed;
  background-size: cover;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 8px 32px rgba(0,0,0,0.4);
}

.glass-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-hover:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--glass-border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--primary-light);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 100px;
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary-light);
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
}

.input::placeholder {
  color: var(--text-dim);
}

select.input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 3rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-transition-enter {
  opacity: 0;
  transform: translateY(20px);
}

.page-transition-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.page-transition-exit {
  opacity: 1;
}

.page-transition-exit-active {
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }

  .header-inner {
    padding: 0.75rem 0;
  }

  .logo {
    font-size: 1.25rem;
  }

  nav {
    gap: 1.5rem;
  }

  nav a {
    font-size: 0.9rem;
  }

  .hero {
    padding: 3rem 1.5rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .article-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .featured-article {
    flex-direction: column;
  }

  .featured-article .article-image {
    width: 100%;
    min-height: 200px;
  }

  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }

  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  body {
    font-size: 15px;
  }

  .site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0.5rem;
    right: 0.5rem;
    margin: 0.5rem 0 0;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
  }

  .site-header.nav-hidden {
    transform: translateY(calc(-100% - 0.75rem));
  }

  .header-inner {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }

  /* Push page content below the fixed header */
  body {
    padding-top: 5rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  nav a {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    white-space: nowrap;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero {
    padding: 2rem 1rem;
    text-align: center;
  }

  .hero h1 {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .article-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .article-card {
    flex-direction: column;
  }

  .article-card .article-image {
    width: 100%;
    height: 160px;
    min-height: 160px;
  }

  .article-card .article-content {
    padding: 1rem;
  }

  .article-card h3 {
    font-size: 1.1rem;
  }

  .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }

  .btn {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
  }

  .btn-large {
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .modal-content {
    margin: 0.5rem;
    padding: 1rem;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-group label {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
  }

  .form-row {
    flex-direction: column;
  }

  .form-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .form-actions .btn {
    width: 100%;
  }

  table {
    font-size: 0.85rem;
  }

  th, td {
    padding: 0.6rem 0.5rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .contributor-grid {
    grid-template-columns: 1fr;
  }

  .tournament-card {
    padding: 1rem;
  }

  .article-body {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .article-body h1,
  .article-body h2,
  .article-body h3 {
    margin-top: 1.5rem;
  }

  .article-header {
    padding: 1rem;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

  .back-link {
    font-size: 0.85rem;
  }

  .article-meta {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .hero {
    padding: 1.5rem 0.75rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero .subtitle {
    font-size: 0.9rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .category-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .category-tab {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .modal-content {
    margin: 0.25rem;
    padding: 0.75rem;
  }

  .admin-tabs {
    flex-direction: column;
  }

  .admin-tab {
    width: 100%;
    text-align: center;
  }

  /* Table overflow handling */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 600px;
  }
}

/* Card Database Styles */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.card-item {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.card-image {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-placeholder {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-dark);
}

.card-info {
  padding: 12px;
}

.card-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-type {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-stats {
  display: flex;
  gap: 8px;
}

.card-stats .stat {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.card-stats .cost {
  background: rgba(192, 132, 252, 0.2);
  color: var(--accent);
}

.card-stats .power {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.card-stats .defense {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

/* ============================================================
   NEW ADDITIONS — appended below existing styles
   ============================================================ */

/* ----------------------------------------------------------
   Glass variant: depth gradient overlay
   ---------------------------------------------------------- */
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.04) 0%,
    transparent 40%,
    rgba(0, 0, 0, 0.08) 100%
  );
  pointer-events: none;
}

.glass {
  position: relative;
}

/* ----------------------------------------------------------
   Glass colour variants
   ---------------------------------------------------------- */
.glass-primary {
  background: rgba(18, 18, 26, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(167, 139, 250, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(139, 92, 246, 0.1);
}

.glass-danger {
  background: rgba(18, 18, 26, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(239, 68, 68, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(239, 68, 68, 0.08);
}

.glass-success {
  background: rgba(18, 18, 26, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(34, 197, 94, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(34, 197, 94, 0.08);
}

/* ----------------------------------------------------------
   Badge — improved pill shape + glow variants
   ---------------------------------------------------------- */
.badge {
  border: 1px solid transparent;
  transition: box-shadow 0.2s ease;
}

.badge-glow {
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.45);
  border-color: rgba(139, 92, 246, 0.4);
}

.badge-glow-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
  border-color: rgba(34, 197, 94, 0.4);
}

.badge-glow-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
  border-color: rgba(245, 158, 11, 0.4);
}

.badge-glow-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
  border-color: rgba(239, 68, 68, 0.4);
}

/* ----------------------------------------------------------
   Status badges
   ---------------------------------------------------------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 100px;
  border: 1px solid transparent;
}

.status-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.status-badge-approved {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
}

.status-badge-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.status-badge-active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.status-badge-sold {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.3);
}

/* ----------------------------------------------------------
   Data table for admin pages
   ---------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table thead th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: rgba(10, 10, 15, 0.85);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}

.data-table thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }

.data-table tbody tr {
  background: rgba(18, 18, 26, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(12, 12, 20, 0.55);
}

.data-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.08);
  border-bottom-color: rgba(139, 92, 246, 0.15);
}

.data-table tbody td {
  padding: 0.875rem 1rem;
  color: var(--text);
  vertical-align: middle;
}

.data-table tbody td.muted {
  color: var(--text-muted);
}

.data-table .col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

/* ----------------------------------------------------------
   Modal overlay
   ---------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

/* ----------------------------------------------------------
   Sidebar layout
   ---------------------------------------------------------- */
.sidebar-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  gap: 0;
}

@media (max-width: 900px) {
  .sidebar-layout {
    grid-template-columns: 1fr;
  }
}

.sidebar-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav .nav-section-title {
  padding: 0.5rem 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-top: 1rem;
}

.sidebar-nav .nav-section-title:first-child {
  margin-top: 0;
}

.sidebar-nav a,
.sidebar-nav button {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.sidebar-nav a:hover,
.sidebar-nav button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-nav a.active,
.sidebar-nav button.active {
  color: var(--primary-light);
  background: rgba(139, 92, 246, 0.15);
  border-left: 2px solid var(--primary);
}

/* ----------------------------------------------------------
   Form input focus glow (applied broadly)
   ---------------------------------------------------------- */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.2) !important;
}

/* ----------------------------------------------------------
   Page hero header
   ---------------------------------------------------------- */
.page-hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.page-hero h1,
.page-hero .page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
}

.page-hero p,
.page-hero .page-hero-subtitle {
  margin-top: 0.75rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ----------------------------------------------------------
   Card grid (responsive)
   ---------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ----------------------------------------------------------
   Tournament event card
   ---------------------------------------------------------- */
.tournament-event-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(18, 18, 26, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 8px 32px rgba(0,0,0,0.4);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tournament-event-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 12px 40px rgba(0,0,0,0.5),
    0 0 0 1px rgba(139, 92, 246, 0.15);
  transform: translateY(-3px);
}

.tournament-event-card .event-date {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-light);
}

.tournament-event-card .event-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.tournament-event-card .event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.tournament-event-card .event-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* ----------------------------------------------------------
   Deck stat row
   ---------------------------------------------------------- */
.deck-stat-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(18, 18, 26, 0.5);
  border: 1px solid var(--glass-border);
  transition: background 0.2s ease;
}

.deck-stat-row:hover {
  background: rgba(139, 92, 246, 0.07);
  border-color: rgba(139, 92, 246, 0.2);
}

.deck-stat-row .rank-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.deck-stat-row .rank-indicator.rank-1 {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.4);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.25);
}

.deck-stat-row .rank-indicator.rank-2 {
  background: rgba(203, 213, 225, 0.12);
  color: #cbd5e1;
  border-color: rgba(203, 213, 225, 0.3);
}

.deck-stat-row .rank-indicator.rank-3 {
  background: rgba(180, 120, 60, 0.15);
  color: #d97706;
  border-color: rgba(180, 120, 60, 0.35);
}

.deck-stat-row .deck-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.deck-stat-row .deck-share {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  min-width: 3.5rem;
  text-align: right;
}

.deck-stat-row .deck-record {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 4.5rem;
  text-align: right;
}

/* ----------------------------------------------------------
   Contributor card
   ---------------------------------------------------------- */
.contributor-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(18, 18, 26, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 4px 20px rgba(0,0,0,0.35);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contributor-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 8px 32px rgba(0,0,0,0.45);
}

.contributor-card .contributor-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gradient-primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  overflow: hidden;
}

.contributor-card .contributor-info {
  flex: 1;
  min-width: 0;
}

.contributor-card .contributor-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contributor-card .contributor-role {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-light);
  margin-top: 0.1rem;
}

/* ----------------------------------------------------------
   Rejection banner
   ---------------------------------------------------------- */
.rejection-banner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-left: 4px solid var(--error);
  border-radius: var(--radius-md);
  color: #fca5a5;
}

.rejection-banner .rejection-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  margin-top: 0.05rem;
}

.rejection-banner .rejection-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #f87171;
  margin-bottom: 0.25rem;
}

.rejection-banner .rejection-reason {
  font-size: 0.875rem;
  color: #fca5a5;
  line-height: 1.5;
}

/* ----------------------------------------------------------
   Tab navigation
   ---------------------------------------------------------- */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--glass-border);
  overflow-x: auto;
}

.tab-nav .tab-btn {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-nav .tab-btn:hover {
  color: var(--text);
}

.tab-nav .tab-btn.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ----------------------------------------------------------
   Print media query
   ---------------------------------------------------------- */
@media print {
  .site-header,
  nav,
  .sidebar-nav,
  .tab-nav,
  .btn,
  .modal-overlay {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .glass,
  .glass-primary,
  .glass-danger,
  .glass-success {
    background: white !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
}
