﻿/* Titan Game World - Global Stylesheet */
/* Edge Software | Daryll Clint Anderson | Vista, CA */

:root {
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #12121a;
  --bg-card:       #1a1a27;
  --bg-elevated:   #22223a;
  --accent:        #7c3aed;
  --accent-bright: #9d5cf5;
  --accent-glow:   rgba(124, 58, 237, 0.35);
  --accent-gold:   #f59e0b;
  --text-primary:  #f1f1f5;
  --text-secondary:#a0a0b8;
  --text-muted:    #6060788;
  --border:        rgba(124, 58, 237, 0.2);
  --border-subtle: rgba(255,255,255,0.06);
  --success:       #10b981;
  --error:         #ef4444;
  --warning:       #f59e0b;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     18px;
  --shadow:        0 4px 24px rgba(0,0,0,0.5);
  --shadow-glow:   0 0 40px rgba(124,58,237,0.25);
  --transition:    0.2s ease;
  --font-main:     'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;
  --max-width:     1280px;
  --nav-height:    68px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ====== TYPOGRAPHY ====== */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--text-secondary); }
a  { color: var(--accent-bright); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

/* ====== LAYOUT ====== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.flex    { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.gap-16  { gap: 16px; }
.gap-24  { gap: 24px; }

/* ====== NAVBAR ====== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 800; color: #fff; }
.nav-logo .logo-icon { width: 36px; height: 36px; }
.nav-logo span.accent { color: var(--accent-bright); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; transition: color var(--transition); }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-user { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  border: none; transition: all var(--transition); white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-bright); color: #fff; box-shadow: 0 0 30px var(--accent-glow); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card); color: #fff; border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: #fff; background: var(--bg-elevated); }
.btn-gold { background: var(--accent-gold); color: #000; }
.btn-gold:hover { background: #fbbf24; color: #000; }
.btn-sm { padding: 7px 16px; font-size: 0.875rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-icon { padding: 10px; border-radius: var(--radius-sm); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ====== CARDS ====== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: var(--border); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-body { padding: 20px; }

/* ====== GAME CARD ====== */
.game-card { cursor: pointer; }
.game-card-thumb {
  width: 100%; aspect-ratio: 16/9;
  background: var(--bg-elevated);
  position: relative; overflow: hidden;
}
.game-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.game-card:hover .game-card-thumb img { transform: scale(1.05); }
.game-card-thumb .badge-free {
  position: absolute; top: 10px; right: 10px;
  background: var(--success); color: #fff;
  font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 20px;
}
.game-card-thumb .badge-price {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.75); color: #fff;
  font-size: 0.8rem; font-weight: 700; padding: 4px 10px; border-radius: 20px;
  backdrop-filter: blur(4px);
}
.game-card-info { padding: 14px 16px; }
.game-card-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card-dev   { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 10px; }
.game-card-meta  { display: flex; align-items: center; justify-content: space-between; }
.game-card-platforms { display: flex; gap: 5px; }
.platform-pill {
  font-size: 0.7rem; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; border: 1px solid var(--border);
  color: var(--text-secondary);
}
.platform-pill.edge { border-color: var(--accent); color: var(--accent-bright); }

/* ====== HERO ====== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding-top: var(--nav-height);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,58,237,0.18) 0%, transparent 70%),
              radial-gradient(ellipse 40% 40% at 80% 60%, rgba(124,58,237,0.1) 0%, transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0; opacity: 0.04;
  background-image: linear-gradient(var(--accent) 1px, transparent 1px), linear-gradient(90deg, var(--accent) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(124,58,237,0.15); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 16px;
  font-size: 0.82rem; font-weight: 600; color: var(--accent-bright);
  margin-bottom: 28px;
}
.hero-title { margin-bottom: 20px; }
.hero-title .highlight { color: var(--accent-bright); }
.hero-subtitle { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 36px; max-width: 580px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 60px; }
.hero-stat-num { font-size: 2rem; font-weight: 800; color: #fff; }
.hero-stat-label { font-size: 0.82rem; color: var(--text-secondary); }

/* ====== SECTION HEADER ====== */
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 36px; }
.section-title { font-size: 1.75rem; font-weight: 800; }
.section-title span { color: var(--accent-bright); }

/* ====== GAMES GRID ====== */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

/* ====== FILTERS ====== */
.filter-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-chip {
  padding: 7px 16px; border-radius: 20px;
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
}
.filter-chip:hover, .filter-chip.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.search-input {
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  color: var(--text-primary); border-radius: var(--radius-sm);
  padding: 9px 16px; font-size: 0.9rem;
  transition: border-color var(--transition); outline: none;
  width: 260px;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-secondary); }

/* ====== FORMS ====== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 7px; }
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--bg-elevated);
  border: 1px solid var(--border-subtle); color: var(--text-primary);
  border-radius: var(--radius-sm); padding: 11px 16px; font-size: 0.95rem;
  transition: border-color var(--transition); outline: none; font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-secondary); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { appearance: none; cursor: pointer; }
.form-error { color: var(--error); font-size: 0.8rem; margin-top: 5px; }
.form-help  { color: var(--text-secondary); font-size: 0.8rem; margin-top: 5px; }

/* ====== MODALS ====== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: all var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px; width: 100%; max-width: 480px;
  transform: translateY(20px); transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 24px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 1.5rem; line-height: 1; }

/* ====== BADGES ====== */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.badge-purple { background: rgba(124,58,237,0.2); color: var(--accent-bright); }
.badge-green  { background: rgba(16,185,129,0.2); color: var(--success); }
.badge-red    { background: rgba(239,68,68,0.2); color: var(--error); }
.badge-gold   { background: rgba(245,158,11,0.2); color: var(--accent-gold); }

/* ====== TOAST ====== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 20px;
  min-width: 280px; max-width: 400px;
  box-shadow: var(--shadow); color: var(--text-primary);
  display: flex; align-items: center; gap: 12px;
  transform: translateX(120%); transition: transform 0.3s ease;
}
.toast.show { transform: translateX(0); }
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--error); }

/* ====== PAGE SHELL ====== */
.page-shell { padding-top: var(--nav-height); min-height: 100vh; }
.page-hero { padding: 60px 0 40px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 48px; }
.page-hero-title { font-size: 2.25rem; font-weight: 800; }

/* ====== FOOTER ====== */
.footer { border-top: 1px solid var(--border-subtle); padding: 48px 0 32px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand-desc { color: var(--text-secondary); font-size: 0.9rem; margin-top: 12px; max-width: 280px; }
.footer-col-title { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--text-secondary); font-size: 0.9rem; transition: color var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; color: var(--text-secondary); font-size: 0.82rem; padding-top: 24px; border-top: 1px solid var(--border-subtle); }

/* ====== LOADING ====== */
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card) 50%, var(--bg-elevated) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ====== TABS ====== */
.tabs { display: flex; border-bottom: 1px solid var(--border-subtle); margin-bottom: 32px; gap: 4px; }
.tab { padding: 12px 20px; background: none; border: none; color: var(--text-secondary); font-size: 0.95rem; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all var(--transition); }
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent-bright); border-bottom-color: var(--accent); }

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .filter-bar { gap: 8px; }
  .search-input { width: 100%; }
}
