/* Gaming CMS - Moderne mørk tema (Flux Host-inspireret) */
:root {
  --bg-dark: #0d0f14;
  --bg-card: #141822;
  --bg-elevated: #1a1e2a;
  --border: rgba(255, 255, 255, 0.06);
  --text: #e8eaed;
  --text-muted: #9aa0a6;
  --accent: #00d4aa;
  --accent-hover: #00f5c4;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --steam: #1b2838;
  --steam-light: #2a475e;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --font-sans: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

/* Baggrund med subtil gradient/grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 212, 170, 0.08), transparent),
    linear-gradient(180deg, var(--bg-dark) 0%, #0a0c10 100%);
  pointer-events: none;
  z-index: 0;
}

.wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav a:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

/* Knapper */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

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

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

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px rgba(0, 212, 170, 0.35);
}

.btn-steam {
  background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-steam:hover {
  background: linear-gradient(135deg, #2a475e 0%, #3d5a80 100%);
  box-shadow: 0 4px 20px rgba(42, 71, 94, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

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

/* Hero */
.hero {
  padding: 80px 0 100px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 strong {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: rgba(0, 212, 170, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Grid */
.grid {
  display: grid;
  gap: 24px;
}

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

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-info {
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 170, 0.25);
  color: var(--accent-hover);
}

/* Dashboard */
.dashboard-header {
  padding: 32px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-dim);
}

.profile-info h2 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.profile-info .steam-id {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Dashboard stats/grid */
.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Footer */
.site-footer {
  padding: 40px 0 24px;
  margin-top: 60px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Util */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }

@media (max-width: 640px) {
  .hero { padding: 48px 0 64px; }
  .profile-card { flex-direction: column; text-align: center; }
}

.page-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 16px; }
.breadcrumb { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.form-label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-input, .form-textarea { width: 100%; padding: 10px 14px; margin-bottom: 16px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: inherit; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.news-list { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card-news-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.card-news-title a { color: inherit; text-decoration: none; }
.card-news-title a:hover { color: var(--accent); }
.news-single-body { line-height: 1.7; }
.forum-category-card { text-decoration: none; color: inherit; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.forum-thread-card { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.forum-thread-title a { color: inherit; text-decoration: none; }
.forum-post-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.9rem; }
.badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.badge-pinned { background: var(--accent-dim); color: var(--accent); }
.badge-locked { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.badge-staff { background: rgba(0, 212, 170, 0.25); color: var(--accent); }
.ticket-status { font-size: 0.8rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.ticket-status-open { background: rgba(0, 212, 170, 0.2); color: var(--accent); }
.ticket-status-answered { background: rgba(255, 193, 7, 0.2); color: #fcd34d; }
.ticket-status-closed { background: var(--bg-elevated); color: var(--text-muted); }
.ticket-reply-staff { border-left: 3px solid var(--accent); }
.admin-dashboard .stat-card { text-decoration: none; color: inherit; }
.stat-card-accent .value { color: var(--accent-hover); }
.admin-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.admin-table th, .admin-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
.table-wrap { overflow-x: auto; margin-bottom: 24px; }
.badge-success { background: rgba(0, 212, 170, 0.2); color: var(--accent-hover); }
.badge-warning { background: rgba(251, 191, 36, 0.2); color: #fcd34d; }
.badge-default { background: var(--bg-elevated); color: var(--text-muted); }
.text-danger { color: #fca5a5; }
.text-success { color: var(--accent-hover); }
.panel-error-box { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; font-size: 0.85rem; color: var(--text-muted); white-space: pre-wrap; word-break: break-all; max-height: 200px; overflow-y: auto; margin: 12px 0; }
.revenue-chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; margin: 20px 0; padding: 0 8px; }
.revenue-chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.revenue-chart-bar { width: 100%; max-width: 48px; min-height: 4px; background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dim) 100%); border-radius: var(--radius-sm) var(--radius-sm) 0 0; transition: height 0.3s ease; }
.revenue-chart-label { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.product-price { font-size: 1.25rem; font-weight: 700; color: var(--accent); margin: 12px 0; }
.card-link { text-decoration: none; color: inherit; display: block; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.text-muted { color: var(--text-muted); }

/* Crew */
.crew-section { margin-bottom: 32px; }
.crew-rank-title { font-size: 1.1rem; font-weight: 600; color: var(--accent); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.crew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.crew-card { display: flex; align-items: center; gap: 16px; }
.crew-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-dim); }
.crew-name { display: block; margin-bottom: 4px; }
.crew-steam { font-size: 0.85rem; color: var(--accent); text-decoration: none; }
.crew-steam:hover { text-decoration: underline; }
.crew-info { flex: 1; min-width: 0; }

/* Servere */
.servers-section { margin-bottom: 32px; }
.servers-game-title { font-size: 1.1rem; font-weight: 600; color: var(--accent); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.servers-list { display: grid; gap: 16px; }
.server-card { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.server-name { font-size: 1.1rem; margin-bottom: 4px; }
.server-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.server-address { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.server-address code { font-size: 0.9rem; padding: 6px 10px; background: var(--bg-elevated); border-radius: var(--radius-sm); }
.server-actions { flex-shrink: 0; }
.form-input-sm { padding: 6px 10px; font-size: 0.9rem; margin-bottom: 0; }
.admin-server-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.admin-server-preview { min-width: 200px; }
.admin-server-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-server-form .form-input-sm { width: auto; min-width: 80px; }
.admin-product-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.admin-product-preview { min-width: 180px; }
.admin-product-preview .product-price { font-size: 1rem; margin: 0 0 0 8px; }
.admin-product-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-product-form .form-input-sm { width: auto; min-width: 80px; }
.admin-product-form textarea { resize: vertical; }
