/* ========================================
   GAMEMASTER — Main Stylesheet
   Modern dark theme with purple/blue accents
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #0f1422;
  --bg-card: #141b2e;
  --bg-card-hover: #1a2338;
  --bg-elevated: #1e2844;
  --text-primary: #edf2f7;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #00d4ff;
  --accent-hover: #00b8e0;
  --accent-glow: rgba(0, 212, 255, 0.25);
  --premium: #ffd700;
  --premium-glow: rgba(255, 215, 0, 0.2);
  --success: #43b581;
  --danger: #ef4444;
  --warning: #fbbf24;
  --border: rgba(0, 212, 255, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* --- Navbar --- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 15, 23, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.nav-container { display: flex; align-items: center; justify-content: space-between; }

.nav-brand {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1.25rem; font-weight: 700; color: var(--text-primary);
}
.nav-brand:hover { color: var(--text-primary); }
.brand-logo { height: 48px; width: auto; }
.brand-text { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-logo { height: 40px; width: auto; }
.footer-brand-text { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; }

.nav-links {
  display: flex; align-items: center; gap: 1rem;
}

.nav-link {
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
  padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-card); }

.nav-user {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--text-secondary); font-size: 0.9rem;
}
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; }

.nav-toggle {
  display: none; background: none; border: none;
  color: var(--text-primary); font-size: 1.5rem; cursor: pointer;
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.625rem 1.25rem; border: none;
  border-radius: var(--radius-sm); font-family: var(--font);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition); text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-full { width: 100%; }

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); color: white; box-shadow: 0 4px 16px var(--accent-glow); }

.btn-accent { background: var(--premium); color: #1a1a2e; }
.btn-accent:hover { background: #e09418; color: #1a1a2e; box-shadow: 0 4px 16px var(--premium-glow); }

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--text-muted); background: var(--bg-card); }

.btn-icon { font-size: 1.1em; }

/* --- Sections --- */
.section { padding: 5rem 0; }
.section-dark { background: var(--bg-secondary); }

.section-header {
  text-align: center; max-width: 600px; margin: 0 auto 3rem;
}
.section-header h2 { font-size: 2.25rem; font-weight: 800; margin-bottom: 0.75rem; }
.section-header p { color: var(--text-secondary); font-size: 1.1rem; }

/* --- Hero --- */
.hero {
  padding: 6rem 0 4rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
}

.hero-container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }

.hero-badge {
  display: inline-block; background: var(--bg-card);
  border: 1px solid var(--border); padding: 0.4rem 1rem;
  border-radius: 999px; font-size: 0.85rem; color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero-content h1 {
  font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 1.25rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #00e5ff, var(--premium));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 2rem;
  max-width: 500px;
}

.hero-buttons { display: flex; gap: 1rem; margin-bottom: 3rem; }

.hero-stats { display: flex; gap: 3rem; }
.stat-number { display: block; font-size: 1.75rem; font-weight: 800; color: var(--accent); }
.stat-label { color: var(--text-muted); font-size: 0.85rem; }

/* --- Discord Embed Preview --- */
.discord-embed-preview {
  background: #2b2d31; border-radius: var(--radius);
  padding: 1rem 1rem 1rem 1.25rem; position: relative;
  box-shadow: var(--shadow);
}
.embed-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent); border-radius: var(--radius) 0 0 var(--radius);
}
.embed-content { padding-left: 0.5rem; }
.embed-title { font-weight: 700; margin-bottom: 0.5rem; font-size: 1rem; }
.embed-desc { color: #b5bac1; font-size: 0.9rem; margin-bottom: 0.75rem; }
.embed-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.embed-btn {
  padding: 0.3rem 0.8rem; border-radius: 3px; font-size: 0.8rem;
  font-weight: 500; cursor: default;
}
.embed-btn.blue { background: var(--accent); color: white; }
.embed-btn.green { background: var(--success); color: white; }
.embed-btn.red { background: var(--danger); color: white; }

/* --- Features Grid --- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  transition: all var(--transition);
}
.feature-card:hover {
  background: var(--bg-card-hover); border-color: var(--accent);
  transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* --- Games Grid --- */
.games-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
}

.game-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; text-align: center;
  position: relative; transition: all var(--transition);
}
.game-card:hover {
  background: var(--bg-card-hover); transform: translateY(-2px);
}
.game-card.premium { border-color: rgba(245, 166, 35, 0.3); }
.game-card.premium:hover { border-color: var(--premium); }

.game-badge {
  position: absolute; top: 0.75rem; right: 0.75rem;
  font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.game-card.free .game-badge { background: rgba(67, 181, 129, 0.15); color: var(--success); }
.game-card.premium .game-badge { background: var(--premium-glow); color: var(--premium); }

.game-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.game-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.game-card p { color: var(--text-secondary); font-size: 0.8rem; }

/* --- CTA Section --- */
.cta-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 4rem; text-align: center;
}
.cta-card h2 { font-size: 2rem; margin-bottom: 0.75rem; }
.cta-card p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 2rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; }

/* --- Premium Page --- */
.premium-hero { padding-bottom: 2rem; }
.premium-hero .section-header h1 { font-size: 3rem; }

.premium-features {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.premium-feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; text-align: center;
}
.pf-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.premium-feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.premium-feature-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* --- Pricing Grid --- */
.pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
  max-width: 1000px; margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem; text-align: center;
  position: relative; transition: all var(--transition);
}
.pricing-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.pricing-card.popular { border-color: var(--accent); box-shadow: 0 0 40px rgba(0, 212, 255, 0.15); }
.pricing-card.lifetime { border-color: var(--premium); }
.pricing-card.lifetime:hover { box-shadow: 0 0 40px var(--premium-glow); }

.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: white; padding: 0.25rem 1rem;
  border-radius: 999px; font-size: 0.75rem; font-weight: 700;
}
.lifetime-badge { background: var(--premium) !important; color: #1a1a2e !important; }

.pricing-card h3 { font-size: 1.2rem; margin-bottom: 1rem; margin-top: 0.5rem; }

.price { margin-bottom: 1.5rem; }
.price-amount { font-size: 2.5rem; font-weight: 800; }
.price-period { display: block; color: var(--text-muted); font-size: 0.85rem; }

.pricing-features { list-style: none; text-align: left; margin-bottom: 2rem; }
.pricing-features li {
  padding: 0.4rem 0; font-size: 0.9rem; color: var(--text-secondary);
}

.payment-methods {
  text-align: center; margin-top: 3rem;
  color: var(--text-muted); font-size: 0.9rem;
}
.payment-icons { display: flex; gap: 1.5rem; justify-content: center; margin-top: 0.5rem; }
.payment-icon { background: var(--bg-card); padding: 0.5rem 1rem; border-radius: var(--radius-sm); }

/* --- Modal --- */
.modal { display: none; position: fixed; inset: 0; z-index: 200; align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.modal-content {
  position: relative; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem; max-width: 500px; width: 90%;
  max-height: 70vh; overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.modal-close {
  background: none; border: none; color: var(--text-secondary);
  font-size: 1.5rem; cursor: pointer;
}

.server-option {
  display: flex; align-items: center; gap: 0.75rem;
  width: 100%; padding: 0.75rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-secondary);
  color: var(--text-primary); font-family: var(--font); font-size: 0.95rem;
  cursor: pointer; transition: all var(--transition); margin-bottom: 0.5rem;
}
.server-option:hover { border-color: var(--accent); background: var(--bg-elevated); }
.server-icon { width: 36px; height: 36px; border-radius: 50%; }
.server-icon.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: white; font-weight: 700;
}

/* --- Payment Method Selector --- */
.payment-method-list { display: flex; flex-direction: column; gap: 0.5rem; }
.payment-method-option {
  display: flex; align-items: center; gap: 1rem;
  width: 100%; padding: 1rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-secondary);
  color: var(--text-primary); font-family: var(--font);
  cursor: pointer; transition: all var(--transition); text-align: left;
}
.payment-method-option:hover { border-color: var(--accent); background: var(--bg-elevated); }
.pm-icon { font-size: 1.5rem; }
.pm-info { display: flex; flex-direction: column; }
.pm-info strong { font-size: 0.95rem; }
.pm-info small { color: var(--text-secondary); font-size: 0.8rem; margin-top: 0.15rem; }

/* --- Checkout --- */
.checkout-card {
  max-width: 500px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.5rem;
}
.checkout-header { text-align: center; margin-bottom: 2rem; }
.summary-row {
  display: flex; justify-content: space-between; padding: 0.75rem 0;
  border-bottom: 1px solid var(--border); font-size: 0.95rem;
}
.summary-row.total { border-bottom: none; font-size: 1.2rem; font-weight: 700; }
.checkout-info {
  background: var(--bg-secondary); border-radius: var(--radius-sm);
  padding: 1rem; margin: 1.5rem 0; font-size: 0.9rem;
  color: var(--text-secondary);
}
.checkout-info p { margin-bottom: 0.25rem; }

/* --- Success / Error --- */
.success-card, .error-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 3rem; text-align: center;
}
.success-icon, .error-icon { font-size: 4rem; margin-bottom: 1rem; }
.success-features { text-align: left; margin: 2rem auto; max-width: 300px; }
.success-features li { padding: 0.3rem 0; }
.success-buttons { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; }

/* --- Legal --- */
.legal-content h2 { font-size: 1.2rem; margin: 2rem 0 0.75rem; }
.legal-content p, .legal-content li { color: var(--text-secondary); font-size: 0.95rem; }
.legal-content ul { padding-left: 1.5rem; margin: 0.5rem 0; }

/* --- Server Grid (Dashboard overview) --- */
.server-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem;
}
.server-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; text-align: center;
  transition: all var(--transition);
}
.server-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.server-card-icon {
  width: 64px; height: 64px; border-radius: 50%;
  margin: 0 auto 1rem; object-fit: cover;
}
.server-card-icon.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: white; font-size: 1.5rem; font-weight: 700;
}
.server-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.badge-premium { background: rgba(255, 215, 0, 0.15); color: var(--premium); border: 1px solid rgba(255, 215, 0, 0.3); }

/* --- Spinner --- */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: white;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Footer --- */
.footer {
  background: var(--bg-secondary); border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
.footer-col h4 { margin-bottom: 1rem; font-size: 1rem; }
.footer-col p { color: var(--text-secondary); font-size: 0.9rem; }
.footer-col a {
  display: block; color: var(--text-secondary); font-size: 0.9rem;
  padding: 0.2rem 0; transition: color var(--transition);
}
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  text-align: center; color: var(--text-muted); font-size: 0.85rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; text-align: center; }
  .hero-content h1 { font-size: 2.5rem; }
  .hero-subtitle { margin: 0 auto 2rem; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .games-grid { grid-template-columns: repeat(3, 1fr); }
  .premium-features { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-secondary); padding: 1rem; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .features-grid { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .premium-features { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-content h1 { font-size: 2rem; }
  .section { padding: 3rem 0; }
}

@media (max-width: 480px) {
  .games-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; }
  .hero-stats { flex-direction: column; gap: 1rem; }
  .cta-buttons { flex-direction: column; }
}
