/* ==========================================================================
   QQChess Official Website - Global Design System & Stylesheet
   Mobile-Optimized & Large Touch Typography
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Core Colors */
  --bg-dark: #090a0f;
  --bg-card: #12151e;
  --bg-card-hover: #191e2b;
  --bg-glass: rgba(18, 21, 30, 0.75);

  /* Brand Accents */
  --gold-primary: #d4af37;
  --gold-light: #f3e5ab;
  --gold-dark: #aa820a;
  --gold-gradient: linear-gradient(135deg, #f3e5ab 0%, #d4af37 50%, #aa820a 100%);
  --gold-border: rgba(212, 175, 55, 0.35);
  --gold-border-glow: rgba(212, 175, 55, 0.6);

  /* Tournament 1: Above 1800 (Maroon / Burgundy) */
  --maroon-primary: #800020;
  --maroon-bright: #a31c3f;
  --maroon-dark: #4a0012;
  --maroon-glow: rgba(128, 0, 32, 0.4);
  --maroon-gradient: linear-gradient(135deg, #4a0012 0%, #800020 50%, #a31c3f 100%);

  /* Tournament 2: Below 1800 (Dark Blue / Navy) */
  --navy-primary: #0f2b5c;
  --navy-bright: #1d4ed8;
  --navy-dark: #071530;
  --navy-glow: rgba(29, 78, 216, 0.4);
  --navy-gradient: linear-gradient(135deg, #071530 0%, #0f2b5c 50%, #1d4ed8 100%);

  /* Neutral Text & Borders */
  --text-main: #f8fafc;
  --text-muted: #cbd5e1; /* Brighter high contrast text */
  --text-dim: #94a3b8;

  --border-light: rgba(255, 255, 255, 0.12);
  --border-card: rgba(255, 255, 255, 0.1);

  /* Status Colors */
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;

  /* Typography */
  --font-serif: 'Cinzel', Georgia, serif;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing & Layout */
  --container-max: 1280px;
  --header-height: 80px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.05) 0%, transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.01) 0, rgba(255, 255, 255, 0.01) 1px, transparent 0, transparent 40px);
}

/* Selection Highlight */
::selection {
  background: var(--gold-primary);
  color: #000;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

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

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 5rem 0;
}

/* Headings & Typography */
h1, h2, h3, h4, h5, h6, .font-serif {
  font-family: var(--font-serif);
  letter-spacing: 0.03em;
  color: var(--text-main);
}

.heading-gold {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gold {
  color: var(--gold-primary);
}

.text-muted {
  color: var(--text-muted);
}

.section-title {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gold-gradient);
  border-radius: 2px;
}

.section-title p {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2.8vw, 1.2rem);
  max-width: 650px;
  margin: 1rem auto 0;
  line-height: 1.6;
}

/* Buttons (Touch Friendly 48px+ Targets) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.75rem;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-align: center;
  touch-action: manipulation;
}

.btn-gold {
  background: var(--gold-gradient);
  color: #000;
  font-weight: 700;
  border: 1px solid var(--gold-light);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.btn-gold:hover, .btn-gold:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  color: #000;
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold-primary);
  border: 1px solid var(--gold-primary);
}

.btn-outline-gold:hover, .btn-outline-gold:active {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-maroon {
  background: var(--maroon-gradient);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px var(--maroon-glow);
}

.btn-maroon:hover, .btn-maroon:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(163, 28, 63, 0.5);
  color: #fff;
}

.btn-navy {
  background: var(--navy-gradient);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px var(--navy-glow);
}

.btn-navy:hover, .btn-navy:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(29, 78, 216, 0.5);
  color: #fff;
}

.btn-lg {
  padding: 1.1rem 2.25rem;
  font-size: 1.05rem;
  min-height: 52px;
}

.btn-full {
  width: 100%;
}

/* Card Baseline */
.card-premium {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card-premium:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.15);
}

/* Header & Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(9, 10, 15, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gold-border);
  transition: var(--transition);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
}

.brand-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 1.4rem;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-primary);
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  min-width: 260px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dropdown-item:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-primary);
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold-primary);
  font-size: 1.85rem;
  cursor: pointer;
  padding: 0.5rem;
  min-height: 48px;
  min-width: 48px;
  align-items: center;
  justify-content: center;
}

/* Footer */
footer {
  background: #050609;
  border-top: 1px solid var(--gold-border);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 1rem;
  line-height: 1.7;
}

.grid-2-responsive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.footer-heading {
  font-size: 1.15rem;
  color: var(--gold-primary);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.85rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 1rem;
}

.footer-links a:hover {
  color: var(--gold-primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.dev-link:hover {
  color: var(--gold-light) !important;
  text-decoration: underline !important;
  transform: translateY(-1px);
}

/* Utility Badges */
.badge {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 30px;
}

.badge-maroon {
  background: rgba(128, 0, 32, 0.4);
  color: #fca5a5;
  border: 1px solid rgba(163, 28, 63, 0.7);
}

.badge-navy {
  background: rgba(29, 78, 216, 0.4);
  color: #93c5fd;
  border: 1px solid rgba(29, 78, 216, 0.7);
}

.badge-gold {
  background: rgba(212, 175, 55, 0.25);
  color: var(--gold-light);
  border: 1px solid var(--gold-primary);
}

/* Asset Placeholder Container */
.asset-placeholder {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--gold-border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.75rem;
  text-align: center;
  color: var(--text-muted);
}

.asset-placeholder svg, .asset-placeholder i {
  font-size: 2.25rem;
  color: var(--gold-primary);
  margin-bottom: 0.5rem;
}

/* Mobile & Tablet Responsive Enhancements */
@media (max-width: 1024px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background: #0b0d14;
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.25rem;
    border-bottom: 2px solid var(--gold-primary);
    transform: translateY(-150%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 20px 40px rgba(0,0,0,0.9);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 1.05rem;
    padding: 0.75rem 0;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-dropdown .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-card);
    box-shadow: none;
    margin-top: 0.5rem;
    width: 100%;
  }

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

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }
  .section-padding {
    padding: 3rem 0;
  }
  .card-premium {
    padding: 1.25rem 1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .brand-logo {
    font-size: 1.2rem;
  }
  .brand-logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }
}

@media (max-width: 380px) {
  .container {
    padding: 0 0.75rem;
  }
  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}
