/**
 * =========================================
 * LEGAL PAGES - COMPREHENSIVE SHARED STYLES
 * =========================================
 *
 * Consolidated styles for all legal pages:
 * - About, Privacy, Rules, Terms
 *
 * Uses design tokens from /styles/main.css
 *
 * BUTTON USAGE:
 * - Use .btn classes from /styles/components/buttons.css
 * - Primary CTA: btn btn--primary btn--large btn--pill
 * - Secondary CTA: btn btn--outline btn--large btn--pill
 * - Small buttons: btn btn--secondary btn--small btn--pill
 */

/* ============================================
 * FONTS IMPORT
 * ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=Inter:wght@400;500&display=swap');

/* ============================================
 * CSS VARIABLES & DESIGN TOKENS
 * ============================================ */
:root {
  --primary: #00ff88;
  --primary-dark: #00cc6a;
  --secondary: #6c63ff;
  --accent: #ff6b6b;
  --accent-gold: #ffd700;
  --strong-tag: #8569aa;
  --background: linear-gradient(45deg, #1a1a2e 0%, #16213e 100%);
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-hover: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.2);
  --glass-blur: blur(12px);
  --font-main: 'Inter', sans-serif;
  --font-headings: 'Poppins', sans-serif;
  --radius-lg: 16px;
  --radius-md: 12px;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
}

/* ============================================
 * BODY & BASE LAYOUT
 * ============================================ */
body {
  font-family: var(--font-main);
  background: var(--background);
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ============================================
 * HEADER & FOOTER POSITIONING
 * ============================================ */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 9;
}

.footer-wrapper {
  position: fixed;
  bottom: 0;
  width: 100%;
}

/* ============================================
 * OVERFLOW PREVENTION - Global Rules
 * ============================================ */
.legal-main-container *,
.legal-page-wrapper * {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.legal-main-container img,
.legal-main-container video,
.legal-main-container iframe {
  max-width: 100%;
  height: auto;
}

.legal-main-container a,
.legal-main-container code,
.legal-main-container pre {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ============================================
 * PAGE WRAPPER - Outer Container with Centering
 * ============================================ */
.legal-page-wrapper {
  width: 100%;
  max-width: var(--max-width-7xl, 80rem); /* 1280px */
  margin: 0 auto; /* Centers the outer container */
  padding: var(--spacing-container-mobile, 1rem);
  padding-bottom: 6rem; /* Space for footer */
}

@media (min-width: 768px) {
  .legal-page-wrapper {
    padding: var(--spacing-container-tablet, 1.5rem);
    padding-bottom: 6rem;
  }
}

@media (min-width: 1024px) {
  .legal-page-wrapper {
    padding: var(--spacing-container-desktop, 2rem);
    padding-bottom: 6rem;
  }
}

/* ============================================
 * MAIN CONTAINER - Glass Card Effect with Centering
 * ============================================ */
.legal-main-container {
  max-width: 1200px;
  margin: 1rem auto; /* Centers the content card */
  padding: clamp(1.5rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1s ease-out;
  line-height: 1.7;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .legal-main-container {
    margin: 0.5rem auto;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .legal-main-container {
    padding: 1rem;
  }
}

/* ============================================
 * BREADCRUMB NAVIGATION
 * ============================================ */
.breadcrumb {
  margin-bottom: 1.5rem;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: inline;
}

.breadcrumb-item a {
  color: #00ff88;
  text-decoration: none;
  transition: color 0.2s ease;
  word-break: break-word;
}

.breadcrumb-item a:hover {
  color: #6c63ff;
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumb-separator {
  margin: 0 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0.6;
}

@media (max-width: 480px) {
  .breadcrumb-list {
    font-size: 0.85rem;
  }

  .breadcrumb-separator {
    margin: 0 0.3rem;
  }
}

/* ============================================
 * TYPOGRAPHY - Common Text Styles
 * ============================================ */
.main-title {
  font-family: var(--font-headings);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  text-align: left;
  margin: 0 0 0.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  word-wrap: break-word;
  overflow-wrap: break-word;
  position: relative;
  padding-bottom: 1rem;
}

.main-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.subtitle {
  text-align: center;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin: 0 0 3rem;
  font-weight: 500;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-headings);
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

h2,
.section-title {
  font-family: var(--font-headings);
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  font-weight: 600;
  margin: 3rem 0 1.5rem;
  color: var(--primary);
  padding: 0.5rem 0;
  border-bottom: 2px solid var(--border-color);
}

h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.125rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.content-paragraph {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.content-paragraph strong,
strong {
  color: var(--strong-tag);
  font-weight: 600;
}

/* ============================================
 * SECTIONS - Common Section Styles
 * ============================================ */
section {
  margin-bottom: 3rem;
}

section:last-of-type {
  margin-bottom: 2rem;
}

/* ============================================
 * LISTS - Common List Styles
 * ============================================ */
.content-list {
  margin: 1.5rem 0;
  padding-left: 2rem;
  list-style-type: none;
}

.content-list li {
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
}

.content-list li::before {
  content: '•';
  color: var(--primary);
  margin-right: 0.5rem;
}

/* ============================================
 * LINKS - Common Link Styles
 * ============================================ */
.content-link {
  color: var(--primary);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.content-link:hover {
  color: var(--strong-tag);
}

.content-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--strong-tag);
  transition: width 0.3s ease;
}

.content-link:hover::after {
  width: 100%;
}

/* ============================================
 * CARDS - Base Card Component
 * ============================================ */
.legal-card,
.content-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.legal-card:hover,
.content-card:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow-color);
}

.highlight-card {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.1) 0%, rgba(0, 255, 136, 0.1) 100%);
  border: 2px solid var(--primary);
}

/* ============================================
 * GRID SYSTEMS - Responsive Grid Utilities
 * ============================================ */
.legal-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

.legal-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1.5rem;
}

.legal-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .legal-grid-2,
  .legal-grid-3,
  .legal-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
 * HIGHLIGHT SECTIONS - Colored Section Backgrounds
 * ============================================ */
.highlight-section {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
  border-left: 4px solid;
}

.highlight-section--primary {
  background: rgba(0, 255, 136, 0.1);
  border-left-color: var(--primary);
}

.highlight-section--secondary {
  background: rgba(108, 99, 255, 0.1);
  border-left-color: var(--secondary);
}

.highlight-section--accent {
  background: rgba(255, 107, 107, 0.1);
  border-left-color: var(--accent);
}

.highlight-section--red {
  background: rgba(255, 107, 107, 0.1);
  border-left-color: #ff6b6b;
}

.highlight-section--green {
  background: rgba(0, 255, 136, 0.1);
  border-left-color: #00ff88;
}

/* ============================================
 * CONTACT ELEMENTS
 * ============================================ */
.contact-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-item {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 1.125rem;
}

.contact-item strong {
  color: var(--primary);
  margin-right: 0.5rem;
}

.contact-item a {
  color: var(--secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.contact-item a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ============================================
 * LAST UPDATED SECTION
 * ============================================ */
.last-updated {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.last-updated p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.last-updated strong {
  color: var(--primary);
}

/* ============================================
 * ANIMATIONS
 * ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================
 * RESPONSIVE UTILITIES
 * ============================================ */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2,
  .section-title {
    font-size: 1.6rem;
    margin-top: 2rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .content-paragraph {
    font-size: 1rem;
  }

  .subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  h2,
  .section-title {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .content-paragraph {
    font-size: 1rem;
  }
}

@media (max-width: 350px) {
  .content-list {
    padding-left: 0.1rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  h3 {
    font-size: 1.1rem;
  }
}
