/* ==========================================================================
   MineRank - Premium Minecraft Server List Stylesheet
   Modern Dark Gaming Theme with Glassmorphism and Neon Accents
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-main: #0a0d14;
  --bg-surface: #111724;
  --bg-surface-elevated: #172033;
  --bg-surface-hover: #1e2a42;
  --bg-glass: rgba(17, 23, 36, 0.75);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(16, 185, 129, 0.3);

  /* Primary & Accents */
  --emerald: #10b981;
  --emerald-hover: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --cyan: #06b6d4;
  --purple: #8b5cf6;
  --gold: #f59e0b;
  --red: #ef4444;

  /* Typography Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-white: #ffffff;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px var(--emerald-glow);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(6, 182, 212, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

a {
  color: var(--emerald);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: #34d399;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.5px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--emerald) 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--emerald-glow);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

.brand-badge {
  font-size: 11px;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-white);
}

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

/* Mobile Toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
}

/* ==========================================================================
   Buttons & UI Elements
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald) 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--emerald-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #34d399 0%, var(--emerald) 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-white);
}

.btn-outline {
  background: transparent;
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--emerald);
}

.btn-outline:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--emerald);
  color: #34d399;
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 64px 0 40px;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--emerald);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #34d399 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 32px;
}

/* Search & Filter Bar */
.search-container {
  max-width: 780px;
  margin: 0 auto 40px;
}

.search-box {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s;
}

.search-box:focus-within {
  border-color: var(--emerald);
  box-shadow: var(--shadow-glow);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 20px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: var(--font-body);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-category-select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0 16px;
  border-radius: var(--radius-md);
  outline: none;
  font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer;
  margin-right: 6px;
}

/* Category Quick Pills */
.category-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.cat-pill:hover, .cat-pill.active {
  background: var(--bg-surface-hover);
  border-color: var(--emerald);
  color: var(--text-white);
  transform: translateY(-1px);
}

.cat-pill.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
}

/* ==========================================================================
   Featured Cards Carousel / Grid
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: var(--gold);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-bottom: 50px;
}

.featured-card {
  background: var(--bg-surface);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.featured-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.2);
}

.featured-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  background: linear-gradient(135deg, var(--gold) 0%, #d97706 100%);
  color: #000000;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 5px;
}

.featured-banner {
  height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.featured-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, var(--bg-surface) 100%);
}

.featured-body {
  padding: 0 20px 20px;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.featured-header {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-top: -30px;
  margin-bottom: 12px;
  position: relative;
  z-index: 3;
}

.server-avatar-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: #21262d;
  border: 2px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}

.featured-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
}

.featured-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.tag-badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Server List Row Items (Main Directory)
   ========================================================================== */
.server-list-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}

.server-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.server-row:hover {
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Rank Badge */
.server-rank {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.rank-1 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

.rank-2 {
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.2), rgba(226, 232, 240, 0.05));
  border-color: #cbd5e1;
  color: #f1f5f9;
}

.rank-3 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.05));
  border-color: #cd7f32;
  color: #f97316;
}

/* Server Icon & Main Info */
.server-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: #1e2632;
  border: 1px solid var(--border-subtle);
  object-fit: cover;
  flex-shrink: 0;
}

.server-details {
  flex: 1;
  min-width: 0;
}

.server-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.server-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-name:hover {
  color: var(--emerald);
}

.flag-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 2px 6px;
  border-radius: 4px;
}

.server-description-short {
  font-size: 13.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

.server-meta-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-version {
  font-size: 11px;
  font-weight: 600;
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.tag-votifier {
  font-size: 11px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Server Stats & Player Counter Component */
.server-stats-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 140px;
  flex-shrink: 0;
}

/* User required stat-number with live player counter */
.live-players-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(0.9); opacity: 1; }
}

.stat-number {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--emerald);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.votes-stat {
  font-size: 13px;
  color: var(--text-muted);
}

.votes-stat strong {
  color: var(--gold);
}

/* Action Buttons (Copy IP & Vote) */
.server-actions-col {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.copy-ip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  user-select: all;
}

.copy-ip-btn:hover {
  border-color: var(--emerald);
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.08);
}

.copy-ip-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ==========================================================================
   Server Detail Page
   ========================================================================== */
.server-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  margin: 30px 0;
  box-shadow: var(--shadow-lg);
}

.server-hero-banner {
  height: 240px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.server-hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 13, 20, 0.2) 0%, var(--bg-surface) 100%);
}

.server-hero-content {
  padding: 0 32px 32px;
  position: relative;
  margin-top: -50px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.server-hero-left {
  display: flex;
  align-items: flex-end;
  gap: 24px;
}

.server-detail-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  border: 3px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  background: #1e2632;
  object-fit: cover;
  position: relative;
  z-index: 2;
}

.server-detail-title h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
}

.server-detail-ip-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.ip-pill-large {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0d1117;
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 15px;
  color: #58a6ff;
  font-weight: 600;
  cursor: pointer;
}

.ip-pill-large:hover {
  border-color: var(--emerald);
  color: var(--emerald);
}

.server-layout-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 60px;
}

.detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.detail-card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-content {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 15px;
}

.detail-content h1, .detail-content h2, .detail-content h3 {
  color: var(--text-white);
  font-family: var(--font-heading);
  margin: 20px 0 10px;
}

.detail-content ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.detail-content li {
  margin-bottom: 6px;
}

.detail-content code {
  background: #0d1117;
  color: #58a6ff;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

/* Sidebar Quick Stats */
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row-label {
  color: var(--text-muted);
}

.stat-row-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   Voting Interface & Card
   ========================================================================== */
.voting-box {
  background: linear-gradient(145deg, var(--bg-surface) 0%, rgba(16, 185, 129, 0.04) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.voting-box-header {
  text-align: center;
  margin-bottom: 24px;
}

.voting-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 8px;
}

.voting-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.avatar-preview-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.avatar-preview-box {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  background: #0d1117;
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}

.avatar-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.cooldown-alert {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  padding: 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  margin-bottom: 20px;
}

.cooldown-timer {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  margin: 10px 0 6px;
}

/* Form Controls */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-label small {
  color: var(--text-muted);
  font-weight: normal;
}

.form-control {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  transition: all 0.2s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  background: #1a2233;
}

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

.form-help {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

.captcha-challenge {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.captcha-math {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #58a6ff;
  letter-spacing: 2px;
}

/* ==========================================================================
   Dashboard & Management
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  margin: 30px 0 60px;
}

.dashboard-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  height: fit-content;
}

.dashboard-user-card {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.dashboard-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  margin: 0 auto 12px;
  background: #21262d;
}

.dashboard-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
}

.dashboard-menu a:hover, .dashboard-menu a.active {
  background: var(--bg-surface-elevated);
  color: var(--text-white);
}

.dashboard-menu a.active {
  color: var(--emerald);
  border-left: 3px solid var(--emerald);
}

.stat-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

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

.metric-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.metric-val {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-white);
}

/* Data Table */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.custom-table th {
  background: var(--bg-surface-elevated);
  padding: 14px 18px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
}

.custom-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Flash Messages & Alerts */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

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

.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.alert-info {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #38bdf8;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #161b22;
  border: 1px solid var(--emerald);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  animation: slide-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Footer */
.site-footer {
  margin-top: auto;
  background: #080a0f;
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 24px;
  font-size: 14px;
  color: var(--text-muted);
}

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

.footer-col h4 {
  color: var(--text-white);
  font-family: var(--font-heading);
  font-size: 16px;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--emerald);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
  .hero-title { font-size: 36px; }
  .server-layout-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .server-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .server-stats-col {
    align-items: flex-start;
    width: 100%;
  }
  .server-actions-col {
    width: 100%;
    justify-content: space-between;
  }
  .hero-title { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
}
