/* ============================================
   CSS VARIABLES & RESET
   ============================================ */
:root {
  --red: #DC0000;
  --red-dark: #B00000;
  --yellow: #FFF200;
  --black: #0a0a0a;
  --black-light: #141414;
  --gray-900: #1a1a1a;
  --gray-800: #2a2a2a;
  --gray-700: #3a3a3a;
  --gray-500: #6b6b6b;
  --gray-400: #888888;
  --gray-300: #aaaaaa;
  --white: #ffffff;
  --success: #28a745;
  --warning: #ff8c00;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --max-width: 520px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   LAYOUT
   ============================================ */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 0 16px 40px;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
  background: var(--black-light);
  border-bottom: 1px solid var(--gray-800);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  max-width: 680px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 1px;
}

/* Hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  justify-content: center;
  align-items: center;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Navigation */
.main-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--gray-900);
  border-bottom: 1px solid var(--gray-800);
  display: none;
  flex-direction: column;
  padding: 8px 16px;
}

.main-nav.open {
  display: flex;
}

.nav-link {
  color: var(--gray-400);
  text-decoration: none;
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--gray-800);
  transition: color 0.2s;
}

.nav-link:last-child {
  border-bottom: none;
}

.nav-link.active,
.nav-link:hover {
  color: var(--red);
}

/* Desktop nav */
@media (min-width: 640px) {
  .menu-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    display: flex !important;
    flex-direction: row;
    gap: 28px;
    background: transparent;
    border: none;
    padding: 0;
  }

  .nav-link {
    border: none;
    padding: 8px 0;
    font-size: 0.9rem;
    position: relative;
  }

  .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--red);
    border-radius: 1px;
  }
}

/* ============================================
   TABS / PANELS
   ============================================ */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: 32px 0 24px;
  text-align: center;
}

.hero-title {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.highlight {
  color: var(--red);
}

.hero-text {
  color: var(--gray-400);
  font-size: 1.05rem;
  max-width: 420px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

/* Card preview */
.hero-visual {
  display: flex;
  justify-content: center;
}

.card-preview {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 300px;
  text-align: center;
  box-shadow: var(--shadow);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gray-500);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.preview-logo {
  font-size: 1.5rem;
}

.preview-id {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--yellow);
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.preview-name {
  color: var(--gray-400);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.preview-status {
  display: inline-block;
  background: var(--warning);
  color: var(--black);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 1px;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}

.feature-card {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--white);
}

.feature-card p {
  color: var(--gray-500);
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    text-align: left;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 48px 0;
  }

  .hero-content {
    text-align: left;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-text {
    margin-left: 0;
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--gray-700);
}

.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-full {
  width: 100%;
}

.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   FORMS
   ============================================ */
.form-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 24px;
}

.form-header {
  text-align: center;
  margin-bottom: 28px;
}

.form-header h2 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin-bottom: 8px;
}

.form-header p {
  color: var(--gray-500);
  font-size: 0.95rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .form-row.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-field input {
  padding: 14px 16px;
  background: var(--gray-900);
  border: 1.5px solid var(--gray-800);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 16px; /* Prevents iOS zoom */
  transition: border-color 0.2s;
  width: 100%;
  -webkit-appearance: none;
}

.form-field input:focus {
  outline: none;
  border-color: var(--red);
}

.form-field input::placeholder {
  color: var(--gray-700);
}

.form-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--gray-500);
  font-size: 0.9rem;
}

.form-footer a {
  color: var(--red);
  text-decoration: none;
  font-weight: 500;
}

/* ============================================
   RESULT BOXES
   ============================================ */
.result-box {
  margin-top: 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.result-box.hidden {
  display: none;
}

.result-success,
.result-error,
.result-warning {
  padding: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.result-success {
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid var(--success);
  color: #5cdb7a;
}

.result-error {
  background: rgba(220, 0, 0, 0.1);
  border: 1px solid var(--red);
  color: #ff6b6b;
}

.result-warning {
  background: rgba(255, 140, 0, 0.1);
  border: 1px solid var(--warning);
  color: #ffb84d;
}

.result-box h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.result-box strong {
  color: var(--yellow);
}

/* ============================================
   FAN CARD (DASHBOARD)
   ============================================ */
.dashboard {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 24px;
}

.dash-header {
  text-align: center;
  margin-bottom: 28px;
}

.dash-header h2 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin-bottom: 6px;
}

.dash-header p {
  color: var(--gray-500);
}

/* Fan Card Visual */
.fan-card-real {
  background: var(--gray-900);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-800);
}

.fc-stripe {
  height: 6px;
  background: var(--red);
}

.fc-body {
  padding: 24px;
}

.fc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.fc-badge {
  background: var(--red);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.fc-logo {
  font-size: 1.75rem;
}

.fc-label {
  font-size: 0.7rem;
  color: var(--gray-500);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.fc-id {
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 800;
  color: var(--yellow);
  letter-spacing: 3px;
  margin-bottom: 16px;
}

.fc-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}

.fc-email {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 20px;
  word-break: break-all;
}

.fc-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 16px;
}

.fc-status {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.fc-status.approved {
  background: rgba(40, 167, 69, 0.15);
  color: var(--success);
}

.fc-status.pending {
  background: rgba(255, 140, 0, 0.15);
  color: var(--warning);
}

.fc-status.rejected {
  background: rgba(220, 0, 0, 0.15);
  color: var(--red);
}

/* Dash info */
.dash-info {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-800);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--gray-500);
  font-size: 0.9rem;
}

.info-value {
  color: var(--white);
  font-weight: 500;
  font-size: 0.9rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  text-align: center;
  padding: 24px 16px;
  color: var(--gray-700);
  font-size: 0.8rem;
  border-top: 1px solid var(--gray-900);
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
  display: none !important;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* Prevent body scroll when menu open */
body.menu-open {
  overflow: hidden;
}
