/* ============================================
   MINECRAFT SURVIVAL GUIDE - STYLES
   Minecraft-themed color palette and design
   ============================================ */

/* CSS Custom Properties (Variables) */
:root {
  /* Minecraft-themed colors */
  --primary: #3C8527;        /* Grass green */
  --secondary: #8B4513;      /* Dirt brown */
  --accent: #FF6B35;         /* Torch/lava orange */
  --dark: #1D1D1D;           /* Dark stone */
  --light: #F5F5DC;          /* Beacon light */
  --text: #333333;           /* Dark gray for text */
  --bg: #FAFAFA;             /* Light background */

  /* Semantic colors */
  --danger: #DC3545;
  --success: #28A745;
  --warning: #FFC107;
  --info: #17A2B8;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Courier New", Courier, monospace;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ============================================
   HEADER
   ============================================ */

.main-header {
  background: linear-gradient(135deg, var(--primary) 0%, #2d6a1f 100%);
  color: white;
  padding: var(--spacing-xl) 0;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: 0.95;
  font-weight: 400;
}

/* ============================================
   NAVIGATION
   ============================================ */

.sticky-nav {
  position: sticky;
  top: 0;
  background: white;
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  border-bottom: 3px solid var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--primary);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 3px;
}

.nav-links {
  display: flex;
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
  padding: var(--spacing-sm) 0;
}

.nav-links li {
  margin: 0 var(--spacing-sm);
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  background-color: var(--primary);
  color: white;
}

.nav-links a.active {
  background-color: var(--primary);
  color: white;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.hero-content h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--spacing-md);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-text {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto var(--spacing-lg);
  line-height: 1.8;
  opacity: 0.95;
}

.hero-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  max-width: 900px;
  margin: 0 auto var(--spacing-lg);
}

.info-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-icon {
  font-size: 2.5rem;
}

.info-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.info-card p {
  font-size: 0.9rem;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  background-color: var(--accent);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background-color: #e55a2b;
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

.content-section {
  padding: var(--spacing-xl) 0;
  border-bottom: 1px solid #e0e0e0;
}

.content-section:nth-child(even) {
  background-color: #f5f5f5;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-tag {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--dark);
  margin-bottom: var(--spacing-xs);
}

.subtitle {
  font-size: 1.1rem;
  color: #666;
  font-style: italic;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
}

.card h3 {
  color: var(--dark);
  margin-bottom: var(--spacing-md);
  font-size: 1.5rem;
}

.card h4 {
  color: var(--primary);
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  font-size: 1.2rem;
}

.card h5 {
  color: var(--secondary);
  margin-top: var(--spacing-sm);
  margin-bottom: var(--spacing-xs);
  font-size: 1.1rem;
  font-weight: 600;
}

.card ul,
.card ol {
  margin-left: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.card li {
  margin-bottom: 0.5rem;
}

.card ul ul {
  margin-top: 0.5rem;
}

.priority-card {
  border-left-color: var(--accent);
  background: linear-gradient(135deg, #fff5f0 0%, #ffffff 100%);
}

.important-card {
  border-left-color: var(--info);
  background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
}

.final-note {
  border-left-color: var(--primary);
  background: linear-gradient(135deg, #f1f8e9 0%, #ffffff 100%);
  text-align: center;
}

/* ============================================
   STEP CARDS
   ============================================ */

.step-card {
  display: flex;
  gap: var(--spacing-md);
  background: white;
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid #e0e0e0;
}

.step-number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.step-content h4 {
  color: var(--primary);
  margin-bottom: var(--spacing-sm);
  font-size: 1.3rem;
}

.step-content ul {
  margin-left: var(--spacing-md);
}

/* ============================================
   SAFETY RULES
   ============================================ */

.safety-rules {
  background: #fff3cd;
  border-left: 5px solid var(--warning);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

.safety-rules h3 {
  color: #856404;
  margin-bottom: var(--spacing-md);
  font-size: 1.5rem;
}

.safety-list {
  list-style: none;
  padding: 0;
}

.safety-list li {
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  border-radius: var(--radius-sm);
}

.safety-list li.danger {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 4px solid var(--danger);
}

.safety-list li.safe {
  background-color: #d4edda;
  color: #155724;
  border-left: 4px solid var(--success);
}

/* ============================================
   CODE BLOCKS
   ============================================ */

.code-block {
  background-color: var(--dark);
  color: #f8f8f2;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: var(--spacing-sm) 0;
}

/* ============================================
   INLINE ELEMENTS
   ============================================ */

code {
  background-color: #f4f4f4;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--primary);
}

.highlight {
  background-color: #fff3cd;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-weight: 600;
}

.warning {
  color: var(--danger);
  font-weight: 600;
}

.danger {
  color: var(--danger);
  font-weight: 600;
}

.safe {
  color: var(--success);
  font-weight: 600;
}

.tip {
  background-color: #d1ecf1;
  color: #0c5460;
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--info);
  margin: var(--spacing-sm) 0;
}

.important {
  color: var(--accent);
  font-weight: 600;
}

.quote {
  font-style: italic;
  color: #666;
  font-size: 1.05rem;
  border-left: 4px solid var(--secondary);
  padding-left: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.final-quote {
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: var(--spacing-md);
}

/* ============================================
   FOOTER
   ============================================ */

.main-footer {
  background-color: var(--dark);
  color: white;
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.footer-links {
  margin: var(--spacing-md) 0;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links span {
  margin: 0 var(--spacing-sm);
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 0;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
  }

  .step-card {
    flex-direction: column;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .card {
    padding: var(--spacing-md);
  }

  .hero-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  .title {
    font-size: 1.75rem;
  }

  .content-section {
    padding: var(--spacing-lg) 0;
  }

  .card ul,
  .card ol {
    margin-left: var(--spacing-sm);
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .sticky-nav,
  .main-footer,
  .cta-button {
    display: none;
  }

  .content-section {
    page-break-inside: avoid;
  }

  .card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible for keyboard navigation */
a:focus,
button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
