/* ============================================================
   MAIN STYLESHEET - Steam-like Game Platform
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

fieldset {
  border: none;
}

/* Remove default focus outline, we add custom ones */
:focus {
  outline: none;
}

/* Provide visible focus for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   ------------------------------------------------------------ */
:root {
  /* Core palette */
  --color-background: #171a21;
  --color-card: #1b2838;
  --color-hover: #2a475e;
  --color-accent: #66c0f4;
  --color-accent-dark: #4fa3d1;
  --color-accent-glow: rgba(102, 192, 244, 0.3);
  --color-text: #ffffff;
  --color-text-secondary: #c7d5e0;
  --color-text-muted: #8b98a5;

  /* Semantic colors */
  --color-success: #4caf50;
  --color-warning: #ff9800;
  --color-error: #f44336;
  --color-info: #2196f3;

  /* Surfaces */
  --color-surface: #1b2838;
  --color-surface-raised: #1e2a3a;
  --color-surface-overlay: rgba(0, 0, 0, 0.7);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-light: rgba(255, 255, 255, 0.12);

  /* Sidebar */
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 60px;
  --sidebar-bg: #1b2838;
  --sidebar-item-hover: #2a475e;
  --sidebar-item-active: rgba(102, 192, 244, 0.15);

  /* Header / Topbar */
  --topbar-height: 52px;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-size-xs: 0.7rem;
  --font-size-sm: 0.8rem;
  --font-size-base: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing */
  --space-xxs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Layout */
  --content-max-width: 1400px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px var(--color-accent-glow);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Z-index scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-sidebar: 300;
  --z-overlay: 400;
  --z-modal: 500;
  --z-toast: 600;
}

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

/* ------------------------------------------------------------
   Base Typography
   ------------------------------------------------------------ */
body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-secondary);
  background-color: var(--color-background);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-md); }

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

small {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

strong, b {
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

code {
  font-family: var(--font-family-mono);
  background: var(--color-surface);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  color: var(--color-accent);
}

/* ------------------------------------------------------------
   Layout System
   ------------------------------------------------------------ */

/* Main app layout wrapper */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Content area next to sidebar */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
  padding-top: var(--topbar-height);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#app {
  flex: 1;
  width: 100%;
}

/* Container */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: 960px;
}

.container--wide {
  max-width: 1600px;
}

/* Flexbox utilities */
.flex { display: flex; }
.flex-inline { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow { flex-grow: 1; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Grid utilities */
.grid {
  display: grid;
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Page sections */
.page-section {
  padding: var(--space-2xl) 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
}

/* ------------------------------------------------------------
   Sidebar Navigation
   Fixed left sidebar — Steam-style dark navigation
   ------------------------------------------------------------ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  z-index: var(--z-sidebar);
  transition: width var(--transition-base);
  overflow: hidden;
}

/* ── Sidebar Header (logo + brand) ── */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  padding: 0 var(--space-md);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.sidebar-logo img {
  flex-shrink: 0;
}

.sidebar-brand {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--transition-base);
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

/* ── Navigation List ── */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-sm) 0;
  list-style: none;
}

.nav-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-sm) var(--space-md);
  border: none;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  margin: 2px var(--space-sm);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  gap: var(--space-sm);
  text-decoration: none;
}

.nav-item:hover {
  background: var(--sidebar-item-hover);
  color: var(--color-text);
}

.nav-item.active,
.nav-item[data-route].active {
  background: var(--sidebar-item-active);
  color: var(--color-accent);
}

.nav-icon {
  font-size: 1.2rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.nav-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity var(--transition-base);
}

/* ── Sidebar Footer — her zaman altta ── */
.sidebar-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-sm) var(--space-md);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-footer .nav-item {
  margin: 1px 0;
  font-size: var(--font-size-sm);
}

.sidebar-footer .nav-item.nav-admin {
  color: var(--color-accent);
  opacity: 0.8;
}

.sidebar-footer .nav-item.nav-admin:hover {
  opacity: 1;
  background: var(--sidebar-item-hover);
}

/* Sosyal medya bağlantıları — footer içinde */
.sidebar-social {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
  justify-content: center;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-xs);
  padding-top: var(--space-sm);
}

.sidebar-social a {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  transition: color var(--transition-fast);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
}

.sidebar-social a:hover {
  color: var(--color-accent);
  background: var(--sidebar-item-hover);
}

/* Collapsed state (tablet) */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-divider,
.sidebar.collapsed .sidebar-social {
  opacity: 0;
  pointer-events: none;
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 0;
}

.sidebar.collapsed .sidebar-logo {
  justify-content: center;
  padding: 0;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: var(--space-sm);
  margin: 2px var(--space-xs);
}

.sidebar.collapsed .sidebar-footer {
  padding: var(--space-sm) var(--space-xs);
}

.sidebar.collapsed .sidebar-footer .nav-item {
  margin: 1px auto;
  width: 40px;
}

/* Collapsed state shows social icons without text */
.sidebar.collapsed .sidebar-footer .sidebar-social {
  flex-direction: column;
}

/* Hamburger toggle button (visible on mobile/tablet) */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: calc(var(--z-sidebar) + 1);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-card);
  color: var(--color-text);
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-toggle:hover {
  background: var(--color-hover);
}

/* Mobile overlay behind sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-surface-overlay);
  z-index: calc(var(--z-sidebar) - 1);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.sidebar-overlay.active {
  opacity: 1;
}

/* ------------------------------------------------------------
   Header / Topbar
   ------------------------------------------------------------ */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  z-index: var(--z-sticky);
  transition: left var(--transition-base);
}

.sidebar.collapsed ~ .topbar {
  left: var(--sidebar-collapsed-width);
}

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.hamburger:hover {
  background: var(--color-hover);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-fast);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Topbar logo */
.topbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--font-size-base);
}

.topbar-logo img {
  border-radius: var(--radius-sm);
}

/* Topbar spacer */
.topbar-spacer {
  flex: 1;
}

/* Topbar search button */
.topbar-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 1.1rem;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.topbar-search-btn:hover {
  background: var(--color-hover);
  color: var(--color-text);
}

/* Breadcrumb in topbar */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.breadcrumb-item {
 color: var(--color-text-muted);
 transition: color var(--transition-fast);
}

.breadcrumb-item:hover {
 color: var(--color-text);
}

.breadcrumb-item.active {
 color: var(--color-text-secondary);
}

.breadcrumb-separator {
 font-size: var(--font-size-xs);
 opacity: 0.5;
}

/* ------------------------------------------------------------
   Hero Section
   Full-width hero with gradient overlay
   ------------------------------------------------------------ */
.hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  user-select: none;
  line-height: 1.4;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary - Accent colored button */
.btn-primary {
  background: var(--color-accent);
  color: var(--color-background);
}

.btn-primary:hover {
  background: #7dc8f7;
  box-shadow: var(--shadow-glow);
}

.btn-primary:active {
  background: var(--color-accent-dark);
}

/* Secondary - Outline / ghost button */
.btn-secondary {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-light);
}

.btn-secondary:hover {
  background: var(--color-hover);
  color: var(--color-text);
  border-color: var(--color-hover);
}

/* Ghost button (for table actions) */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-ghost:hover {
  background: var(--color-hover);
  color: var(--color-text);
}

/* Small button */
.btn-sm {
  padding: 6px 14px;
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

/* Large button */
.btn-lg {
  padding: 14px 28px;
  font-size: var(--font-size-lg);
  border-radius: var(--radius-lg);
}

/* Icon-only button */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
}

/* Disabled state */
.btn:disabled,
.btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button group */
.btn-group {
  display: inline-flex;
}

.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.btn-group .btn:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.btn-group .btn + .btn {
  margin-left: -1px;
}

/* ------------------------------------------------------------
   Game Cards
   Display game info: image, title, badges, actions
   ------------------------------------------------------------ */
.game-card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  position: relative;
}

.game-card:hover {
  transform: scale(1.03);
  box-shadow:
    var(--shadow-lg),
    0 0 30px var(--color-accent-glow);
  border-color: rgba(102, 192, 244, 0.2);
}

.game-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-background);
}

.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.game-card:hover .game-card-image img {
  transform: scale(1.05);
}

/* Card overlay */
.game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
}

.game-card:hover .game-card-overlay {
  opacity: 1;
}

/* Platform badges on card image */
.game-card-platform {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

/* Card body */
.game-card-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-card-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card-category {
  font-size: var(--font-size-xs);
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-sm);
}

.game-card-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.game-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.game-card-tags {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  padding: 0 var(--space-md) var(--space-sm);
}

.game-card-rating,
.game-card-downloads,
.game-card-price {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Card footer with actions */
.game-card-footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md) var(--space-md);
  border-top: 1px solid var(--color-border);
}

/* ------------------------------------------------------------
   Modal
   ------------------------------------------------------------ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--color-surface-overlay);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-xl);
}

.modal-backdrop.active .modal {
  transform: scale(1) translateY(0);
}

.modal--lg {
  max-width: 720px;
}

.modal--sm {
  max-width: 400px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.modal-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 1.2rem;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.modal-close:hover {
  background: var(--color-hover);
  color: var(--color-text);
}

.modal-body {
  padding: var(--space-lg);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--color-border);
}

/* ------------------------------------------------------------
   Form Inputs
   ------------------------------------------------------------ */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}

.form-input,
.form-textarea,
.form-select,
.input {
  width: 100%;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--color-text);
  font-size: var(--font-size-base);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  outline: none;
}

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

.form-input:focus,
.form-textarea:focus,
.form-select:focus,
.input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.form-input.error,
.form-textarea.error,
.input.error {
  border-color: var(--color-error);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b98a5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-checkbox,
.form-radio {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
}

.form-checkbox input,
.form-radio input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.form-hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--color-error);
  margin-top: var(--space-xs);
}

/* ------------------------------------------------------------
   Tags / Badges
   ------------------------------------------------------------ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 3px 10px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-full);
  background: var(--color-hover);
  color: var(--color-text-secondary);
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.tag:hover {
  background: var(--color-accent);
  color: var(--color-background);
}

.tag--accent {
  background: rgba(102, 192, 244, 0.15);
  color: var(--color-accent);
}

.tag--success {
  background: rgba(76, 175, 80, 0.15);
  color: var(--color-success);
}

.tag--warning {
  background: rgba(255, 152, 0, 0.15);
  color: var(--color-warning);
}

.tag--error {
  background: rgba(244, 67, 54, 0.15);
  color: var(--color-error);
}

.tag--outline {
  background: transparent;
  border: 1px solid var(--color-border-light);
  color: var(--color-text-muted);
}

.tag--lg {
  padding: 5px 14px;
  font-size: var(--font-size-sm);
}

.tag__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  font-size: 10px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.tag__remove:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Badge (used in admin tables) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--color-hover);
  color: var(--color-text-secondary);
}

.badge-accent {
  background: rgba(102, 192, 244, 0.15);
  color: var(--color-accent);
}

/* Form row (admin panel) */
.form-row {
  display: grid;
  gap: 16px;
}

/* Admin panel styles */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.admin-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.admin-section {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.admin-table-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* Table styles (admin panel) */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.table th {
  color: var(--color-text-muted);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--font-size-xs);
}

/* ------------------------------------------------------------
   Breadcrumb
   ------------------------------------------------------------ */
.breadcrumb--standalone {
  padding: var(--space-md) 0;
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-3xl);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--space-xl);
}

.footer-section p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
  max-width: 320px;
  line-height: 1.6;
}

.footer-section h4 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.footer-section ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li a {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
  color: var(--color-text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-xl);
  padding-right: var(--space-xl);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-links a {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  transition: color var(--transition-fast);
}

.social-links a:hover {
  color: var(--color-accent);
}

/* ------------------------------------------------------------
   Skeleton Loading
   Provides placeholder shapes that shimmer while content loads
   ------------------------------------------------------------ */
.skeleton {
  background: var(--color-card);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 100%
  );
  animation: skeleton-shimmer 1.5s infinite;
}

.skeleton--text {
  height: 14px;
  border-radius: var(--radius-sm);
  width: 100%;
}

.skeleton--text-sm {
  height: 10px;
  width: 60%;
}

.skeleton--title {
  height: 22px;
  width: 80%;
  border-radius: var(--radius-sm);
}

.skeleton--avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}

.skeleton--image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
}

.skeleton--card {
  width: 100%;
  border-radius: var(--radius-md);
}

.skeleton--btn {
  height: 38px;
  width: 120px;
  border-radius: var(--radius-md);
}

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

/* ------------------------------------------------------------
   Scrollbar Styling (Dark themed)
   ------------------------------------------------------------ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-background);
}

::-webkit-scrollbar-thumb {
  background: var(--color-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-hover) var(--color-background);
}

/* ------------------------------------------------------------
   Utility Classes
   ------------------------------------------------------------ */

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text colors */
.text-primary { color: var(--color-text); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }

/* Font size utilities */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }

/* Font weight */
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* Truncation */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Spacing utilities */
.m-0 { margin: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.p-0 { padding: 0; }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Border radius */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* Visibility */
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.visible { visibility: visible; }

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

/* Relative positioning */
.relative { position: relative; }

/* Dividers */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-lg) 0;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
  color: var(--color-text-muted);
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.empty-state__description {
  font-size: var(--font-size-sm);
  max-width: 400px;
  margin-bottom: var(--space-lg);
}
