:root {
  --pixel-accent: #f472b6;
  --pixel-accent-glow: #e879f9;
  --pixel-gold: #ffb703;
  --pixel-red: #ff5555;
  --pixel-green: #4ade80;
  --pixel-white: #ffffff;
  --pixel-bg: #0d071a;
  --pixel-card-bg: rgba(20, 10, 36, 0.88);
  --font-pixel: 'Press Start 2P', cursive;
  --font-retro: 'VT323', monospace;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  background-color: var(--pixel-bg);
  color: #f1f5f9;
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  image-rendering: pixelated;
}

/* Background Effects */
.bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('../assets/elements/terms%20and%20condition%20bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.85;
  filter: brightness(0.9) contrast(1.1);
  pointer-events: none;
  z-index: 0;
}

.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://grainy-gradients.vercel.app/noise.svg');
  opacity: 0.12;
  pointer-events: none;
  z-index: 999;
}

.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(244, 114, 182, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 114, 182, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Header Navbar */
.terms-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 7, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(244, 114, 182, 0.3);
  padding: 1rem 2rem;
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.nav-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--pixel-accent);
  text-decoration: none;
  padding: 8px 16px;
  background: rgba(244, 114, 182, 0.1);
  border: 2px solid var(--pixel-accent);
  box-shadow: 3px 3px 0px var(--pixel-accent);
  transition: all 0.2s ease;
}

.nav-back-btn:hover {
  background: var(--pixel-accent);
  color: #000;
  box-shadow: 4px 4px 0px #fff;
  transform: translateY(-2px);
}

/* Wrapper & Layout */
.terms-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 2rem auto 4rem;
  padding: 0 1.5rem;
}

.terms-container {
  position: relative;
  background: var(--pixel-card-bg);
  border: 4px solid var(--pixel-accent);
  box-shadow: 0 0 35px rgba(244, 114, 182, 0.25), 10px 10px 0px rgba(0, 0, 0, 0.7);
  padding: 3rem;
  border-radius: 4px;
}

/* Corner Brackets */
.corner-bracket {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 3px solid var(--pixel-accent);
  z-index: 5;
}

.top-left { top: -4px; left: -4px; border-right: none; border-bottom: none; }
.top-right { top: -4px; right: -4px; border-left: none; border-bottom: none; }
.bottom-left { bottom: -4px; left: -4px; border-right: none; border-top: none; }
.bottom-right { bottom: -4px; right: -4px; border-left: none; border-top: none; }

/* Title Section */
.terms-title-section {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px dashed rgba(244, 114, 182, 0.3);
}

.pixel-subtag {
  font-family: var(--font-retro);
  font-size: 1.3rem;
  color: var(--pixel-gold);
  letter-spacing: 2px;
}

.pixel-heading {
  font-family: var(--font-pixel);
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  color: var(--pixel-white);
  margin: 1rem 0 0.8rem;
  text-shadow: 0 0 16px rgba(244, 114, 182, 0.5);
  line-height: 1.4;
}

.pixel-subheading {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: #f1f5f9;
  margin-bottom: 1.2rem;
}

.meta-tag-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-retro);
  font-size: 1.1rem;
  background: rgba(244, 114, 182, 0.12);
  border: 1px solid rgba(244, 114, 182, 0.35);
  color: var(--pixel-accent);
  padding: 4px 14px;
  border-radius: 4px;
}

/* Intro Card */
.terms-intro-card {
  background: rgba(32, 16, 56, 0.6);
  border-left: 4px solid var(--pixel-accent);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  border-radius: 0 8px 8px 0;
}

.intro-lead {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--pixel-white);
  margin-bottom: 0.75rem;
}

.intro-text {
  margin-bottom: 0.75rem;
  color: #cbd5e1;
}

.intro-highlight {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(244, 114, 182, 0.1);
  padding: 10px 14px;
  border-radius: 4px;
  color: var(--pixel-accent);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Index / TOC */
.terms-toc {
  background: rgba(18, 9, 32, 0.85);
  border: 2px solid rgba(244, 114, 182, 0.25);
  padding: 1.5rem;
  border-radius: 6px;
  margin-bottom: 3rem;
}

.toc-title {
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  color: var(--pixel-gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.toc-item {
  font-family: var(--font-retro);
  font-size: 1.15rem;
  color: #cbd5e1;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-item:hover {
  color: var(--pixel-accent);
  background: rgba(244, 114, 182, 0.15);
  transform: translateX(4px);
}

.toc-highlight {
  color: var(--pixel-gold);
  font-weight: bold;
}

/* Content Sections */
.terms-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.term-section {
  background: rgba(26, 13, 44, 0.55);
  border: 1px solid rgba(244, 114, 182, 0.2);
  border-radius: 6px;
  padding: 1.8rem;
  transition: border-color 0.3s ease;
}

.term-section:hover {
  border-color: rgba(244, 114, 182, 0.5);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-num {
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--pixel-accent);
  background: rgba(244, 114, 182, 0.12);
  padding: 4px 8px;
  border: 1px solid var(--pixel-accent);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pixel-white);
}

.section-body p {
  margin-bottom: 1rem;
  color: #e2e8f0;
}

.section-body p:last-child {
  margin-bottom: 0;
}

/* Lists */
.styled-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.styled-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(38, 19, 64, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #f1f5f9;
}

.styled-list li svg {
  width: 18px;
  height: 18px;
  color: var(--pixel-accent);
  flex-shrink: 0;
}

/* Prohibited List */
.prohibited-list li svg {
  color: var(--pixel-red);
}

.danger-zone-section {
  border-color: rgba(255, 85, 85, 0.35);
}

.danger-zone-section:hover {
  border-color: rgba(255, 85, 85, 0.65);
}

.no-guarantee-list li svg {
  color: #94a3b8;
}

.warning-list li svg {
  color: #fbbf24;
}

/* Confirmation Box */
.confirmation-box {
  margin-top: 2rem;
  background: linear-gradient(135deg, rgba(20, 10, 36, 0.95), rgba(48, 22, 80, 0.95));
  border: 3px solid var(--pixel-gold);
  box-shadow: 0 0 30px rgba(255, 183, 3, 0.25);
  padding: 2.5rem;
  border-radius: 8px;
  text-align: center;
}

.confirmation-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.confirmation-icon {
  width: 48px;
  height: 48px;
  color: var(--pixel-gold);
}

.confirmation-box .pixel-heading {
  color: var(--pixel-gold);
  text-shadow: 0 0 12px rgba(255, 183, 3, 0.5);
  margin: 0;
}

.confirmation-lead {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--pixel-white);
  margin-bottom: 1.5rem;
}

.confirmation-list {
  list-style: none;
  text-align: left;
  max-width: 800px;
  margin: 0 auto 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.confirmation-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 183, 3, 0.25);
  padding: 12px 16px;
  border-radius: 6px;
  color: #f8fafc;
  font-size: 1rem;
}

.confirmation-list li svg {
  width: 20px;
  height: 20px;
  color: var(--pixel-gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.confirmation-footer {
  border-top: 2px dashed rgba(255, 183, 3, 0.35);
  padding-top: 2rem;
}

.welcome-heading {
  font-family: var(--font-pixel);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: var(--pixel-white);
  margin-bottom: 1rem;
}

.spartan-motto {
  font-family: var(--font-pixel);
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.highlight-yellow {
  color: var(--pixel-gold);
  text-shadow: 0 0 12px rgba(255, 183, 3, 0.6);
}

/* Footer Action Bar */
.terms-footer {
  margin-top: 3rem;
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.pixel-btn-back-large {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: #000;
  background: var(--pixel-accent);
  border: 2px solid #fff;
  padding: 14px 28px;
  text-decoration: none;
  box-shadow: 4px 4px 0px #fff;
  transition: all 0.2s ease;
  cursor: pointer;
}

.pixel-btn-back-large:hover {
  background: var(--pixel-white);
  box-shadow: 6px 6px 0px var(--pixel-accent);
  transform: translateY(-2px);
}

.copyright {
  font-family: var(--font-retro);
  font-size: 1.1rem;
  color: #94a3b8;
  letter-spacing: 1px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .terms-container {
    padding: 1.5rem;
  }
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }
  .styled-list {
    grid-template-columns: 1fr;
  }
  .toc-grid {
    grid-template-columns: 1fr;
  }
}
