/* ===== Platform CSS — LevelUp Lore ===== */

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

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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --gold: #D4A843;
  --gold-light: #f0d078;
  --gold-dark: #a07830;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0b0;
  --text-muted: #666680;
  --border-subtle: #2a2a3e;
  --danger: #e04040;
  --success: #40c060;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gold-light);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

/* --- Layout Utilities --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(212, 168, 67, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(212, 168, 67, 0.04) 0%, transparent 60%),
    var(--bg-primary);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D4A843' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 40px 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 16px;
  text-shadow: 0 0 40px rgba(212, 168, 67, 0.3);
  letter-spacing: 0.04em;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 48px;
  letter-spacing: 0.02em;
}

.hero-cta {
  display: inline-block;
  padding: 18px 48px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0a0f;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 20px rgba(212, 168, 67, 0.3);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 168, 67, 0.45);
  color: #0a0a0f;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

/* --- How It Works Section --- */
.how-it-works {
  background: var(--bg-secondary);
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  text-align: center;
  margin-bottom: 12px;
  color: var(--gold);
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 60px;
  font-size: 1.05rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 40px 32px;
  text-align: center;
  transition: all 0.3s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold-dark);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.card-number {
  display: inline-block;
  width: 36px;
  height: 36px;
  line-height: 36px;
  background: var(--gold);
  color: var(--bg-primary);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Example Game Section --- */
.example-section {
  text-align: center;
}

.game-frame-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  border: 3px solid var(--gold-dark);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(212, 168, 67, 0.1),
    0 0 60px rgba(212, 168, 67, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.5);
}

.game-frame-container::before {
  content: 'The Merchant\'s Ledger';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 20px;
  background: linear-gradient(to bottom, rgba(26, 15, 10, 0.95), rgba(26, 15, 10, 0.8));
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
  border-bottom: 1px solid var(--gold-dark);
}

.game-iframe {
  width: 100%;
  height: 600px;
  border: none;
  display: block;
  background: #1A0F0A;
}

/* --- Footer --- */
.site-footer {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}

.site-footer span {
  color: var(--gold-dark);
}

/* --- Generate Page --- */
.page-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 24px;
}

.page-header .back-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.page-header .back-link:hover {
  color: var(--gold);
}

.page-header h1 {
  font-size: 1.6rem;
  color: var(--gold);
}

/* --- Upload Section --- */
.upload-section {
  max-width: 700px;
  margin: 60px auto;
}

.drop-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: 12px;
  padding: 60px 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-card);
  margin-bottom: 24px;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.04);
}

.drop-zone-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  opacity: 0.6;
}

.drop-zone-text {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 8px;
}

.drop-zone-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.drop-zone-filename {
  color: var(--gold);
  font-weight: 600;
  margin-top: 12px;
  display: none;
}

.or-divider {
  text-align: center;
  color: var(--text-muted);
  margin: 24px 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.text-input-area {
  width: 100%;
  min-height: 160px;
  padding: 16px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.text-input-area:focus {
  outline: none;
  border-color: var(--gold);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-field input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-field input:focus {
  outline: none;
  border-color: var(--gold);
}

.form-field input::placeholder {
  color: var(--text-muted);
}

.btn-generate {
  display: block;
  width: 100%;
  padding: 18px;
  margin-top: 32px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0a0f;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(212, 168, 67, 0.25);
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 168, 67, 0.4);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- Progress Section --- */
.progress-section {
  max-width: 600px;
  margin: 80px auto;
  text-align: center;
  display: none;
}

.progress-section.active {
  display: block;
}

.progress-title {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 32px;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: var(--bg-card);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  border-radius: 6px;
  transition: width 0.6s ease;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-percentage {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.progress-stage {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 8px;
}

.progress-wait {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Completion --- */
.completion-section {
  display: none;
  text-align: center;
  max-width: 600px;
  margin: 80px auto;
}

.completion-section.active {
  display: block;
}

.completion-title {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.completion-subtitle {
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 1.05rem;
}

.btn-play {
  display: inline-block;
  padding: 20px 60px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0a0f;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 24px rgba(212, 168, 67, 0.35);
  animation: pulse-glow 2s ease-in-out infinite;
}

.btn-play:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(212, 168, 67, 0.5);
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 24px rgba(212, 168, 67, 0.35); }
  50% { box-shadow: 0 4px 40px rgba(212, 168, 67, 0.55); }
}

/* --- Error State --- */
.error-section {
  display: none;
  text-align: center;
  max-width: 600px;
  margin: 80px auto;
}

.error-section.active {
  display: block;
}

.error-title {
  font-size: 1.5rem;
  color: var(--danger);
  margin-bottom: 12px;
}

.error-message {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.btn-retry {
  padding: 14px 40px;
  background: transparent;
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--gold);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-retry:hover {
  background: rgba(212, 168, 67, 0.1);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .section {
    padding: 48px 0;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .game-iframe {
    height: 400px;
  }

  .game-frame-container::before {
    font-size: 0.75rem;
    padding: 8px 16px;
  }

  .hero-cta {
    padding: 16px 36px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .game-iframe {
    height: 300px;
  }
}

/* ===== Navigation Bar ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 24px;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
}
.nav-links a { color: var(--text-secondary); }
.nav-links a:hover, .nav-links a.nav-active { color: var(--gold); }
.nav-user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-user-name {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.btn-small {
  padding: 6px 16px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-dark);
}
.btn-outline:hover {
  background: rgba(212, 168, 67, 0.1);
  color: var(--gold-light);
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0a0f;
  border: none;
  font-weight: 600;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #0a0a0f;
}

/* ===== Hero Additions ===== */
.hero-description {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-cta-secondary {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold-dark);
  box-shadow: none;
}
.hero-cta-secondary:hover {
  background: rgba(212, 168, 67, 0.1);
  color: var(--gold-light);
  box-shadow: none;
  transform: translateY(-2px);
}

/* ===== Auth Pages ===== */
.auth-page {
  max-width: 420px;
  margin: 80px auto;
  text-align: center;
}
.auth-logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold);
  display: block;
  margin-bottom: 40px;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 32px;
}
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}
.auth-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.auth-form .form-field {
  margin-bottom: 16px;
  text-align: left;
}
.auth-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 20px;
}
.auth-success {
  color: var(--success);
  font-size: 0.85rem;
  margin-top: 12px;
}
.auth-footer-text {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.auth-forgot-link {
  display: block;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}
.auth-forgot-link:hover { color: var(--gold); }
.auth-forgot-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
  text-align: center;
}
.auth-card-title {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 20px;
}

/* ===== Gallery ===== */
.gallery-section {
  background: var(--bg-secondary);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.3s;
}
.gallery-card:hover {
  border-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.gallery-card h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
}
.gallery-card-subject {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Pricing ===== */
.pricing-section { background: var(--bg-primary); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  max-width: 750px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  position: relative;
}
.pricing-featured {
  border-color: var(--gold-dark);
  box-shadow: 0 0 40px rgba(212, 168, 67, 0.1);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0a0f;
  padding: 4px 20px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pricing-name {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.pricing-price {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}
.pricing-period {
  font-size: 1rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 400;
}
.pricing-desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
}
.pricing-features li {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(42, 42, 62, 0.5);
}
.pricing-features li::before {
  content: '\2713';
  color: var(--success);
  margin-right: 10px;
  font-weight: 700;
}
.pricing-notice {
  max-width: 650px;
  margin: 40px auto 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
}
.pricing-notice h3 {
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.pricing-notice p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}
.pricing-canceled {
  background: rgba(224, 64, 64, 0.1);
  border: 1px solid var(--danger);
  border-radius: 8px;
  padding: 12px 20px;
  color: var(--danger);
  text-align: center;
  margin-bottom: 24px;
}
.btn-selected-plan {
  background: var(--bg-card) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border-subtle) !important;
  cursor: default !important;
  opacity: 0.7;
}
.btn-selected-plan:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Pricing mini (landing page) */
.pricing-grid-compact {
  max-width: 600px;
}
.pricing-card-mini {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
}
.pricing-featured-mini {
  border-color: var(--gold-dark);
}
.pricing-price-mini {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--gold);
  font-weight: 700;
  margin: 12px 0 8px;
}
.pricing-price-mini span {
  font-size: 1rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}
.pricing-card-mini p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Pricing preview section on landing */
.pricing-preview {
  background: var(--bg-secondary);
}

/* ===== Dashboard ===== */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.dashboard-header h1 {
  font-size: 1.8rem;
  color: var(--gold);
}
.dashboard-status {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.status-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  margin-right: 8px;
}
.status-badge.active {
  background: rgba(64, 192, 96, 0.1);
  border-color: var(--success);
  color: var(--success);
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding-bottom: 60px;
}
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s;
}
.game-card:hover {
  border-color: var(--gold-dark);
}
.game-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.game-card-header h3 {
  font-size: 1rem;
  color: var(--text-primary);
  flex: 1;
}
.game-status {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.game-status.complete { background: rgba(64,192,96,0.15); color: var(--success); }
.game-status.generating { background: rgba(212,168,67,0.15); color: var(--gold); }
.game-status.failed { background: rgba(224,64,64,0.15); color: var(--danger); }
.game-card-subject {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.game-card-date {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 16px;
}
.game-card-refund {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}
.game-card-generating {
  color: var(--gold);
  font-size: 0.85rem;
}
.game-card-new {
  border-style: dashed;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}
.game-card-new a {
  text-align: center;
  color: var(--text-muted);
}
.game-card-new a:hover { color: var(--gold); }
.game-card-plus {
  display: block;
  font-size: 3rem;
  margin-bottom: 8px;
  opacity: 0.5;
}
.empty-state {
  text-align: center;
  padding: 80px 0;
}
.empty-state h2 {
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.empty-state p {
  color: var(--text-muted);
  margin-bottom: 32px;
}
.active-generation {
  background: var(--bg-card);
  border: 1px solid var(--gold-dark);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}
.active-generation h3 {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 12px;
}

/* ===== Generate Page Additions ===== */
.entitlement-status {
  text-align: center;
  padding: 16px 0;
}
.payment-required {
  text-align: center;
  padding: 60px 0;
}
.payment-required h2 {
  color: var(--gold);
  margin-bottom: 12px;
}
.payment-required p {
  color: var(--text-secondary);
}
.file-limit-notice {
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid var(--gold-dark);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.drop-zone-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 8px;
  display: none;
}
.error-refund {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
  font-style: italic;
}

/* ===== Terms Page ===== */
.terms-section { padding-top: 40px; }
.terms-content {
  max-width: 800px;
  margin: 0 auto;
}
.terms-content h1 {
  color: var(--gold);
  font-size: 2rem;
  margin-bottom: 8px;
}
.terms-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 40px;
}
.terms-content h2 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin: 32px 0 12px;
}
.terms-content p, .terms-content li {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}
.terms-content ul {
  list-style: disc;
  padding-left: 24px;
  margin: 8px 0 16px;
}

/* ===== FAQ Section ===== */
.faq-section { background: var(--bg-secondary); }
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}
.faq-item h3 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 8px;
}
.faq-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== Footer Links ===== */
.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 12px;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-links a:hover {
  color: var(--gold);
}

/* ===== Loading / Utility ===== */
.loading-text {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
}

/* ===== About Page ===== */
.about-content {
  max-width: 750px;
  margin: 0 auto;
}
.about-content h1 {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 2rem;
  margin-bottom: 32px;
}
.about-story h2 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin: 28px 0 12px;
}
.about-story h2:first-child { margin-top: 0; }
.about-story p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

/* ===== Contact Page ===== */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
}
.contact-content h1 {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 2rem;
  margin-bottom: 8px;
}
.contact-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 0.95rem;
}
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 32px;
}
.contact-form .form-field {
  margin-bottom: 16px;
  text-align: left;
}
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.contact-form select {
  appearance: auto;
}
.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold-dark);
}
.contact-alt {
  text-align: center;
  padding: 24px 0;
}
.contact-alt h3 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 8px;
}
.contact-alt p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

/* ===== T&C Agreement Modal ===== */
.tc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}
.tc-modal-content {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.tc-modal-content h2 {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1.4rem;
  margin-bottom: 4px;
}
.tc-modal-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.tc-modal-scroll {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 20px;
  background: var(--bg-primary);
  max-height: 40vh;
  margin-bottom: 16px;
  font-size: 0.85rem;
  line-height: 1.7;
}
.tc-modal-scroll h1 { display: none; }
.tc-modal-scroll .terms-updated { display: none; }
.tc-modal-scroll h2 {
  font-family: var(--font-body);
  color: var(--text-primary);
  font-size: 1rem;
  margin: 20px 0 8px;
}
.tc-modal-scroll h2:first-of-type { margin-top: 0; }
.tc-modal-scroll p, .tc-modal-scroll li {
  color: var(--text-secondary);
}
.tc-modal-scroll ul {
  list-style: disc;
  padding-left: 20px;
  margin: 6px 0 12px;
}
.tc-modal-agree {
  margin-bottom: 16px;
}
.tc-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.tc-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}
.tc-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.tc-modal-btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--font-body);
  display: inline-block;
  width: auto;
  height: auto;
  line-height: 1.4;
  box-sizing: border-box;
  transform: none;
}
.tc-modal-btn:hover {
  transform: none;
  box-shadow: none;
}
#tc-proceed:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== Profile Page ===== */
.profile-page {
  max-width: 700px;
  margin: 0 auto;
  padding-bottom: 60px;
}
.profile-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--gold);
  padding: 32px 0 8px;
}
.profile-section {
  margin-top: 32px;
}
.profile-section-title {
  font-size: 1rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 12px;
}
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
}
.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.profile-row:last-child { border-bottom: none; }
.profile-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.profile-value {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}
.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.plan-name {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.plan-price {
  color: var(--gold);
  font-size: 1rem;
  font-weight: 600;
}
.plan-price-muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.plan-status {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.plan-status.active {
  background: rgba(64, 192, 96, 0.12);
  border: 1px solid var(--success);
  color: var(--success);
}
.plan-status.canceling {
  background: rgba(212, 168, 67, 0.12);
  border: 1px solid var(--gold);
  color: var(--gold);
}
.plan-usage {
  margin-bottom: 20px;
}
.usage-bar-container {
  background: var(--bg-primary);
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}
.usage-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 6px;
  transition: width 0.5s ease;
  min-width: 2px;
}
.usage-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.usage-text strong {
  color: var(--gold-light);
}
.plan-details {
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 12px;
}
.plan-cancel-note {
  color: var(--gold);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(212, 168, 67, 0.06);
  border-radius: 8px;
}
.plan-empty-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 8px 0;
}
.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-action-btn {
  padding: 10px 24px;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}
.btn-danger-outline {
  border-color: var(--danger) !important;
  color: var(--danger) !important;
}
.btn-danger-outline:hover {
  background: rgba(224, 64, 64, 0.1);
}

/* ===== Community Banner ===== */
.community-banner-section {
  background: var(--bg-secondary);
}
.community-banner {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
  border: 1px solid var(--gold-dark);
  border-radius: 16px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.community-banner h2 {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.community-banner p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 500px;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .community-banner { flex-direction: column; text-align: center; padding: 28px; }
}

/* ===== Discord Link Page ===== */
.discord-link-page {
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: 60px;
}
.discord-status-title {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.discord-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.6;
}
.discord-code-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--gold-dark);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px 0;
}
.discord-code {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 2px;
}
.discord-expires {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.discord-expires span {
  color: var(--gold);
  font-family: 'Courier New', monospace;
  font-weight: 600;
}
.discord-steps {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.9;
}
.discord-steps li {
  margin-bottom: 6px;
}
.discord-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 16px;
  line-height: 1.6;
}
.discord-linked-at {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}
.inline-code {
  background: var(--bg-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--gold-light);
}

/* ===== Responsive: Nav ===== */
@media (max-width: 768px) {
  .nav-links { gap: 12px; font-size: 0.8rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .dashboard-header { flex-direction: column; align-items: flex-start; }
  .games-grid { grid-template-columns: 1fr; }
}
