:root {
  --bg-dark: #070b19;
  --bg-card: rgba(16, 24, 52, 0.7);
  --bg-card-hover: rgba(23, 35, 75, 0.85);
  --border-color: rgba(0, 240, 255, 0.18);
  --border-color-hover: rgba(0, 240, 255, 0.5);
  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.35);
  --pink: #ff007f;
  --pink-glow: rgba(255, 0, 127, 0.35);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --success: #10b981;
  --danger: #ef4444;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Orbitron', 'Inter', sans-serif;
  --container-max: 1120px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(255, 0, 127, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, .brand-font {
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

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

a:hover {
  text-decoration: underline;
  text-shadow: 0 0 10px var(--cyan-glow);
}

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 11, 25, 0.85);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.brand:hover {
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #070b19;
  font-size: 1.1rem;
  box-shadow: 0 0 16px var(--cyan-glow);
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 0 14px var(--cyan-glow);
  display: block;
}

.brand-title {
  background: linear-gradient(90deg, #ffffff, var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  text-shadow: 0 0 8px var(--cyan-glow);
  text-decoration: none;
}

/* Nav Hamburger Toggle Button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 34px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 3px 0;
  z-index: 105;
}

.nav-toggle span {
  width: 100%;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  min-height: 48px;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #00a8ff);
  color: #050b18;
  font-weight: 700;
  box-shadow: 0 4px 20px var(--cyan-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(0, 240, 255, 0.6);
  color: #050b18;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-color: var(--border-color);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--cyan);
  color: #fff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

/* Hero Section */
.hero {
  padding: 60px 0 80px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--cyan);
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.hero-title {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 18px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Interactive Board Mockup */
.hero-visual {
  display: flex;
  justify-content: center;
}

.board-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 240, 255, 0.1);
}

.board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  aspect-ratio: 1;
}

.cell {
  aspect-ratio: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.7rem);
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

@keyframes popIn {
  0% {
    transform: scale(0.35);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.cell:hover:not(.x):not(.o) {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--cyan);
}

.cell.x {
  color: var(--cyan);
  border-color: rgba(0, 240, 255, 0.5);
  background: rgba(0, 240, 255, 0.06);
  text-shadow: 0 0 15px var(--cyan-glow), 0 0 25px rgba(0, 240, 255, 0.6);
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cell.o {
  color: var(--pink);
  border-color: rgba(255, 0, 127, 0.5);
  background: rgba(255, 0, 127, 0.06);
  text-shadow: 0 0 15px var(--pink-glow), 0 0 25px rgba(255, 0, 127, 0.6);
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cell.winner {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  animation: winnerPulse 1s infinite alternate ease-in-out;
}

@keyframes winnerPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
  }
  100% {
    transform: scale(1.04);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.9);
  }
}

/* Features Grid */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 54px;
}

.section-tag {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 12px 30px rgba(0, 240, 255, 0.15);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--border-color);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--cyan);
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Documentation / Legal Layout (Privacy & Delete Account) */
.legal-page {
  padding: 50px 0 80px;
  max-width: 860px;
  margin: 0 auto;
}

.legal-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.legal-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-content h2 {
  font-size: 1.4rem;
  margin: 36px 0 16px;
  color: #fff;
  border-left: 3px solid var(--cyan);
  padding-left: 12px;
}

.legal-content h3 {
  font-size: 1.1rem;
  margin: 24px 0 12px;
  color: var(--cyan);
}

.legal-content p, .legal-content li {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.7;
}

.legal-content ul, .legal-content ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0;
}

.legal-box.highlight {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.05);
}

.legal-box.warning {
  border-color: var(--pink);
  background: rgba(255, 0, 127, 0.05);
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #fff;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 15px var(--cyan-glow);
  background: rgba(255, 255, 255, 0.08);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.checkbox-group input {
  margin-top: 4px;
  accent-color: var(--pink);
  width: 18px;
  height: 18px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

td {
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: rgba(7, 11, 25, 0.95);
  padding: 40px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 360px;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 16px;
}

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

.footer-links li {
  margin-bottom: 10px;
}

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

.footer-links a:hover {
  color: var(--cyan);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Media Queries for Maximum Responsiveness */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

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

@media (max-width: 768px) {
  .nav-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }

  .nav-toggle {
    display: flex;
  }

  .brand {
    font-size: 1.05rem;
    gap: 10px;
  }

  .brand-logo-img {
    width: 32px;
    height: 32px;
  }

  .nav-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 100%;
    background: rgba(10, 16, 36, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.15);
    padding: 16px;
    display: none;
    z-index: 120;
  }

  .nav-menu.active {
    display: block;
    animation: menuSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes menuSlide {
    0% { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
  }

  .nav-link:hover, .nav-link.active {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--cyan);
  }
}

@media (max-width: 640px) {

  .hero {
    padding: 30px 0 50px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Contact Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 11, 25, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: grid;
}

.modal-card {
  background: #0e152e;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.15);
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--cyan);
}

.contact-email-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 18px 0;
  gap: 12px;
}

.contact-email-text {
  font-family: monospace;
  font-size: 1rem;
  color: var(--cyan);
  word-break: break-all;
}
