/* ========================================
   VARIABLES & RESET
   ======================================== */
:root {
  --ink: #1a0a10;
  --parchment: #fdf5f8;
  --parchment-dark: #fce8f0;
  --gold: #c0577e;
  --gold-light: #e8a0b8;
  --gold-pale: #fff0f5;
  --copper: #7c2d52;
  --ember: #d4450c;
  --forest: #3d1028;
  --forest-light: #7c2d52;
  --slate: #3d1a28;
  --mist: #9d6b80;
  --white: #ffffff;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Literata', Georgia, serif;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow: 0 2px 12px rgba(26, 10, 16, 0.12);
  --shadow-lg: 0 8px 32px rgba(26, 10, 16, 0.18);

  --nav-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.section-title em {
  font-style: italic;
  color: var(--gold);
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-dark {
  background: var(--ink);
  color: var(--parchment);
}

.section-dark .section-title { color: var(--parchment); }
.section-dark .link-more { color: var(--gold-light); }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1rem;
}

.link-more {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.95rem;
  white-space: nowrap;
  transition: color 0.2s;
}
.link-more:hover { color: var(--copper); }

.text-center { text-align: center; }

.hidden { display: none !important; }

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 146, 42, 0.2);
  transition: box-shadow 0.3s;
}

.nav.scrolled { box-shadow: var(--shadow); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-logo-symbol {
  font-size: 1.4rem;
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 0.2rem;
  flex: 1;
}

.nav-links a {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  color: var(--slate);
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--gold);
  background: var(--gold-pale);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.nav-burger {
  display: none;
  font-size: 1.4rem;
  color: var(--ink);
  margin-left: auto;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-primary:hover { background: var(--copper); border-color: var(--copper); }

.btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold-pale); }

.btn-ghost {
  background: transparent;
  color: var(--slate);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--gold); background: var(--gold-pale); }

.btn-danger {
  background: var(--ember);
  color: white;
  border-color: var(--ember);
}

.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }

/* ========================================
   HERO
   ======================================== */
.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, #2d1a05 0%, #1a1208 60%, #0d0a06 100%);
}

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 60%, rgba(201, 146, 42, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 80% 30%, rgba(212, 69, 12, 0.1) 0%, transparent 70%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-light);
  opacity: 0;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-120px) scale(0.3); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fade-up 0.8s ease 0.2s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--parchment);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fade-up 0.8s ease 0.4s forwards;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-light);
  display: block;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(245, 240, 232, 0.6);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fade-up 0.8s ease 0.6s forwards;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-up 0.8s ease 0.8s forwards;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(245, 240, 232, 0.4);
  font-size: 1.5rem;
  animation: bounce 2s ease infinite;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ========================================
   ABOUT
   ======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p { color: var(--slate); margin-bottom: 1rem; }

.about-details { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }

.about-detail {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.detail-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }

.about-detail strong { display: block; font-family: var(--font-display); }
.about-detail span { font-size: 0.9rem; color: var(--mist); }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background: var(--parchment-dark);
  border: 1px solid rgba(201, 146, 42, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ========================================
   GAME CARDS
   ======================================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.game-card {
  background: rgba(245, 240, 232, 0.08);
  border: 1px solid rgba(245, 240, 232, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.game-card-img {
  height: 180px;
  background: var(--slate) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.game-card-placeholder { font-size: 3rem; }

.game-status-badge {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-prototype { background: rgba(201, 146, 42, 0.9); color: white; }
.status-edition { background: rgba(74, 138, 94, 0.9); color: white; }
.status-publie { background: rgba(45, 90, 61, 1); color: white; }

.game-card-body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.game-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--parchment);
}

.game-author { font-size: 0.85rem; color: var(--gold-light); }

.game-desc { font-size: 0.875rem; color: rgba(245, 240, 232, 0.6); flex: 1; }

.game-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }

.tag {
  background: rgba(201, 146, 42, 0.15);
  border: 1px solid rgba(201, 146, 42, 0.3);
  color: var(--gold-light);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* ========================================
   EVENT CARDS
   ======================================== */
.events-list { display: flex; flex-direction: column; gap: 1rem; }

.event-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--parchment-dark);
  border: 1px solid rgba(201, 146, 42, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}

.event-card:hover { box-shadow: var(--shadow); }

.event-date {
  flex-shrink: 0;
  width: 56px;
  text-align: center;
  background: var(--gold);
  color: white;
  border-radius: var(--radius);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
}

.event-day { font-family: var(--font-display); font-size: 1.6rem; font-weight: 900; line-height: 1; }
.event-month { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }

.event-info { flex: 1; }
.event-info h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.3rem; }
.event-location { font-size: 0.875rem; color: var(--mist); }

/* ========================================
   CTA & SOCIAL
   ======================================== */
.section-cta {
  background: linear-gradient(135deg, var(--forest) 0%, #1a3d26 100%);
  color: var(--parchment);
}
.section-cta .section-title { color: var(--parchment); }

.cta-sub {
  color: rgba(245, 240, 232, 0.7);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-link {
  padding: 0.7rem 1.5rem;
  border: 2px solid rgba(245, 240, 232, 0.3);
  border-radius: var(--radius);
  color: var(--parchment);
  font-family: var(--font-display);
  font-weight: 700;
  transition: all 0.2s;
}
.social-link:hover {
  background: rgba(245, 240, 232, 0.1);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--ink);
  color: var(--parchment);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer p, .footer ul {
  font-size: 0.9rem;
  color: rgba(245, 240, 232, 0.6);
  margin-top: 0.5rem;
}

.footer ul { display: flex; flex-direction: column; gap: 0.4rem; }
.footer a:hover { color: var(--gold-light); }

.footer-bottom {
  border-top: 1px solid rgba(245, 240, 232, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(245, 240, 232, 0.3);
}

/* ========================================
   SKELETON LOADING
   ======================================== */
.skeleton-card {
  height: 280px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg,
    rgba(245, 240, 232, 0.05) 25%,
    rgba(245, 240, 232, 0.1) 50%,
    rgba(245, 240, 232, 0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty-state {
  color: var(--mist);
  font-style: italic;
  padding: 2rem;
  text-align: center;
}

/* ========================================
   FORMS
   ======================================== */
.form-group { margin-bottom: 1.25rem; }

label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--slate);
}

input, textarea, select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid var(--parchment-dark);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
}

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

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

.form-hint { font-size: 0.8rem; color: var(--mist); margin-top: 0.3rem; }

/* ========================================
   AVATAR UPLOAD
   ======================================== */
.avatar-upload {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  background: var(--parchment-dark);
}

/* ========================================
   MECHANIC CHECKBOXES
   ======================================== */
.mechanics-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mechanic-toggle {
  padding: 0.35rem 0.8rem;
  border: 2px solid var(--parchment-dark);
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--white);
  color: var(--slate);
}

.mechanic-toggle.selected {
  border-color: var(--gold);
  background: var(--gold-pale);
  color: var(--copper);
  font-weight: 700;
}

/* ========================================
   IMAGE UPLOAD
   ======================================== */
.upload-zone {
  border: 2px dashed var(--parchment-dark);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--mist);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--gold);
  background: var(--gold-pale);
  color: var(--copper);
}

.upload-zone input { display: none; }

/* ========================================
   DASHBOARD
   ======================================== */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--nav-h));
  margin-top: var(--nav-h);
}

.sidebar {
  background: var(--ink);
  color: var(--parchment);
  padding: 2rem 0;
  border-right: 1px solid rgba(201, 146, 42, 0.15);
}

.sidebar-user {
  padding: 1rem 1.5rem 2rem;
  border-bottom: 1px solid rgba(245, 240, 232, 0.1);
  margin-bottom: 1rem;
}

.sidebar-user img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  margin-bottom: 0.5rem;
}

.sidebar-user strong { font-family: var(--font-display); display: block; }
.sidebar-user span { font-size: 0.8rem; color: var(--gold-light); }

.sidebar-nav { display: flex; flex-direction: column; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: rgba(245, 240, 232, 0.7);
  font-size: 0.9rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
  color: var(--gold-light);
  background: rgba(201, 146, 42, 0.08);
  border-left-color: var(--gold);
}

.dashboard-main { padding: 2.5rem; background: var(--parchment); }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--parchment-dark);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
}

/* ========================================
   TABLES
   ======================================== */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 2px solid var(--parchment-dark);
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mist);
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--parchment-dark);
  vertical-align: middle;
}

tr:hover td { background: var(--gold-pale); }

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 18, 8, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: var(--parchment);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h2 { font-family: var(--font-display); font-size: 1.4rem; }

.modal-close {
  font-size: 1.5rem;
  color: var(--mist);
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
}
.modal-close:hover { color: var(--ink); }

/* ========================================
   ALERT / TOAST
   ======================================== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--ink);
  color: var(--parchment);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  max-width: 360px;
  animation: slide-in-right 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast.success { border-left: 4px solid var(--forest-light); }
.toast.error { border-left: 4px solid var(--ember); }

@keyframes slide-in-right {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-stats { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }

  .nav.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--parchment);
    padding: 1rem;
    border-bottom: 1px solid var(--parchment-dark);
    box-shadow: var(--shadow);
  }

  .about-stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(2.5rem, 14vw, 5rem); }
}

@media (max-width: 480px) {
  .games-grid { grid-template-columns: 1fr; }
  .event-card { flex-direction: column; }
}
