/**
 * Products Page Styles
 * Theme-aware styling for product detail and listing pages
 * Consistent with app-wide design system
 */

/* Base Page Styles */
.products-page {
  min-height: 100vh;
  background: var(--primary-bg, #ffffff);
  color: var(--text-primary, #1f2937);
}

/* Container with nav clearance */
.products-page .container,
.product-detail-page .container {
  padding-top: var(--navbar-height, 120px);
}

/* Breadcrumb Navigation */
.products-page nav a,
.product-detail-page nav a {
  color: var(--accent-primary, #3b82f6);
  text-decoration: none;
  transition: color 0.2s ease;
}

.products-page nav a:hover,
.product-detail-page nav a:hover {
  color: var(--accent-hover, #2563eb);
}

/* Product Cards */
.products-page .card,
.product-detail-page .card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: var(--card-border-radius, 1rem);
  box-shadow: var(--card-shadow, 0 1px 3px rgba(0, 0, 0, 0.1));
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.products-page .card:hover,
.product-detail-page .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover, 0 4px 12px rgba(0, 0, 0, 0.15));
}

/* Card Body */
.products-page .card-body,
.product-detail-page .card-body {
  background: var(--card-bg, #ffffff);
  color: var(--text-primary, #1f2937);
}

/* Headings */
.products-page h1,
.products-page h2,
.products-page h3,
.products-page h4,
.product-detail-page h1,
.product-detail-page h2,
.product-detail-page h3,
.product-detail-page h4 {
  color: var(--heading-color, #1f2937);
}

/* Text */
.products-page .text-muted,
.product-detail-page .text-muted {
  color: var(--text-secondary, #6b7280) !important;
}

/* Buttons */
.products-page .btn-primary,
.product-detail-page .btn-primary {
  background: var(--accent-primary, #3b82f6);
  border-color: var(--accent-primary, #3b82f6);
}

.products-page .btn-primary:hover,
.product-detail-page .btn-primary:hover {
  background: var(--accent-hover, #2563eb);
  border-color: var(--accent-hover, #2563eb);
}

.products-page .btn-outline-primary,
.product-detail-page .btn-outline-primary {
  color: var(--accent-primary, #3b82f6);
  border-color: var(--accent-primary, #3b82f6);
}

.products-page .btn-outline-primary:hover,
.product-detail-page .btn-outline-primary:hover {
  background: var(--accent-primary, #3b82f6);
  color: #ffffff;
}

/* Badges */
.products-page .badge,
.product-detail-page .badge {
  font-weight: 600;
}

/* Image Gallery */
.product-detail-page .image-gallery {
  border-radius: var(--card-border-radius, 1rem);
  overflow: hidden;
}

.product-detail-page .image-gallery img {
  border-radius: var(--card-border-radius, 1rem);
}

/* Thumbnails */
.product-detail-page .thumbnail {
  border: 2px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.product-detail-page .thumbnail:hover,
.product-detail-page .thumbnail.active {
  border-color: var(--accent-primary, #3b82f6);
  opacity: 1;
}

/* Price Display */
.product-detail-page .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading-color, #1f2937);
}

.product-detail-page .original-price {
  text-decoration: line-through;
  color: var(--text-muted, #9ca3af);
}

/* Version History */
.product-detail-page .version-history {
  background: var(--secondary-bg, #f9fafb);
  border-radius: var(--card-border-radius-sm, 0.75rem);
  padding: 1rem;
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

.theme-dark .products-page,
.theme-dark .product-detail-page {
  background: var(--primary-bg) !important;
  color: var(--text-primary) !important;
}

/* Cards - Dark */
.theme-dark .products-page .card,
.theme-dark .product-detail-page .card {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--card-shadow) !important;
}

.theme-dark .products-page .card:hover,
.theme-dark .product-detail-page .card:hover {
  border-color: var(--border-color-hover) !important;
  box-shadow: var(--card-shadow-hover) !important;
}

.theme-dark .products-page .card-body,
.theme-dark .product-detail-page .card-body {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
}

/* Headings - Dark */
.theme-dark .products-page h1,
.theme-dark .products-page h2,
.theme-dark .products-page h3,
.theme-dark .products-page h4,
.theme-dark .product-detail-page h1,
.theme-dark .product-detail-page h2,
.theme-dark .product-detail-page h3,
.theme-dark .product-detail-page h4 {
  color: var(--text-primary) !important;
}

/* Text - Dark */
.theme-dark .products-page .text-muted,
.theme-dark .product-detail-page .text-muted {
  color: var(--text-secondary) !important;
}

.theme-dark .products-page p,
.theme-dark .product-detail-page p {
  color: var(--text-secondary) !important;
}

/* Buttons - Dark */
.theme-dark .products-page .btn-primary,
.theme-dark .product-detail-page .btn-primary {
  background: var(--accent-primary) !important;
  border-color: var(--accent-primary) !important;
}

.theme-dark .products-page .btn-primary:hover,
.theme-dark .product-detail-page .btn-primary:hover {
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}

.theme-dark .products-page .btn-outline-primary,
.theme-dark .product-detail-page .btn-outline-primary {
  color: var(--accent-primary) !important;
  border-color: var(--accent-primary) !important;
  background: transparent !important;
}

.theme-dark .products-page .btn-outline-primary:hover,
.theme-dark .product-detail-page .btn-outline-primary:hover {
  background: rgba(56, 189, 248, 0.1) !important;
  color: var(--accent-hover) !important;
}

/* Breadcrumb - Dark */
.theme-dark .products-page nav a,
.theme-dark .product-detail-page nav a {
  color: var(--accent-primary) !important;
}

.theme-dark .products-page nav a:hover,
.theme-dark .product-detail-page nav a:hover {
  color: var(--accent-hover) !important;
}

/* Price - Dark */
.theme-dark .product-detail-page .price {
  color: var(--text-primary) !important;
}

.theme-dark .product-detail-page .original-price {
  color: var(--text-muted) !important;
}

/* Version History - Dark */
.theme-dark .product-detail-page .version-history {
  background: var(--secondary-bg) !important;
  border: 1px solid var(--border-color) !important;
}

/* Thumbnails - Dark */
.theme-dark .product-detail-page .thumbnail:hover,
.theme-dark .product-detail-page .thumbnail.active {
  border-color: var(--accent-primary) !important;
}

/* Badges - Dark */
.theme-dark .products-page .badge.bg-light,
.theme-dark .product-detail-page .badge.bg-light {
  background: var(--secondary-bg) !important;
  color: var(--text-primary) !important;
}

.theme-dark .products-page .badge.bg-primary,
.theme-dark .product-detail-page .badge.bg-primary {
  background: var(--accent-primary) !important;
}

.theme-dark .products-page .badge.bg-success,
.theme-dark .product-detail-page .badge.bg-success {
  background: #4ade80 !important;
}

/* Icons - Dark */
.theme-dark .products-page .text-primary,
.theme-dark .product-detail-page .text-primary {
  color: var(--accent-primary) !important;
}

.theme-dark .products-page .text-muted i,
.theme-dark .product-detail-page .text-muted i {
  color: var(--text-secondary) !important;
}

/* Responsive */
@media (max-width: 768px) {
  .products-page .container,
  .product-detail-page .container {
    padding-top: calc(var(--navbar-height, 120px) - 20px);
  }
}

/**
 * Purchase Flow Page Styles
 * Theme-aware styling for success/cancelled checkout pages
 * Consistent with app-wide design system
 */

/* Base Page Styles */
.purchase-success-page,
.purchase-cancelled-page,
.purchase-flow-page {
  min-height: 100vh;
  padding-top: var(--navbar-height, 120px);
  background: var(--primary-bg, #ffffff);
  color: var(--text-primary, #1f2937);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cards */
.purchase-success-page .card,
.purchase-cancelled-page .card,
.purchase-flow-page .card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: var(--card-border-radius-lg, 1.5rem);
  box-shadow: var(--card-shadow, 0 4px 6px rgba(0, 0, 0, 0.1));
}

.purchase-success-page .card-body,
.purchase-cancelled-page .card-body,
.purchase-flow-page .card-body {
  background: var(--card-bg, #ffffff);
}

/* Headings */
.purchase-success-page h1,
.purchase-success-page h2,
.purchase-success-page h3,
.purchase-cancelled-page h1,
.purchase-cancelled-page h2,
.purchase-cancelled-page h3 {
  color: var(--heading-color, #1f2937);
}

/* Text */
.purchase-success-page p,
.purchase-cancelled-page p {
  color: var(--text-secondary, #6b7280);
}

.purchase-success-page .text-muted,
.purchase-cancelled-page .text-muted {
  color: var(--text-secondary, #6b7280) !important;
}

/* Success Icon */
.purchase-success-page .text-success {
  color: var(--success-color) !important;
}

/* Secondary/Cancelled Icon */
.purchase-cancelled-page .text-secondary {
  color: var(--text-secondary, #6b7280) !important;
}

/* Buttons */
.purchase-success-page .btn-primary,
.purchase-cancelled-page .btn-primary {
  background: var(--accent-primary, #3b82f6);
  border-color: var(--accent-primary, #3b82f6);
  border-radius: var(--button-border-radius, 50px);
}

.purchase-success-page .btn-primary:hover,
.purchase-cancelled-page .btn-primary:hover {
  background: var(--accent-hover, #2563eb);
  border-color: var(--accent-hover, #2563eb);
}

.purchase-success-page .btn-outline-secondary,
.purchase-cancelled-page .btn-outline-secondary {
  color: var(--text-secondary, #6b7280);
  border-color: var(--border-color, #e5e7eb);
  border-radius: var(--button-border-radius, 50px);
}

.purchase-success-page .btn-outline-secondary:hover,
.purchase-cancelled-page .btn-outline-secondary:hover {
  background: var(--secondary-bg, #f9fafb);
  color: var(--text-primary, #1f2937);
}

/* Order Details */
.purchase-success-page .order-details {
  background: var(--secondary-bg, #f9fafb);
  border-radius: var(--card-border-radius-sm, 0.75rem);
  padding: 1rem;
}

/* Links */
.purchase-success-page a,
.purchase-cancelled-page a {
  color: var(--accent-primary, #3b82f6);
}

.purchase-success-page a:hover,
.purchase-cancelled-page a:hover {
  color: var(--accent-hover, #2563eb);
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

.theme-dark .purchase-success-page,
.theme-dark .purchase-cancelled-page,
.theme-dark .purchase-flow-page {
  background: var(--primary-bg) !important;
  color: var(--text-primary) !important;
}

/* Cards - Dark */
.theme-dark .purchase-success-page .card,
.theme-dark .purchase-cancelled-page .card,
.theme-dark .purchase-flow-page .card {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--card-shadow) !important;
}

.theme-dark .purchase-success-page .card-body,
.theme-dark .purchase-cancelled-page .card-body,
.theme-dark .purchase-flow-page .card-body {
  background: var(--card-bg) !important;
}

/* Headings - Dark */
.theme-dark .purchase-success-page h1,
.theme-dark .purchase-success-page h2,
.theme-dark .purchase-success-page h3,
.theme-dark .purchase-cancelled-page h1,
.theme-dark .purchase-cancelled-page h2,
.theme-dark .purchase-cancelled-page h3 {
  color: var(--text-primary) !important;
}

/* Text - Dark */
.theme-dark .purchase-success-page p,
.theme-dark .purchase-cancelled-page p {
  color: var(--text-secondary) !important;
}

.theme-dark .purchase-success-page .text-muted,
.theme-dark .purchase-cancelled-page .text-muted {
  color: var(--text-muted) !important;
}

/* Success Icon - Dark */
.theme-dark .purchase-success-page .text-success {
  color: #4ade80 !important;
}

/* Secondary Icon - Dark */
.theme-dark .purchase-cancelled-page .text-secondary {
  color: var(--text-secondary) !important;
}

/* Buttons - Dark */
.theme-dark .purchase-success-page .btn-primary,
.theme-dark .purchase-cancelled-page .btn-primary {
  background: var(--accent-primary) !important;
  border-color: var(--accent-primary) !important;
}

.theme-dark .purchase-success-page .btn-primary:hover,
.theme-dark .purchase-cancelled-page .btn-primary:hover {
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}

.theme-dark .purchase-success-page .btn-outline-secondary,
.theme-dark .purchase-cancelled-page .btn-outline-secondary {
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
  background: transparent !important;
}

.theme-dark .purchase-success-page .btn-outline-secondary:hover,
.theme-dark .purchase-cancelled-page .btn-outline-secondary:hover {
  background: var(--secondary-bg) !important;
  color: var(--text-primary) !important;
}

/* Order Details - Dark */
.theme-dark .purchase-success-page .order-details {
  background: var(--secondary-bg) !important;
  border: 1px solid var(--border-color) !important;
}

/* Links - Dark */
.theme-dark .purchase-success-page a,
.theme-dark .purchase-cancelled-page a {
  color: var(--accent-primary) !important;
}

.theme-dark .purchase-success-page a:hover,
.theme-dark .purchase-cancelled-page a:hover {
  color: var(--accent-hover) !important;
}

/* Responsive */
@media (max-width: 768px) {
  .purchase-success-page,
  .purchase-cancelled-page,
  .purchase-flow-page {
    padding-top: calc(var(--navbar-height, 120px) - 20px);
  }
}

/**
 * Game Pages Styles
 * Consistent styling for game server hosting pages
 * Covers light/dark mode + desktop/tablet/mobile
 */

/* ============================================
 * ITEM TOOLTIP THEME (D2/WoW rarity cards)
 * Theme-adaptive variables for tier cards, server
 * cards, review panels, and pricing sections.
 * ============================================ */
:root {
  /* Light mode — cards and elements adapt to page theme */
  --item-bg-start: #f5f6f8;
  --item-bg-end: #ecedf0;
  --item-bg: linear-gradient(180deg, var(--item-bg-start) 0%, var(--item-bg-end) 100%);
  --item-text: #2c3e50;
  --item-text-muted: #6c757d;
  --item-text-gold: #b8860b;
  --item-text-green: #0d7a00;
  --item-text-blue: #2a4ecb;
  --item-separator: rgba(0, 0, 0, 0.1);
  --item-inner-bg: rgba(0, 0, 0, 0.04);
  --item-inner-border: rgba(0, 0, 0, 0.1);
  /* Action button backgrounds */
  --item-btn-start-bg: rgba(13, 122, 0, 0.08);
  --item-btn-start-border: rgba(13, 122, 0, 0.3);
  --item-btn-stop-bg: rgba(184, 134, 11, 0.08);
  --item-btn-stop-border: rgba(184, 134, 11, 0.3);
  --item-stat-blue-bg: rgba(42, 78, 203, 0.06);
  --item-stat-blue-border: rgba(42, 78, 203, 0.15);
  /* Performance & badge colors */
  --item-perf-optimal: #0d7a00;
  --item-perf-good: #b8860b;
  --item-perf-limited: #cc2222;
  --item-badge-recommended-bg: #0d7a00;
  --item-badge-recommended-text: #fff;
  --item-badge-insufficient-bg: #cc2222;
  --item-badge-overkill-bg: #2d8abf;
  /* Brand gradients & overlays */
  --brand-gradient: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  --brand-gradient-hero: linear-gradient(135deg, #0056b3 0%, #007bff 50%, #38bdf8 100%);
  --item-overlay-dark: rgba(0, 0, 0, 0.75);
  --item-overlay-modal: rgba(0, 0, 0, 0.5);
  --item-badge-overlay-bg: rgba(0, 0, 0, 0.75);
  --item-separator-gradient: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.12), transparent);
  --item-border-default: 2px solid rgba(0, 0, 0, 0.12);
  /* Section backgrounds: theme-native, not forced dark */
  --item-section-bg: #e8e9ec;
  --item-section-heading: #2c3e50;
  --item-section-text: #6c757d;
}

.theme-dark {
  /* Dark mode — true dark, native to the design */
  --item-bg-start: #1a1a2e;
  --item-bg-end: #0d0d1a;
  --item-bg: linear-gradient(180deg, var(--item-bg-start) 0%, var(--item-bg-end) 100%);
  --item-text: #ccccdd;
  --item-text-muted: #8888aa;
  --item-text-gold: #ffd700;
  --item-text-green: #1eff00;
  --item-text-blue: #4169ff;
  --item-separator: rgba(100, 100, 120, 0.5);
  --item-inner-bg: rgba(255, 255, 255, 0.04);
  --item-inner-border: rgba(255, 255, 255, 0.06);
  /* Action button backgrounds */
  --item-btn-start-bg: rgba(30, 255, 0, 0.12);
  --item-btn-start-border: rgba(30, 255, 0, 0.4);
  --item-btn-stop-bg: rgba(255, 215, 0, 0.12);
  --item-btn-stop-border: rgba(255, 215, 0, 0.4);
  --item-stat-blue-bg: rgba(65, 105, 255, 0.08);
  --item-stat-blue-border: rgba(65, 105, 255, 0.2);
  /* Performance & badge colors */
  --item-perf-optimal: #1eff00;
  --item-perf-good: #ffd700;
  --item-perf-limited: #ff4444;
  --item-badge-recommended-bg: #1eff00;
  --item-badge-recommended-text: #000;
  --item-badge-insufficient-bg: #ff4444;
  --item-badge-overkill-bg: #4fc3f7;
  /* Brand gradients & overlays */
  --brand-gradient: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  --brand-gradient-hero: linear-gradient(135deg, #0056b3 0%, #007bff 50%, #38bdf8 100%);
  --item-overlay-dark: rgba(13, 13, 26, 0.9);
  --item-overlay-modal: rgba(0, 0, 0, 0.5);
  --item-badge-overlay-bg: rgba(0, 0, 0, 0.75);
  --item-separator-gradient: linear-gradient(90deg, transparent, rgba(100, 100, 120, 0.5), transparent);
  --item-border-default: 2px solid rgba(100, 100, 120, 0.3);
  --item-section-bg: #0d0d1a;
  --item-section-heading: #ffd700;
  --item-section-text: #8888aa;
}

/* ============================================
 * PAGE LAYOUT
 * ============================================ */
.games-page,
.servers-page,
.create-server-page,
.server-detail-page,
.server-manage-page {
  min-height: 100vh;
  padding-top: var(--navbar-height, 120px);
  background: var(--primary-bg, #f0f1f3);
  color: var(--text-primary, #1f2937);
}

/* ============================================
 * HERO HEADER (Brand gradient headers)
 * ============================================ */
.games-hero,
.servers-header,
.game-header,
.support-hero {
  background: var(--brand-gradient-hero);
  color: #ffffff;
}

/* CTA Section - Brand gradient */
.games-cta-section {
  background: var(--brand-gradient);
}

.games-hero h1,
.servers-header h1,
.game-header h1,
.support-hero h1 {
  color: #ffffff;
}

/* Support page body — item-tooltip themed */
.support-page {
  min-height: 100vh;
  padding-top: var(--navbar-height, 120px);
  background: var(--item-section-bg);
}

/* ============================================
 * HEADINGS & TEXT — Theme-aware
 * ============================================ */
.games-page h2,
.games-page h3,
.games-page h4,
.games-page h5,
.servers-page h3,
.servers-page h4,
.servers-page h5,
.create-server-page h2,
.create-server-page h3,
.create-server-page h4,
.create-server-page h5 {
  color: var(--text-primary, #1f2937);
}

/* ============================================
 * VALUE PROP ICONS — Use theme accent
 * ============================================ */
.games-page .text-primary {
  color: var(--accent-primary, #007bff) !important;
}

/* ============================================
 * SERVER CARD ENHANCEMENTS
 * ============================================ */
.server-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.server-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ============================================
 * GAME SELECTION GRID
 * ============================================ */
.game-grid-item {
  transition: all 0.2s ease;
}

.game-grid-item:hover {
  transform: translateY(-2px);
}

.game-grid-item.selected {
  border: 2px solid var(--primary-color, #007bff);
  background: var(--info-bg, #d1ecf1);
}

/* ============================================
 * PRICING TIER CARDS
 * ============================================ */
.tier-card {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tier-card:hover {
  transform: translateY(-4px);
}

.tier-card.recommended {
  border: 2px solid var(--primary-color, #007bff);
}

.tier-card .popular-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

/* ============================================
 * STEP INDICATOR
 * ============================================ */
.step-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
}

.step-indicator .step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.step-indicator .step.active,
.step-indicator .step.completed {
  background: var(--primary-color, #007bff);
  color: #ffffff;
}

.step-indicator .step-line {
  width: 40px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease;
}

.step-indicator .step-line.completed {
  background: var(--primary-color, #007bff);
}

/* ============================================
 * SERVER STATUS BADGES
 * ============================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.running {
  background: var(--success-bg, #d4edda);
  color: var(--success-text, #155724);
}

.status-badge.stopped {
  background: var(--secondary-bg, #e9ecef);
  color: var(--text-secondary, #6c757d);
}

.status-badge.starting,
.status-badge.stopping {
  background: var(--warning-bg, #fff3cd);
  color: var(--warning-text, #856404);
}

.status-badge.error {
  background: var(--danger-bg, #f8d7da);
  color: var(--danger-text, #721c24);
}

/* ============================================
 * CONSOLE STYLING
 * ============================================ */
.server-console {
  background: #1a1a2e;
  color: #00ff00;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.875rem;
  padding: 1rem;
  border-radius: 8px;
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
}

.server-console .console-line {
  margin: 0;
  padding: 0.125rem 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.server-console .console-line.error {
  color: #ff6b6b;
}

.server-console .console-line.warning {
  color: #ffc107;
}

.server-console .console-line.info {
  color: #00bcd4;
}

/* ============================================
 * BUTTONS — Theme-aware
 * ============================================ */

/* btn-outline-primary for all game pages */
.games-page .btn-outline-primary,
.servers-page .btn-outline-primary,
.create-server-page .btn-outline-primary {
  color: var(--accent-primary, #007bff);
  border-color: var(--accent-primary, #007bff);
}

.games-page .btn-outline-primary:hover,
.servers-page .btn-outline-primary:hover,
.create-server-page .btn-outline-primary:hover {
  background: var(--accent-primary, #007bff);
  border-color: var(--accent-primary, #007bff);
  color: #fff;
}

/* btn-primary for all game pages */
.games-page .btn-primary,
.servers-page .btn-primary,
.create-server-page .btn-primary {
  background: var(--accent-primary, #007bff);
  border-color: var(--accent-primary, #007bff);
  color: var(--btn-primary-text, #fff);
}

.games-page .btn-primary:hover,
.servers-page .btn-primary:hover,
.create-server-page .btn-primary:hover {
  background: var(--accent-hover, #0056b3);
  border-color: var(--accent-hover, #0056b3);
}

/* btn-outline-secondary for game pages (view toggle, filters) */
.games-page .btn-outline-secondary,
.servers-page .btn-outline-secondary,
.create-server-page .btn-outline-secondary {
  color: var(--text-secondary, #6c757d);
  border-color: var(--border-color, #e9ecef);
}

.games-page .btn-outline-secondary:hover,
.servers-page .btn-outline-secondary:hover,
.create-server-page .btn-outline-secondary:hover {
  background: var(--secondary-bg, #f8f9fa);
  color: var(--text-primary, #1f2937);
  border-color: var(--border-color-hover, #dee2e6);
}

/* ============================================
 * FORM CONTROLS — Theme-aware (servers page)
 * ============================================ */
.servers-page .form-control,
.servers-page .form-select,
.create-server-page .form-control,
.create-server-page .form-select {
  background: var(--card-bg, #fff);
  border-color: var(--border-color, #e9ecef);
  color: var(--text-primary, #1f2937);
}

.servers-page .form-control:focus,
.servers-page .form-select:focus,
.create-server-page .form-control:focus,
.create-server-page .form-select:focus {
  border-color: var(--accent-primary, #007bff);
  box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.15);
}

.servers-page .input-group-text,
.create-server-page .input-group-text {
  background: var(--secondary-bg, #f8f9fa);
  border-color: var(--border-color, #e9ecef);
  color: var(--text-secondary, #6c757d);
}

/* ============================================
 * FAQ BUTTONS — Theme-aware
 * ============================================ */
.games-page .card-body button.bg-transparent {
  color: var(--text-primary, #1f2937);
}

/* ============================================
 * DARK MODE OVERRIDES
 * ============================================ */
.theme-dark .games-page,
.theme-dark .servers-page,
.theme-dark .create-server-page,
.theme-dark .server-detail-page,
.theme-dark .server-manage-page {
  background: var(--primary-bg, #0f172a);
  color: var(--text-primary, #e2e8f0);
}

/* Hero / Header — subtle dark gradient */
.theme-dark .games-hero,
.theme-dark .servers-header,
.theme-dark .game-header,
.theme-dark .server-header,
.theme-dark .support-hero {
  background: linear-gradient(135deg, var(--secondary-bg, #1e293b) 0%, var(--primary-bg, #0f172a) 100%) !important;
  border-bottom: 1px solid var(--border-color, #334155);
}

/* CTA section dark */
.theme-dark .games-cta-section {
  background: linear-gradient(135deg, var(--secondary-bg, #1e293b) 0%, var(--primary-bg, #0f172a) 100%);
  border-top: 1px solid var(--border-color, #334155);
}

/* CTA section btn-light in dark mode */
.theme-dark .games-cta-section .btn-light {
  background: var(--accent-primary, #38bdf8) !important;
  border-color: var(--accent-primary, #38bdf8) !important;
  color: #0f172a !important;
}

.theme-dark .games-cta-section .btn-light:hover {
  background: var(--accent-hover, #0ea5e9) !important;
  border-color: var(--accent-hover, #0ea5e9) !important;
}

/* Dark headings */
.theme-dark .games-page h2,
.theme-dark .games-page h3,
.theme-dark .games-page h4,
.theme-dark .games-page h5,
.theme-dark .servers-page h3,
.theme-dark .servers-page h4,
.theme-dark .servers-page h5,
.theme-dark .create-server-page h2,
.theme-dark .create-server-page h3,
.theme-dark .create-server-page h4,
.theme-dark .create-server-page h5 {
  color: var(--heading-color, #f1f5f9) !important;
}

/* Cards — all game pages */
.theme-dark .games-page .card,
.theme-dark .servers-page .card,
.theme-dark .create-server-page .card {
  background: var(--card-bg, #1e293b) !important;
  border: 1px solid var(--border-color, #334155) !important;
  color: var(--text-primary, #e2e8f0) !important;
}

.theme-dark .games-page .card:hover,
.theme-dark .servers-page .card:hover,
.theme-dark .create-server-page .card:hover {
  border-color: var(--border-color-hover, #475569) !important;
}

/* bg-light sections (Supported Games, Regions) */
.theme-dark .games-page .bg-light,
.theme-dark .create-server-page .bg-light,
.theme-dark .servers-page .bg-light,
.theme-dark .server-manage-page .bg-light {
  background: var(--secondary-bg, #1e293b) !important;
}

/* Standalone sections using bg-light class */
.theme-dark .games-page section.bg-light {
  background: var(--primary-bg, #0f172a) !important;
  border-top: 1px solid var(--border-color, #334155);
  border-bottom: 1px solid var(--border-color, #334155);
}

/* Badge overrides for dark mode — bg-light text-dark (server-manage handled separately) */
.theme-dark .games-page .badge.bg-light,
.theme-dark .create-server-page .badge.bg-light,
.theme-dark .servers-page .badge.bg-light {
  background: rgba(56, 189, 248, 0.1) !important;
  color: var(--accent-primary, #38bdf8) !important;
}

/* text-dark override for dark mode */
.theme-dark .games-page .text-dark,
.theme-dark .create-server-page .text-dark,
.theme-dark .servers-page .text-dark,
.theme-dark .server-manage-page .text-dark {
  color: var(--text-primary, #e2e8f0) !important;
}

/* text-muted in dark mode */
.theme-dark .games-page .text-muted,
.theme-dark .servers-page .text-muted,
.theme-dark .create-server-page .text-muted {
  color: var(--text-secondary, #94a3b8) !important;
}

/* Server stat cards — bg-light override */
.theme-dark .servers-page .card.bg-light {
  background: var(--card-bg, #1e293b) !important;
  border: 1px solid var(--border-color, #334155) !important;
}

/* Border sections in dark mode (trust badges) */
.theme-dark .games-page .border-top,
.theme-dark .games-page .border-bottom {
  border-color: var(--border-color, #334155) !important;
}

/* Trust badge circles in dark mode */
.theme-dark .games-page .bg-success.bg-opacity-10 {
  background: rgba(74, 222, 128, 0.1) !important;
}

.theme-dark .games-page .bg-primary.bg-opacity-10 {
  background: rgba(56, 189, 248, 0.1) !important;
}

.theme-dark .games-page .bg-warning.bg-opacity-10 {
  background: rgba(251, 191, 36, 0.1) !important;
}

.theme-dark .games-page .bg-info.bg-opacity-10 {
  background: rgba(56, 189, 248, 0.1) !important;
}

/* Trust badge text colors in dark */
.theme-dark .games-page .text-success {
  color: #4ade80 !important;
}

.theme-dark .games-page .text-warning {
  color: #fbbf24 !important;
}

.theme-dark .games-page .text-info {
  color: #38bdf8 !important;
}

/* Trust badge fw-bold text */
.theme-dark .games-page .fw-bold {
  color: var(--text-primary, #e2e8f0);
}

/* btn-outline-primary dark mode */
.theme-dark .games-page .btn-outline-primary,
.theme-dark .servers-page .btn-outline-primary,
.theme-dark .create-server-page .btn-outline-primary {
  color: var(--accent-primary, #38bdf8) !important;
  border-color: var(--accent-primary, #38bdf8) !important;
  background: transparent !important;
}

.theme-dark .games-page .btn-outline-primary:hover,
.theme-dark .servers-page .btn-outline-primary:hover,
.theme-dark .create-server-page .btn-outline-primary:hover {
  background: rgba(56, 189, 248, 0.1) !important;
  color: var(--accent-hover, #0ea5e9) !important;
}

/* btn-primary dark mode */
.theme-dark .games-page .btn-primary,
.theme-dark .servers-page .btn-primary,
.theme-dark .create-server-page .btn-primary {
  background: var(--accent-primary, #38bdf8) !important;
  border-color: var(--accent-primary, #38bdf8) !important;
  color: #0f172a !important;
}

.theme-dark .games-page .btn-primary:hover,
.theme-dark .servers-page .btn-primary:hover,
.theme-dark .create-server-page .btn-primary:hover {
  background: var(--accent-hover, #0ea5e9) !important;
  border-color: var(--accent-hover, #0ea5e9) !important;
}

/* btn-outline-secondary dark mode */
.theme-dark .games-page .btn-outline-secondary,
.theme-dark .servers-page .btn-outline-secondary,
.theme-dark .create-server-page .btn-outline-secondary {
  color: var(--text-secondary, #94a3b8) !important;
  border-color: var(--border-color, #334155) !important;
  background: transparent !important;
}

.theme-dark .games-page .btn-outline-secondary:hover,
.theme-dark .servers-page .btn-outline-secondary:hover,
.theme-dark .create-server-page .btn-outline-secondary:hover {
  background: var(--secondary-bg, #1e293b) !important;
  color: var(--text-primary, #e2e8f0) !important;
}

/* btn-outline-light dark mode */
.theme-dark .servers-header .btn-outline-light,
.theme-dark .games-hero .btn-outline-light {
  color: var(--text-primary, #e2e8f0) !important;
  border-color: var(--border-color, #334155) !important;
}

.theme-dark .servers-header .btn-outline-light:hover,
.theme-dark .games-hero .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

/* Form controls in dark mode — browse/create pages (server-manage handled separately) */
.theme-dark .servers-page .form-control,
.theme-dark .servers-page .form-select,
.theme-dark .create-server-page .form-control,
.theme-dark .create-server-page .form-select {
  background: var(--secondary-bg, #0f172a) !important;
  border-color: var(--border-color, #334155) !important;
  color: var(--text-primary, #e2e8f0) !important;
}

.theme-dark .servers-page .form-control:focus,
.theme-dark .servers-page .form-select:focus,
.theme-dark .create-server-page .form-control:focus,
.theme-dark .create-server-page .form-select:focus {
  border-color: var(--accent-primary, #38bdf8) !important;
  box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.15) !important;
}

/* input-group-text dark mode */
.theme-dark .servers-page .input-group-text,
.theme-dark .create-server-page .input-group-text {
  background: var(--secondary-bg, #1e293b) !important;
  border-color: var(--border-color, #334155) !important;
  color: var(--text-secondary, #94a3b8) !important;
}

/* FAQ card buttons in dark mode */
.theme-dark .games-page .card-body button.bg-transparent,
.theme-dark .games-page button.bg-transparent {
  color: var(--text-primary, #e2e8f0) !important;
}

/* Table and list styling in dark mode */
.theme-dark .servers-page .table {
  color: var(--text-primary, #e2e8f0) !important;
}

.theme-dark .servers-page .table-light {
  background: var(--secondary-bg, #1e293b) !important;
}

.theme-dark .servers-page .table-light th {
  color: var(--text-primary, #e2e8f0) !important;
  background: var(--secondary-bg, #1e293b) !important;
  border-color: var(--border-color, #334155) !important;
}

.theme-dark .servers-page .table td {
  border-color: var(--border-color, #334155) !important;
  color: var(--text-primary, #e2e8f0) !important;
  background: var(--card-bg, #1e293b) !important;
}

.theme-dark .servers-page .table-hover tbody tr:hover td {
  background: var(--secondary-bg, #0f172a) !important;
}

/* Card overrides for server management tabs (dark overrides base item styles) */
.theme-dark .server-manage-page .card {
  background: var(--card-bg, #1e293b) !important;
  border: 1px solid var(--border-color, #334155) !important;
  color: var(--text-primary, #e2e8f0) !important;
}

.theme-dark .server-manage-page .card:hover {
  border-color: var(--border-color-hover, #475569) !important;
}

.theme-dark .server-manage-page .card-title {
  color: var(--heading-color, #f1f5f9) !important;
}

.theme-dark .server-manage-page .text-muted {
  color: var(--text-secondary, #94a3b8) !important;
}

.theme-dark .server-manage-page .fw-medium,
.theme-dark .server-manage-page p.mb-0 {
  color: var(--text-primary, #e2e8f0) !important;
}

/* Dark mode: alerts */
.theme-dark .server-manage-page .alert-info {
  background: rgba(56, 189, 248, 0.1) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  color: #38bdf8 !important;
}

.theme-dark .server-manage-page .alert-warning {
  background: rgba(251, 191, 36, 0.1) !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
  color: #fbbf24 !important;
}

/* Dark mode: form controls (override base item styles) */
.theme-dark .server-manage-page .form-control,
.theme-dark .server-manage-page .form-select {
  background: var(--secondary-bg, #0f172a) !important;
  border-color: var(--border-color, #334155) !important;
  color: var(--text-primary, #e2e8f0) !important;
}

.theme-dark .server-manage-page .form-control:focus,
.theme-dark .server-manage-page .form-select:focus {
  border-color: var(--accent-primary, #38bdf8) !important;
  box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.15) !important;
}

/* Dark mode: btn overrides */
.theme-dark .server-manage-page .btn-outline-secondary {
  color: var(--text-secondary, #94a3b8) !important;
  border-color: var(--border-color, #334155) !important;
}

.theme-dark .server-manage-page .btn-outline-secondary:hover {
  background: var(--secondary-bg, #1e293b) !important;
  color: var(--text-primary, #e2e8f0) !important;
}

/* Dark mode: badge overrides */
.theme-dark .server-manage-page .badge.bg-light {
  background: rgba(56, 189, 248, 0.1) !important;
  color: var(--accent-primary, #38bdf8) !important;
}

/* Tab navigation bar dark mode */
.theme-dark .server-manage-page .border-bottom {
  background: var(--secondary-bg, #1e293b) !important;
  border-color: var(--border-color, #334155) !important;
}

.theme-dark .server-manage-page .nav-tabs .nav-link {
  color: var(--text-secondary, #94a3b8);
}

.theme-dark .server-manage-page .nav-tabs .nav-link.active {
  color: var(--accent-primary, #38bdf8);
  border-bottom-color: var(--accent-primary, #38bdf8);
  background: transparent;
}

.theme-dark .server-manage-page .nav-tabs .nav-link:hover:not(.active) {
  color: var(--text-primary, #e2e8f0);
  border-color: transparent;
}

/* Dropdown dark mode */
.theme-dark .server-manage-page .dropdown-menu {
  background: var(--card-bg, #1e293b);
  border: 1px solid var(--border-color, #334155);
}

.theme-dark .server-manage-page .dropdown-item {
  color: var(--text-primary, #e2e8f0);
}

.theme-dark .server-manage-page .dropdown-item:hover,
.theme-dark .server-manage-page .dropdown-item.active {
  background: var(--secondary-bg, #0f172a);
  color: var(--accent-primary, #38bdf8);
}

/* Modal dark mode */
.theme-dark .server-manage-page .modal-content {
  background: var(--card-bg, #1e293b);
  border: 1px solid var(--border-color, #334155);
  color: var(--text-primary, #e2e8f0);
}

.theme-dark .server-manage-page .modal-content .alert-warning {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

/* Step indicator dark mode */
.theme-dark .step-indicator .step {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

.theme-dark .step-indicator .step.active,
.theme-dark .step-indicator .step.completed {
  background: var(--accent-primary, #38bdf8);
  color: #ffffff;
}

.theme-dark .step-indicator .step-line {
  background: rgba(255, 255, 255, 0.1);
}

.theme-dark .step-indicator .step-line.completed {
  background: var(--accent-primary, #38bdf8);
}

/* Status badges dark mode */
.theme-dark .status-badge.running {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

.theme-dark .status-badge.stopped {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.theme-dark .status-badge.starting,
.theme-dark .status-badge.stopping {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.theme-dark .status-badge.error {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

/* Alert dark mode — servers list (server-manage handled separately) */
.theme-dark .servers-page .alert-danger {
  background: rgba(248, 113, 113, 0.1) !important;
  border-color: rgba(248, 113, 113, 0.3) !important;
  color: #f87171 !important;
}

/* Pricing card display-6 in dark mode */
.theme-dark .games-page .display-6 {
  color: var(--text-primary, #e2e8f0) !important;
}

/* Game selection card in create page */
.theme-dark .create-server-page button.card {
  background: var(--card-bg, #1e293b) !important;
  border: 1px solid var(--border-color, #334155) !important;
}

.theme-dark .create-server-page button.card:hover {
  border-color: var(--border-color-hover, #475569) !important;
}

/* Server detail bg-primary card keeps its color */
.theme-dark .servers-page .card.bg-primary {
  background: var(--accent-primary, #38bdf8) !important;
  border: none !important;
  color: #0f172a !important;
}

.theme-dark .servers-page .card.bg-primary .opacity-75 {
  color: rgba(15, 23, 42, 0.75) !important;
}

/* ============================================
 * SERVER MANAGE PAGE — D2/WoW Item Tooltip Theme
 * Theme-adaptive cards, tabs, and content areas.
 * ============================================ */

/* Cards — item-tooltip style */
.server-manage-page .card {
  background: var(--item-bg);
  border: var(--item-border-default);
  color: var(--item-text);
}

.server-manage-page .card:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

.server-manage-page .card-title {
  color: var(--item-text);
}

/* Text overrides */
.server-manage-page .text-muted {
  color: var(--item-text-muted) !important;
}

.server-manage-page .fw-medium,
.server-manage-page p.mb-0 {
  color: var(--item-text);
}

/* Tab navigation bar — item-section style */
.server-manage-page .border-bottom {
  background: var(--item-section-bg) !important;
  border-color: var(--item-separator) !important;
}

.server-manage-page .nav-tabs {
  border-bottom: none;
}

.server-manage-page .nav-tabs .nav-link {
  color: var(--item-text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1.25rem;
  transition: color 0.2s, border-color 0.2s;
}

.server-manage-page .nav-tabs .nav-link.active {
  color: var(--item-text-blue);
  border-bottom-color: var(--item-text-blue);
  background: transparent;
}

.server-manage-page .nav-tabs .nav-link:hover:not(.active):not(:disabled) {
  color: var(--item-text);
  border-bottom-color: var(--item-separator);
}

/* Dropdown menu — item-tooltip style */
.server-manage-page .dropdown-menu {
  background: var(--item-bg-start);
  border: var(--item-border-default);
}

.server-manage-page .dropdown-item {
  color: var(--item-text);
}

.server-manage-page .dropdown-item:hover,
.server-manage-page .dropdown-item.active {
  background: var(--item-inner-bg);
  color: var(--item-text-blue);
}

/* Modal overlay — item-tooltip style */
.server-manage-page .modal-content {
  background: var(--item-bg-start);
  border: var(--item-border-default);
  color: var(--item-text);
}

/* Alert overrides */
.server-manage-page .alert-danger {
  background: rgba(204, 34, 34, 0.06);
  border-color: rgba(204, 34, 34, 0.2);
  color: var(--item-perf-limited);
}

.server-manage-page .alert-warning {
  background: rgba(184, 134, 11, 0.06);
  border-color: rgba(184, 134, 11, 0.2);
}

.server-manage-page .alert-info {
  background: var(--item-stat-blue-bg);
  border-color: var(--item-stat-blue-border);
  color: var(--item-text-blue);
}

/* Inner highlight sections (tier capacity, etc.) */
.server-manage-page .tier-capacity-box,
.server-manage-page .inner-section {
  background: var(--item-inner-bg);
  border: 1px solid var(--item-inner-border);
  border-radius: 0.5rem;
}

/* Form controls — theme-adaptive */
.server-manage-page .form-control,
.server-manage-page .form-select {
  background: var(--item-inner-bg);
  border-color: var(--item-inner-border);
  color: var(--item-text);
}

.server-manage-page .form-control:focus,
.server-manage-page .form-select:focus {
  border-color: var(--item-text-blue);
  box-shadow: 0 0 0 0.2rem rgba(42, 78, 203, 0.12);
}

/* Btn theme overrides for server manage */
.server-manage-page .btn-outline-secondary {
  color: var(--item-text-muted);
  border-color: var(--item-inner-border);
}

.server-manage-page .btn-outline-secondary:hover {
  background: var(--item-inner-bg);
  color: var(--item-text);
  border-color: var(--item-separator);
}

/* Console — always-dark terminal style (theme-independent) */
.server-manage-page .server-console {
  background: #0d1117;
  color: #c9d1d9;
  border: 1px solid #30363d;
  height: 50vh;
  overflow: auto;
  font-family: Monaco, Consolas, monospace;
}

.server-manage-page .server-console + .card-footer {
  background: #161b22;
}

.server-manage-page .console-prompt {
  background: transparent;
  color: #58a6ff;
}

.server-manage-page .console-input {
  background: transparent !important;
  border-color: #30363d;
  color: #c9d1d9 !important;
  font-family: Monaco, Consolas, monospace;
}

/* Badge overrides */
.server-manage-page .badge.bg-light {
  background: var(--item-inner-bg) !important;
  color: var(--item-text-muted) !important;
}

.server-manage-page .badge.bg-primary {
  background: var(--item-text-blue) !important;
}

/* ============================================
 * RESPONSIVE ADJUSTMENTS — MOBILE & TABLET
 * ============================================ */
@media (max-width: 768px) {
  .games-page,
  .servers-page,
  .create-server-page,
  .server-detail-page,
  .server-manage-page {
    padding-top: calc(var(--navbar-height, 120px) - 20px);
  }

  .server-console {
    min-height: 200px;
    font-size: 0.75rem;
  }

  .step-indicator .step-line {
    width: 24px;
  }

  /* Hero text sizing on mobile */
  .games-hero h1.display-5 {
    font-size: 1.75rem !important;
  }

  .games-hero .lead {
    font-size: 0.95rem !important;
  }

  /* Hero buttons stack nicely on mobile */
  .games-hero .d-flex.gap-3 {
    gap: 0.75rem !important;
  }

  .games-hero .btn-lg {
    padding: 0.625rem 1.25rem !important;
    font-size: 0.9rem !important;
  }

  /* Value prop section: 2 cols, better spacing */
  .games-page .text-center .text-primary {
    margin-bottom: 0.5rem !important;
  }

  /* Trust badges — wrap nicely on mobile */
  .games-page .border-top.border-bottom .d-flex.flex-wrap {
    gap: 1rem !important;
  }

  /* Pricing cards: slight padding reduction */
  .games-page .card-body.p-4 {
    padding: 1.25rem !important;
  }

  /* Server stats: reduce padding on mobile */
  .servers-page .card-body.py-3 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  .servers-page .h4.mb-0 {
    font-size: 1.25rem !important;
  }

  /* Servers header: stack on mobile */
  .servers-header .d-flex.align-items-center.justify-content-between {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  /* Filter bar: full-width controls on mobile */
  .servers-page .card-body .row.g-3 .col-md-4,
  .servers-page .card-body .row.g-3 .col-md-2,
  .servers-page .card-body .row.g-3 .col-md-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* CTA section padding */
  .games-cta-section {
    padding: 2.5rem 0 !important;
  }

  .games-cta-section h2 {
    font-size: 1.25rem !important;
  }

  /* FAQ accordion: better touch targets */
  .games-page .card-body.d-flex.align-items-center.justify-content-between {
    padding: 1rem !important;
  }

  /* Server detail tabs: horizontal scroll on mobile */
  .server-detail-page .nav-tabs,
  .server-manage-page .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .server-detail-page .nav-tabs::-webkit-scrollbar,
  .server-manage-page .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .server-detail-page .nav-tabs .nav-link,
  .server-manage-page .nav-tabs .nav-link {
    white-space: nowrap;
    padding: 0.75rem 1rem;
  }
}

/* Chevron rotation on expanded dropdown */
.server-manage-page .dropdown-toggle[aria-expanded="true"] svg:last-child {
  transform: rotate(180deg);
}

.server-manage-page .dropdown-toggle svg:last-child {
  transition: transform 0.2s ease;
}

/* Dropdown menu: prevent right-edge overflow on mobile */
@media (max-width: 576px) {
  .server-manage-page .dropdown-menu.position-absolute {
    right: auto !important;
    left: 0;
    min-width: 160px;
  }
}

/* Small phone refinements (< 480px) */
@media (max-width: 480px) {
  /* Step indicator: smaller circles */
  .create-server-page .step-indicator .step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  /* Tier card pricing: tighter on small screens */
  .create-server-page .card .display-6,
  .create-server-page .card [style*="fontSize"] {
    font-size: 1.4rem !important;
  }

  /* Server stats row: smaller text */
  .servers-page .d-flex.flex-wrap.gap-3 .text-muted {
    font-size: 0.75rem;
  }

  /* Pricing cards: tighter padding */
  .games-page .card-body.p-4 {
    padding: 1rem !important;
  }
}

/* Tablet specific (768px - 992px) */
@media (min-width: 768px) and (max-width: 992px) {
  .games-hero h1.display-5 {
    font-size: 2.25rem !important;
  }

  /* Server header: keep row layout but tighter */
  .servers-header .d-flex.align-items-center.justify-content-between {
    flex-direction: row;
  }
}

/* ============================================
 * SERVICES PAGE & HOMEPAGE TEASER
 * ============================================ */

/* ---- Hero ---- */
.services-hero {
  background: var(--brand-gradient-hero);
  color: var(--btn-primary-text);
}

.services-hero h1 {
  color: var(--btn-primary-text);
}

/* ---- Page headings — theme-aware ---- */
.services-page h2,
.services-page h3,
.services-page h4,
.services-page h5 {
  color: var(--heading-color);
}

.services-page p,
.services-page li {
  color: var(--main-color);
}

/* ---- Service tier cards ---- */
.service-tier-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-border-radius, 1rem);
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-tier-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-6px);
}

.service-tier-card .card-body {
  flex: 1 1;
  display: flex;
  flex-direction: column;
}

.service-tier-card .feature-list {
  flex: 1 1;
}

/* Popular badge */
.service-tier-card.popular {
  border-color: var(--primary-color);
  border-width: 2px;
}

.popular-badge {
  position: absolute;
  top: 0;
  right: 1.5rem;
  background: var(--primary-color);
  color: var(--btn-primary-text);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 0 0 0.5rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Philosophy section ---- */
.services-philosophy {
  background: var(--secondary-bg);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

/* ---- Credentials badges ---- */
.credential-badge {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-border-radius-sm, 0.75rem);
  padding: 0.75rem 1rem;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.credential-badge .badge-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
}

.credential-badge .badge-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ---- What You Get cards ---- */
.deliverable-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-border-radius, 1rem);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  height: 100%;
}

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

/* ---- Tech stack badges ---- */
.tech-badge {
  display: inline-block;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--button-border-radius, 50px);
  padding: 0.375rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.tech-badge:hover {
  background: var(--primary-color);
  color: var(--btn-primary-text);
  border-color: var(--primary-color);
}

/* ---- CTA section ---- */
.services-cta {
  background: var(--brand-gradient);
  color: var(--btn-primary-text);
}

.services-cta h2 {
  color: var(--btn-primary-text) !important;
}

.services-cta p {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* ---- Homepage Services CTA ---- */
.services-cta-section {
  background: var(--secondary-bg);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.services-cta-section h3 {
  color: var(--heading-color);
}

.services-cta-section p {
  color: var(--text-secondary);
}

/* ---- Homepage teaser ---- */
.services-teaser {
  background: var(--secondary-bg);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.highlight-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-border-radius, 1rem);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  height: 100%;
}

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

.highlight-card .icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 123, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.highlight-card .icon-wrapper svg {
  color: var(--primary-color);
}

/* ============================================
 * DARK THEME OVERRIDES
 * ============================================ */

.theme-dark .services-hero {
  background: linear-gradient(135deg, var(--secondary-bg, #1e293b) 0%, var(--primary-bg, #0f172a) 100%) !important;
  border-bottom: 1px solid var(--border-color, #334155);
}

.theme-dark .services-cta {
  background: linear-gradient(135deg, var(--secondary-bg, #1e293b) 0%, var(--primary-bg, #0f172a) 100%);
  border-top: 1px solid var(--border-color, #334155);
}

.theme-dark .services-cta .btn-light {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color);
}

.theme-dark .services-cta .btn-light:hover {
  background: rgba(255, 255, 255, 0.2);
}

.theme-dark .services-hero .btn-outline-light {
  color: var(--text-primary, #e2e8f0) !important;
  border-color: var(--border-color, #334155) !important;
}

.theme-dark .services-hero .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.theme-dark .services-philosophy {
  background: var(--primary-bg);
}

.theme-dark .services-cta-section {
  background: var(--primary-bg);
}

.theme-dark .services-teaser {
  background: var(--primary-bg);
}

/* ============================================
 * RESPONSIVE
 * ============================================ */

@media (max-width: 767.98px) {
  .services-hero h1.display-5 {
    font-size: 1.75rem !important;
  }

  .services-hero .lead {
    font-size: 0.95rem !important;
  }

  .services-hero .d-flex.gap-3 {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.75rem !important;
  }

  .services-hero .btn-lg {
    padding: 0.625rem 1.25rem !important;
    font-size: 0.9rem !important;
    width: 100%;
    max-width: 280px;
  }

  .services-cta .d-flex.gap-3 {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.75rem !important;
  }

  .services-cta .btn-lg {
    width: 100%;
    max-width: 280px;
  }

  .credential-badge .badge-value {
    font-size: 1rem;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .services-hero h1.display-5 {
    font-size: 2.25rem !important;
  }
}

/* ========================================
   CUSTOM UI HELPERS
   Shared utility styles for lightweight UI components
   ======================================== */

/* Floating Messages Button */
.floating-messages-button {
    position: fixed;
    bottom: 30px;
    right: 90px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color, #007bff);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-primary-sm);
    z-index: 99;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--btn-primary-text);
}

.floating-messages-button.is-hovered {
    transform: scale(1.1) translateY(-2px);
    box-shadow: var(--shadow-primary-md);
}

.floating-messages-button .floating-messages-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.floating-messages-button.is-hovered .floating-messages-icon {
    transform: scale(1.1);
}

.floating-messages-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background-color: var(--main-color, #1A1A1A);
    color: var(--btn-primary-text);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.floating-messages-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid var(--main-color, #1A1A1A);
}

.floating-messages-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
    animation: floatingMessagesTooltipFade 0.2s ease-out;
}

@media (max-width: 768px) {
    .floating-messages-button {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .floating-messages-button .floating-messages-icon {
        font-size: 20px;
    }
}

/* Loading Link */
.loading-link {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-link:active {
    transform: scale(0.98);
    transition: transform 0.1s ease-out;
}

.loading-link.navigating {
    opacity: 0.7;
    transition: opacity 0.2s ease-out;
}

/* Hero Skeleton Fallback */
.hero-skeleton {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--btn-primary-text);
    background: var(--brand-gradient-hero);
    animation: fadeIn 0.3s ease-in-out;
}

/* Generic Loading Placeholder Blocks */
.loading-placeholder {
    background: var(--secondary-bg);
    border-radius: 16px;
    animation: fadeIn 0.3s ease-in-out;
}

.loading-placeholder--newsletter {
    height: 400px;
}

.loading-placeholder--projects {
    height: 600px;
}

.loading-placeholder--faqs {
    height: 500px;
}

.loading-placeholder--contact {
    height: 600px;
}


