/**
 * Mango SMP Landing Page Styles
 * 
 * This file contains all the CSS styles for the Mango SMP Minecraft server landing page.
 * It includes modern design elements, animations, responsive layout, and Minecraft-themed styling.
 * 
 * @file src/styles/main.css
 * @author Mango SMP Team
 * @version 1.0.0
 */

/* ===== CSS RESET & BASE STYLES ===== */

/* Reset default browser styles for consistent appearance across browsers */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Set base font and color variables for consistent theming */
:root {
  /* Color Palette - Minecraft-inspired with modern touches */
  --primary-color: #ff6b35;        /* Mango orange - primary brand color */
  --secondary-color: #2c3e50;      /* Dark blue-gray for contrast */
  --accent-color: #f39c12;         /* Golden yellow for highlights */
  --success-color: #27ae60;        /* Green for success states */
  --warning-color: #e74c3c;        /* Red for warnings/errors */
  --info-color: #3498db;           /* Blue for informational elements */
  
  /* Background Colors */
  --bg-primary: #1a1a1a;           /* Main dark background */
  --bg-secondary: #2d2d2d;         /* Secondary dark background */
  --bg-tertiary: #3a3a3a;          /* Tertiary dark background */
  --bg-card: #2a2a2a;              /* Card background */
  --bg-overlay: rgba(0, 0, 0, 0.8); /* Overlay background */
  
  /* Text Colors */
  --text-primary: #ffffff;         /* Primary text color */
  --text-secondary: #b0b0b0;       /* Secondary text color */
  --text-muted: #888888;           /* Muted text color */
  --text-accent: var(--primary-color); /* Accent text color */
  
  /* Border and Shadow Colors */
  --border-color: #404040;         /* Default border color */
  --border-light: #555555;         /* Light border color */
  --shadow-light: rgba(0, 0, 0, 0.1); /* Light shadow */
  --shadow-medium: rgba(0, 0, 0, 0.3); /* Medium shadow */
  --shadow-heavy: rgba(0, 0, 0, 0.5); /* Heavy shadow */
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Bungee', 'Inter', sans-serif;
  
  /* Spacing Scale */
  --space-xs: 0.25rem;    /* 4px */
  --space-sm: 0.5rem;     /* 8px */
  --space-md: 1rem;       /* 16px */
  --space-lg: 1.5rem;     /* 24px */
  --space-xl: 2rem;       /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  --space-4xl: 6rem;      /* 96px */
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 50%;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-popover: 1050;
  --z-tooltip: 1060;
  /* Dynamic header height fallback (overridden by JS at runtime) */
  --header-offset: 110px;
}

/* Base HTML and body styles */
html {
  scroll-behavior: smooth; /* Enable smooth scrolling for anchor links */
  /*
    Fluid root font-size for better scaling across devices.
    - 14px on very small screens
    - 16px default
    - 20px on large screens
  */
  font-size: clamp(14px, calc(12px + 0.8vw), 20px);
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Lock background scroll when mobile nav is open */
body.menu-open {
  overflow: hidden;
  touch-action: none;
}

/* Page main offset for subpages without tall heroes (use dynamic header height) */
.page-main {
  /* Ensure content never sits under the fixed header */
  padding-top: calc(var(--header-offset) + var(--space-xl) + env(safe-area-inset-top));
}

/* Wiki landing needs a touch more space under the fixed header */
.page-main.wiki-main {
  /* Reduce by 2.25rem for a tighter fit as requested */
  padding-top: calc(
    var(--header-offset)
    + var(--space-xl)
    + var(--space-xs)
    - 2.25rem
    + env(safe-area-inset-top)
  );
}

/* Offset in-page anchor targets to account for fixed header */
:target {
  scroll-margin-top: calc(var(--header-offset) + var(--space-sm) + env(safe-area-inset-top));
}

/* Make images and media scale responsively by default */
img, picture, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Improved touch targets and accessibility for interactive elements */
.btn, .nav-link, .copy-btn, .nav-toggle {
  /* Ensure minimum touch target of 44x44px per accessibility guidelines */
  min-height: 44px;
  min-width: 44px;
}

/* Utility: visually hide but accessible for screen readers */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ===== TYPOGRAPHY ===== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem); /* Responsive font size */
  font-weight: 900;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
}

/* Paragraph and text element styles */
p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65; /* slightly tighter for a compact, tasteful look */
}

/* Link styles with hover effects */
a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
  outline-offset: 2px;
}

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

/* Code element styling for server IP and technical content */
code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  background-color: var(--bg-tertiary);
  color: var(--primary-color);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  border: 1px solid var(--border-color);
}

/* ===== LAYOUT UTILITIES ===== */

/* Container class for consistent max-width and centering */
.container {
  max-width: 1320px; /* widen page content */
  margin: 0 auto;
  /* Slightly reduce side padding to gain usable width on laptops */
  padding: 0 clamp(var(--space-sm), 2.5vw, var(--space-xl));
}

/* Section spacing and layout */
section {
  padding: var(--space-4xl) 0;
  position: relative;
}

/* Section headers with consistent styling */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  margin-bottom: var(--space-md);
  position: relative;
  letter-spacing: 0.3px; /* headings slightly spaced for Bungee */
  display: inline-block; /* underline matches text width */
  padding-bottom: var(--space-sm); /* space for underline */
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0; /* draw directly under the text */
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: var(--radius-sm);
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== HEADER & NAVIGATION ===== */

/* Header container with sticky positioning */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Respect safe area insets on mobile (iOS) */
  padding-top: env(safe-area-inset-top);
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: var(--z-sticky);
  transition: all var(--transition-normal);
}

/* Global main padding removed so homepage isn't pushed down; subpages use .page-main */
main {
  padding-top: 0;
}

/* Scrolled header state with enhanced styling */
.header.scrolled {
  background: rgba(26, 26, 26, 0.98);
  box-shadow: 0 4px 20px var(--shadow-medium);
}

/* Navigation container with flexbox layout */
.nav {
  padding: var(--space-md) 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Ensure brand doesn't grow and nav can take remaining space */
.nav-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-right: var(--space-md);
}

/* Logo styling with icon and text */
.nav-brand {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap; /* keep brand on a single line */
}

.logo-icon {
  width: clamp(36px, 4.5vw, 50px);
  height: clamp(36px, 4.5vw, 50px);
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--primary-color));
  animation: logoGlow 2s ease-in-out infinite alternate;
}

/* Logo glow animation */
@keyframes logoGlow {
  0% {
    filter: drop-shadow(0 0 5px var(--primary-color));
  }
  100% {
    filter: drop-shadow(0 0 15px var(--primary-color));
  }
}

.logo-text {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap; /* prevent wrapping of brand text */
}

/* Navigation menu styling */
.nav-menu {
  display: flex;
  flex: 1 1 auto; /* allow nav to take remaining horizontal space */
  gap: clamp(0.5rem, 1vw, 1.2rem); /* reduce gap so items fit better */
  align-items: center;
  justify-content: flex-end; /* keep links to the right of the header */
  overflow: hidden; /* prevent wrapping into multiple lines */
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;       /* keep all links on one line on desktop */
  min-width: 0;            /* allow shrinking */
}

/* Subtle scrollbar for overflow when very tight */
.nav-menu::-webkit-scrollbar {
  height: 6px;
}
.nav-menu::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  padding: clamp(0.35rem, 0.6vw, var(--space-sm)) clamp(0.6rem, 1.2vw, var(--space-md));
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;     /* avoid breaking e.g., "Join Server" */
}

.nav-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-fast);
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile navigation toggle button */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px; /* slightly larger for touch */
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  transition: all var(--transition-fast);
  border-radius: var(--radius-sm);
}

/* Mobile menu active state */
.nav-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background-color: var(--primary-color);
}

.nav-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
  background-color: var(--primary-color);
}

/* Add transition for smooth animation */
.nav-toggle .bar {
  transition: all var(--transition-normal);
}

/* ===== HERO SECTION ===== */

/* Hero section with banner background and full viewport height */
.hero {
  min-height: 85vh; /* leave space for header on small screens */
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Hero background with banner */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.hero-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  /* Move image slightly down and scale to avoid bottom gap */
  transform: translateY(6%) scale(1.06);
  transform-origin: center top;
  transition: transform 280ms ease;
}

/* Slightly reduce transform on smaller screens so focal point stays visible */
@media (max-width: 900px) {
  .hero-banner {
    transform: translateY(8%) scale(1.1);
  }
}

@media (max-width: 480px) {
  .hero-banner {
    transform: translateY(10%) scale(1.14);
  }
}

/* Overlay for better text readability */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(45, 45, 45, 0.6) 100%);
  z-index: 2;
}

/* Hero background pattern overlay */
.hero::before {
  content: '';
  position: absolute;
    top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(243, 156, 18, 0.1) 0%, transparent 50%);
  z-index: 1;
}

/* Hero container with grid layout */
.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  position: relative;
  z-index: 3;
}

/* Reduce top spacing before the feature boxes under "Browse Topics" */
.wiki-browse {
  /* Slight top spacing under the page heading */
  padding-top: var(--space-md);
  padding-bottom: var(--space-2xl); /* tighter space below the cards */
}

/* Pull the cards closer to the heading/subtitle on the wiki page */
.wiki-browse .section-header {
  margin-bottom: var(--space-xl);
}

/* Hero content styling */
.hero-content {
  animation: slideInLeft 1s ease-out;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  margin-bottom: var(--space-lg);
  line-height: 1.1;
}

/* Highlight text with gradient effect */
.highlight {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  border-radius: var(--radius-sm);
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

/* Server status indicator */
.server-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 520px; /* allow more room on tablets */
  flex-wrap: wrap;
  justify-content: center;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

.status-indicator.status-online {
  background-color: var(--success-color);
  box-shadow: 0 0 10px var(--success-color);
}

.status-indicator.status-busy {
  background-color: var(--warning-color);
  box-shadow: 0 0 10px var(--warning-color);
}

.status-indicator.status-full {
  background-color: var(--info-color);
  box-shadow: 0 0 10px var(--info-color);
}

.status-indicator.status-offline {
  background-color: var(--text-muted);
  box-shadow: 0 0 10px var(--text-muted);
  animation: none;
}

.status-text {
    font-weight: 600;
  color: var(--text-primary);
}

.status-updated {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  width: 100%;
  margin-top: var(--space-xs);
}


/* Pulse animation for status indicator */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
  }
}

/* Hero buttons container */
.hero-buttons {
    display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

/* Button base styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 600;
    text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

/* Primary button styling */
.btn-primary {
  background: linear-gradient(135deg, rgba(255,107,53,0.9), rgba(243,156,18,0.9));
  color: var(--text-primary);
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(255, 107, 53, 0.45);
}

/* Secondary button styling */
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255,107,53,0.6);
}

.btn-secondary:hover {
  background: rgba(255,107,53,0.15);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

/* Large button variant */
.btn-large {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1.2rem;
}

/* Compact button variant for inline card actions */
.btn-small {
  padding: 0.45rem 0.8rem;
  font-size: 0.95rem;
  border-radius: 8px;
}

/* Button icon styling */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
  position: relative;
}

.btn-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* SVG specific styling for Discord icon */
.btn-icon img[src*="Discord-Symbol-White.svg"] {
  filter: brightness(0) invert(1);
}

.btn-icon-fallback {
  font-size: 1.2em;
}

/* Server IP display */
.server-ip {
  display: grid;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: clamp(340px, 92vw, 520px);
}

.ip-box {
  display: flex;
  align-items: center;
  width: 100%;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.ip-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.ip-address {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  background: var(--bg-tertiary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: text;
  cursor: text;
}

/* Prettier inline IP chip inside join steps and paragraphs */
.step-content .ip-address,
p .ip-address {
  display: inline-block;
  background: rgba(255, 107, 53, 0.10);
  border-color: rgba(255, 107, 53, 0.35);
  color: var(--primary-color);
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 4px 10px rgba(255, 107, 53, 0.12);
  /* Slightly lower the chip to tighten the space above it */
  vertical-align: -2px;
}

/* In wiki cards, show the inline IP chip on its own line with a small top gap */
.wiki-card p .ip-address {
  display: block;              /* start on its own line */
  width: max-content;          /* keep the chip hugging its text */
  margin-top: var(--space-sm); /* small gap from the paragraph above */
}

.ip-address::selection {
  background: rgba(255, 107, 53, 0.25);
  color: #fff;
}

.copy-btn {
  background: var(--primary-color);
  color: var(--text-primary);
  border: none;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  min-width: 44px;
  min-height: 44px;
}

.copy-btn:hover {
  background: var(--accent-color);
  transform: scale(1.1);
}

/* Copy feedback state */
.copy-btn.copied::after {
  content: 'Copied!';
  position: absolute;
  top: -1.8rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  pointer-events: none;
  white-space: nowrap;
}

/* Wiki content card wrapper for subpages */
.wiki-card,
/* Auto-cardify wiki <article> blocks so subpages don't need extra markup */
.page-main > article {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all var(--transition-normal);
  margin-top: var(--space-2xl); /* push box down from header area */
}

/* Ensure the first wiki card on subpages clears the fixed header fully
   by applying header-aware margin to the BOX itself (not just inner text). */
.page-main .breadcrumbs + .wiki-card,
.page-main .breadcrumbs + article {
  /* Use the dynamic header height plus a small buffer (reduced for a tighter layout) */
  margin-top: calc(var(--header-offset) + var(--space-xs));
}

.wiki-card:hover,
.page-main > article:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var(--shadow-medium);
  border-color: var(--primary-color);
}

/* Compact wiki subpage tweaks (smaller boxes and left-aligned subtitle) */
.wiki-card {
  /* slightly tighter padding for wiki pages so inner cards feel smaller */
  padding: var(--space-xl);
}

.wiki-card .section-subtitle {
  max-width: 900px;
  margin: 0 0 var(--space-lg) 0; /* remove auto-centering */
  text-align: left; /* ensure text starts at the left edge */
  color: var(--text-secondary);
}

.wiki-card .info-card {
  /* reduce inner card padding and radius to make boxes smaller */
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.00));
  border: 1px solid var(--border-color);
}

.wiki-card .info-card h3 {
  color: var(--text-accent);
  margin-bottom: calc(var(--space-xs));
  font-size: 1.05rem;
}

.wiki-card .info-card p {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
  font-size: 0.98rem;
}

/* Tighter heading spacing inside wiki cards */
.wiki-card h3 {
  margin-bottom: var(--space-sm);
}

/* Subtle inline note style in wiki cards */
.wiki-note {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Hero visual section */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: slideInRight 1s ease-out;
}

/* Server logo display */
.server-logo-display {
  width: 100%;
  /* much larger display for the floating image to make Steve/Alex prominent */
  max-width: 1200px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: logoFloat 3s ease-in-out infinite;
}

.hero-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* stronger drop shadow for better presence when larger */
  filter: drop-shadow(0 0 90px rgba(255, 107, 53, 0.75));
  border-radius: var(--radius-lg);
}

/* Special styling for triangle logo */
.triangle-logo {
  /* Remove border radius for triangle shape */
  border-radius: 0;
  /* Add rotation for dynamic effect */
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.triangle-logo:hover {
  /* slightly bigger hover tilt for a more dynamic effect */
  transform: rotate(12deg);
}

/* Logo floating animation */
@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    /* increase float amplitude so the larger image moves more noticeably */
    transform: translateY(-60px);
  }
}

/* Floating animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-30px) rotate(180deg);
  }
}

/* ===== FEATURES SECTION ===== */

/* Features section with alternating background */
.features {
  background: var(--bg-secondary);
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 107, 53, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(243, 156, 18, 0.05) 0%, transparent 50%);
}

/* Features grid layout */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(var(--space-md), 2.5vw, var(--space-xl));
  position: relative;
  z-index: 2;
  justify-content: center; /* centers the last row */
  align-items: stretch;
}

/* Feature card styling */
.feature-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  flex: 1 1 260px;        /* responsive base width */
  min-width: 260px;       /* ensures reasonable minimum */
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow-medium);
  border-color: var(--primary-color);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

/* Tasteful accent for the Voice Chat feature card */
.feature-card-voice {
  background: linear-gradient(180deg, rgba(52,152,219,0.06), rgba(255,255,255,0.01));
  border: 1px solid rgba(52,152,219,0.12);
}
.feature-card-voice .feature-title {
  color: var(--info-color);
}
.feature-card-voice .feature-icon {
  /* ensure no background or glow behind the inline headphone SVG */
  background: transparent;
}
.feature-card-voice .feature-icon svg {
  width: 56px;
  height: 56px;
  fill: currentColor;
  color: var(--primary-color);
  /* remove drop-shadow / glow so the icon appears clean on the card */
  filter: none;
}
.feature-card-voice .feature-description {
  color: var(--text-secondary);
  font-size: 0.98rem;
}

/* Per-card color accents (subtle tints, border, and title color) */
.feature-card-protection {
  background: linear-gradient(180deg, rgba(255,107,53,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,107,53,0.08);
}
.feature-card-protection .feature-title { color: rgba(255,107,53,1); }
/* removed colored box-shadow around emoji icons to avoid boxed outlines */

.feature-card-economy {
  background: linear-gradient(180deg, rgba(39,174,96,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(39,174,96,0.08);
}
.feature-card-economy .feature-title { color: rgba(39,174,96,1); }
/* removed colored box-shadow around emoji icons to avoid boxed outlines */

.feature-card-freeperks {
  background: linear-gradient(180deg, rgba(243,156,18,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(243,156,18,0.08);
}
.feature-card-freeperks .feature-title { color: rgba(243,156,18,1); }
/* removed colored box-shadow around emoji icons to avoid boxed outlines */

.feature-card-travel {
  background: linear-gradient(180deg, rgba(155,89,182,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(155,89,182,0.08);
}
.feature-card-travel .feature-title { color: rgba(155,89,182,1); }
/* removed colored box-shadow around emoji icons to avoid boxed outlines */

.feature-card-gameplay {
  background: linear-gradient(180deg, rgba(192,57,43,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(192,57,43,0.08);
}
.feature-card-gameplay .feature-title { color: rgba(192,57,43,1); }
/* removed colored box-shadow around emoji icons to avoid boxed outlines */

.feature-card-cosmetics {
  background: linear-gradient(180deg, rgba(255,105,180,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,105,180,0.08);
}
.feature-card-cosmetics .feature-title { color: rgba(255,105,180,1); }
/* removed colored box-shadow around emoji icons to avoid boxed outlines */

/* voice kept as-is (blue tint) */

.feature-card-servermap {
  background: linear-gradient(180deg, rgba(52,152,219,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(52,152,219,0.06);
}
.feature-card-servermap .feature-title { color: rgba(52,152,219,1); }
/* removed colored box-shadow around emoji icons to avoid boxed outlines */

.feature-card-graves {
  background: linear-gradient(180deg, rgba(127,140,141,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(127,140,141,0.06);
}
.feature-card-graves .feature-title { color: rgba(127,140,141,1); }
/* removed colored box-shadow around emoji icons to avoid boxed outlines */

.feature-card-donation {
  background: linear-gradient(180deg, rgba(241,196,15,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(241,196,15,0.08);
}
.feature-card-donation .feature-title { color: rgba(241,196,15,1); }
/* removed colored box-shadow around emoji icons to avoid boxed outlines */

.feature-card-interface {
  background: linear-gradient(180deg, rgba(52,73,94,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(52,73,94,0.06);
}
.feature-card-interface .feature-title { color: rgba(52,73,94,1); }
/* removed colored box-shadow around emoji icons to avoid boxed outlines */

.feature-card-stats {
  background: linear-gradient(180deg, rgba(26,188,156,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(26,188,156,0.06);
}
.feature-card-stats .feature-title { color: rgba(26,188,156,1); }
/* removed colored box-shadow around emoji icons to avoid boxed outlines */

/* Feature icon styling */
.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--primary-color));
  animation: iconPulse 2s ease-in-out infinite;
  border-radius: var(--radius-md);
}

/* Special styling for triangle feature icons */
.feature-icon img[src*="MC_Play_together.png"] {
  border-radius: 0;
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.feature-icon img[src*="MC_Play_together.png"]:hover {
  transform: rotate(3deg);
}

.feature-icon-fallback {
  font-size: 3rem;
  filter: drop-shadow(0 0 10px var(--primary-color));
  animation: iconPulse 2s ease-in-out infinite;
}

/* Emoji sizing inside feature icons */
.feature-icon-emoji {
  font-size: 2.2rem; /* match the visual weight of the svg icon */
  line-height: 1;
  display: inline-block;
}

/* (feature-photo removed) */

/* Icon pulse animation */
@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.feature-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.95rem;
}

/* ===== SERVER INFO SECTION ===== */

/* Server info section styling */
.server-info {
  background: var(--bg-primary);
}

/* Info grid layout */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(var(--space-md), 2.5vw, var(--space-xl));
}

/* Info card styling */
.info-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all var(--transition-normal);
}

/* Card action area (buttons) */
.info-card .card-actions {
  margin-top: var(--space-md);
}

.download-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.download-btn::before {
  /* small download arrow icon using CSS content fallback (visual hint) */
  content: "\2193"; /* downward arrow glyph */
  display: inline-block;
  font-size: 1.05rem;
  transform: translateY(-1px);
  color: var(--text-primary);
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var(--shadow-medium);
  border-color: var(--primary-color);
}

.info-card h3 {
  color: var(--primary-color);
  margin-bottom: var(--space-lg);
  font-size: 1.5rem;
}

/* Info list styling */
.info-list {
  list-style: none;
}

.info-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Force top/bottom dividers for special cases (e.g., single-item lists) */
.info-list.force-dividers li:first-child {
  border-top: 1px solid var(--border-color);
}
.info-list.force-dividers li:last-child {
  border-bottom: 1px solid var(--border-color);
}

/* Connect info styling */
.connect-info p {
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
}

.ip-display {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.ip-display code {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  background: transparent;
  border: none;
  padding: 0;
}

/* ===== RULES SECTION ===== */

/* Rules section with special background */
.rules {
  background: var(--bg-secondary);
  position: relative;
  /* add breathing room below the rules cards so they don't touch the next section */
  padding-bottom: var(--space-3xl);
  /* pull the rules block up slightly so it sits closer to the previous section */
  margin-top: -10px; /* user requested 10px */
}

.rules::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(45deg, rgba(255, 107, 53, 0.03) 0%, transparent 50%),
    linear-gradient(-45deg, rgba(243, 156, 18, 0.03) 0%, transparent 50%);
}

/* Rules container */
.rules-container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

/* Rules list styling */
.rules-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.rule-item {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.rule-item:hover {
  transform: translateX(10px);
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px var(--shadow-light);
}

.rule-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  color: var(--text-primary);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.rule-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.5;
}

/* Rules note styling */
.rules-note {
  background: var(--bg-card);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  border: 2px solid var(--warning-color);
    position: sticky;
  top: var(--space-xl);
}

.rules-note h4 {
  color: var(--warning-color);
  margin-bottom: var(--space-md);
  font-size: 1.3rem;
}

.rules-note p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ===== RULES PAGE TWEAKS ===== */
/* Specific adjustments to make the /rules page more compact and card-like
   without affecting other info-lists or rules components used elsewhere. */
.rules-page .section-subtitle {
  max-width: 900px;
  margin: 0 0 var(--space-lg) 0;
  text-align: left;
  color: var(--text-secondary);
}

.rules-page .section-title {
  display: inline-block; /* keep underline width matched to the text */
}

.rules-page .info-list {
  display: block;
  margin-top: var(--space-lg);
}


.rules-page .info-list li {
  border: none; /* remove dividing line around overall list items */
  padding: 0;
  margin-bottom: var(--space-md); /* tighter spacing between cards */
}

.rules-page .info-card {
  padding: var(--space-md); /* reduced padding to make cards more compact */
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.00));
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0,0,0,0.28);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.rules-page .info-card h3 {
  color: var(--text-accent);
  margin-bottom: calc(var(--space-xs));
  font-size: 1.05rem;
}

.rules-page .info-card p {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
  font-size: 0.98rem;
}

.rules-page .info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,107,53,0.85);
  box-shadow: 0 12px 24px rgba(0,0,0,0.40);
}

.rules-page .section-title {
  margin-bottom: var(--space-md);
}

/* ===== COMMUNITY SECTION ===== */

/* Community section styling */
.community {
  background: var(--bg-primary);
}

/* Community links grid */
.community-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

/* Community link styling */
.community-link {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-2xl);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
}

.community-link:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow-medium);
  border-color: var(--primary-color);
}

.link-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.link-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--primary-color));
}

/* SVG specific styling for Discord icon in community links */
.link-icon img[src*="Discord-Symbol-White.svg"] {
  filter: drop-shadow(0 0 10px var(--primary-color)) brightness(0) invert(1);
}

.link-icon img[src*="Reddit_Icon.svg"] {
  filter: drop-shadow(0 0 10px var(--primary-color));
}

.link-icon-fallback {
  font-size: 3rem;
  filter: drop-shadow(0 0 10px var(--primary-color));
}

.link-content h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-size: 1.3rem;
}

.link-content p {
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.5;
}

/* Discord link special styling */
.community-link.discord:hover {
  border-color: #5865F2;
  box-shadow: 0 20px 40px rgba(88, 101, 242, 0.3);
}

.community-link.discord .link-icon {
  filter: drop-shadow(0 0 10px #5865F2);
}

/* TikTok link special styling */
.community-link.tiktok:hover {
  border-color: #FE2C55;
  box-shadow: 0 20px 40px rgba(255, 0, 0, 0.3);
}

.community-link.tiktok .link-icon {
  filter: drop-shadow(0 0 10px #FE2C55);
}

/* Reddit link special styling */
.community-link.reddit:hover {
  border-color: #FF4500;
  box-shadow: 0 20px 40px rgba(255, 69, 0, 0.3);
}

.community-link.reddit .link-icon {
  filter: drop-shadow(0 0 10px #FF4500);
}

/* ===== JOIN SECTION ===== */

/* Join section with gradient background */
.join-section {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  position: relative;
  overflow: hidden;
}

.join-section::before {
  content: '';
  position: absolute;
    top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 30% 70%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(243, 156, 18, 0.1) 0%, transparent 50%);
}

/* Join content styling */
.join-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.join-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.join-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-3xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Join steps styling */
.join-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.step {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  text-align: left;
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var(--shadow-medium);
  border-color: var(--primary-color);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  color: var(--text-primary);
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.step-content h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-size: 1.2rem;
}

.step-content p {
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.5;
}

/* Join buttons styling */
.join-buttons {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== FOOTER ===== */

/* Footer styling */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-3xl) 0 var(--space-xl);
}

/* Footer content grid */
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

/* Footer section styling */
.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  font-size: 1.2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.footer-logo .logo-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px var(--primary-color));
}

.footer-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Footer links styling */
.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

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

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

/* Footer bottom styling */
.footer-bottom {
  text-align: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-color);
}

.footer-bottom p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* ===== ANIMATIONS ===== */

/* Slide in animations for hero content */
@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Tablet styles (992px and below) */
@media (max-width: 992px) {
  /* Hero section mobile styles */
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    text-align: center;
    padding-top: calc(var(--space-2xl) + env(safe-area-inset-top));
  }
  
  .hero-visual {
    order: -1;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .server-logo-display {
    /* slightly larger on tablets/phones so the image remains visible */
    width: clamp(240px, 40vw, 420px);
    height: clamp(240px, 40vw, 420px);
  }
  
  .hero-banner {
    opacity: 0.2;
  }

  /* Navigation mobile styles */
  .nav-menu {
    position: fixed;
    /* Position dropdown directly below the actual header height */
    top: calc(var(--header-offset) + env(safe-area-inset-top));
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: calc(var(--space-lg) + env(safe-area-inset-top)) var(--space-xl) calc(var(--space-xl) + env(safe-area-inset-bottom));
    gap: var(--space-lg);
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
    z-index: var(--z-dropdown);
    box-shadow: 0 4px 20px var(--shadow-medium);
    max-height: calc(100vh - var(--header-offset) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  
  .nav-menu.active {
    transform: translateY(0);
  }
  
  .nav-menu .nav-link {
    width: 100%;
    text-align: center;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    transition: all var(--transition-normal);
  }

  .nav-menu .nav-link:hover {
    background: var(--bg-tertiary);
    transform: translateY(0);
  }
  
  .nav-toggle {
    display: flex;
    z-index: var(--z-dropdown);
  }
  
  /* Hero section mobile layout */
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    text-align: center;
  }
  
  .hero-visual {
    order: -1;
  }
  
  .minecraft-block {
    width: 150px;
    height: 150px;
  }
  
  /* Features grid mobile (flexbox) */
  .features-grid .feature-card {
    flex: 1 1 100%;
  }
  
  /* Info grid mobile */
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  /* Rules container mobile */
  .rules-container {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .rules-note {
    position: static;
  }
  
  /* Community links mobile */
  .community-links {
    grid-template-columns: 1fr;
  }
  
  /* Join steps mobile */
  .join-steps {
    grid-template-columns: 1fr;
  }
  
  .step {
    flex-direction: column;
    text-align: center;
  }
  
  /* Footer content mobile */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  /* Button adjustments for mobile */
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .join-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

/* iPad / medium screens (<= 1200px) subtle spacing & nav tweaks */
@media (max-width: 1200px) and (min-width: 993px) {
  .nav-menu {
    gap: clamp(0.4rem, 0.8vw, 0.9rem);
  }
  .logo {
    gap: var(--space-xs);
  }
  .feature-card {
    padding: var(--space-xl) var(--space-xl);
  }
  .container {
    padding-left: clamp(var(--space-sm), 2vw, var(--space-lg));
    padding-right: clamp(var(--space-sm), 2vw, var(--space-lg));
  }
}

/* Mobile styles (480px and below) */
@media (max-width: 480px) {
  /* Container padding adjustment */
  .container {
    padding: 0 var(--space-md);
  }
  
  /* Section padding adjustment */
  section {
    padding: var(--space-2xl) 0;
  }
  
  /* Hero title size adjustment */
  .hero-title {
    font-size: 2rem;
  }
  
  /* Feature card padding adjustment */
  .feature-card {
    padding: var(--space-xl);
  }
  
  /* Info card padding adjustment */
  .info-card {
    padding: var(--space-xl);
  }
  
  /* Community link padding adjustment */
  .community-link {
    padding: var(--space-xl);
  }
  
  /* Step padding adjustment */
  .step {
    padding: var(--space-lg);
  }
}

/* Very small phones (360px and below) - ensure readability */
@media (max-width: 360px) {
  :root {
    --space-sm: 0.4rem;
    --space-md: 0.8rem;
    --space-lg: 1.2rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }
}

/* Very large screens - enhance spacing and max widths */
@media (min-width: 1600px) {
  .container {
    max-width: 1500px;
  }

  :root {
    --space-4xl: 8rem;
  }
}

/* ===== WIKI LAYOUT ===== */
.wiki-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-2xl);
}

.wiki-sidebar {
  position: sticky;
  top: calc(var(--header-offset) + var(--space-md));
  align-self: start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.wiki-sidebar h3 {
  margin-bottom: var(--space-md);
}

.wiki-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.wiki-nav a {
  color: var(--text-secondary);
  padding: .5rem .75rem;
  border-radius: var(--radius-md);
  display: block;
}

.wiki-nav a:hover,
.wiki-nav a.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.wiki-content {
  min-width: 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .95rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.breadcrumbs a {
  color: var(--text-accent);
}

/* Role badges for admin/staff UIs */
.role-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.85rem;
  line-height: 1.2;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.role-badge[data-role="Founder"] {
  background: rgba(255, 107, 53, 0.15);
  border-color: rgba(255, 107, 53, 0.45);
  color: #ffa37a;
}
.role-badge[data-role="Admin"] {
  background: rgba(52, 152, 219, 0.15);
  border-color: rgba(52, 152, 219, 0.45);
  color: #79b8e8;
}
.role-badge[data-role="Moderator"] {
  background: rgba(39, 174, 96, 0.15);
  border-color: rgba(39, 174, 96, 0.45);
  color: #7dd9a2;
}
.role-badge[data-role="Helper"] {
  background: rgba(155, 89, 182, 0.15);
  border-color: rgba(155, 89, 182, 0.45);
  color: #c89bdd;
}
.role-badge[data-role="Development Access"] {
  background: rgba(241, 196, 15, 0.15);
  border-color: rgba(241, 196, 15, 0.45);
  color: #f6dc7a;
}

@media (max-width: 992px) {
  .wiki-layout {
    grid-template-columns: 1fr;
  }
  .wiki-sidebar {
    position: static;
    order: -1;
  }
}

/* ===== ACCESSIBILITY ===== */

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-link:focus,
.copy-btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #ffffff;
    --text-secondary: #ffffff;
    --bg-card: #000000;
  }
}

/* ===== PRINT STYLES ===== */

@media print {
  /* Hide interactive elements for print */
  .nav-toggle,
  .copy-btn,
  .btn {
    display: none;
  }
  
  /* Adjust colors for print */
  body {
    background: white;
    color: black;
  }
  
  /* Ensure proper page breaks */
  section {
    page-break-inside: avoid;
  }
}

/* Small screens (<=600px) adjustments: cap floating logo, reduce float amplitude, allow overflow */
@media (max-width: 600px) {
  .hero {
    overflow: visible;
    min-height: 72vh;
  }

  .server-logo-display {
    width: clamp(160px, 34vw, 320px);
    height: clamp(160px, 34vw, 320px);
    max-height: 40vh;
    animation: logoFloatSmall 3s ease-in-out infinite;
  }

  .hero-logo {
    filter: drop-shadow(0 0 24px rgba(255, 107, 53, 0.5));
    max-height: 40vh;
    width: auto;
  }

  @keyframes logoFloatSmall {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-18px); }
  }
}