/* ===== Starminer Guide - Main Stylesheet ===== */

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

:root {
  --bg-primary: #080c14;
  --bg-secondary: #0f1520;
  --bg-card: #161d2e;
  --border: #243044;
  --text-primary: #e4eaf3;
  --text-secondary: #8899b4;
  --accent: #ff8c42;
  --accent-glow: rgba(255, 140, 66, 0.12);
  --accent2: #4da6ff;
  --warning: #f0c040;
  --danger: #e04060;
  --max-width: 1100px;
  --radius: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--accent2); text-decoration: none; transition: color 0.2s; }
a:hover { color: #6dbfff; }

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* --- Header / Nav --- */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
}

.navbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-width); margin: 0 auto; padding: 0 20px; height: 60px;
}

.logo {
  font-size: 1.3rem; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 8px; list-style: none; flex-wrap: wrap; }
.nav-links a {
  color: var(--text-secondary); padding: 6px 14px; border-radius: 6px;
  font-size: 0.9rem; font-weight: 500; transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); background: var(--accent-glow); }

.menu-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, #0f1a2e 50%, #1a0f20 100%);
  padding: 60px 0; text-align: center; border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 2.4rem; margin-bottom: 12px; line-height: 1.3; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--text-secondary); font-size: 1.1rem; max-width: 650px; margin: 0 auto 24px; }
.hero .badge {
  display: inline-block; background: var(--accent-glow); color: var(--accent);
  padding: 4px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 500;
  margin-bottom: 16px;
}

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 10px 24px; border-radius: 6px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all 0.2s;
  border: none; text-align: center;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #ffa066; color: #000; }
.btn-outline {
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-glow); color: #ffa066; }

/* --- Sections --- */
.section { padding: 50px 0; }
.section-title {
  font-size: 1.8rem; margin-bottom: 8px; text-align: center;
}
.section-subtitle { color: var(--text-secondary); text-align: center; margin-bottom: 36px; }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* --- Card Grid --- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; transition: all 0.2s;
}
.card:hover { border-color: var(--accent); box-shadow: 0 4px 24px rgba(255, 140, 66, 0.08); }
.card-icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card h3 a { color: var(--text-primary); }
.card h3 a:hover { color: var(--accent2); }
.card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

.card-tag {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: 0.75rem; font-weight: 600; margin-top: 12px;
}
.tag-new { background: rgba(77, 166, 255, 0.15); color: var(--accent2); }
.tag-hot { background: var(--accent-glow); color: var(--accent); }
.tag-guide { background: rgba(160, 120, 255, 0.12); color: #a078ff; }

/* --- Content Page --- */
.content-page { padding: 40px 0; }
.breadcrumb { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 24px; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent2); }

.article-header { margin-bottom: 28px; }
.article-header h1 { font-size: 2rem; margin-bottom: 10px; }
.article-header .meta { display: flex; gap: 20px; color: var(--text-secondary); font-size: 0.85rem; flex-wrap: wrap; }

article h2 {
  font-size: 1.5rem; margin: 40px 0 16px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border); color: var(--accent);
}
article h3 { font-size: 1.2rem; margin: 28px 0 10px; color: var(--text-primary); }
article p { margin-bottom: 14px; color: var(--text-secondary); }
article ul, article ol { margin: 0 0 20px 24px; color: var(--text-secondary); }
article li { margin-bottom: 6px; }

/* --- Table --- */
.table-wrap { overflow-x: auto; margin: 16px 0 24px; }
table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
  background: var(--bg-card); border-radius: var(--radius); overflow: hidden;
}
thead { background: var(--bg-secondary); }
th {
  text-align: left; padding: 12px 16px; font-weight: 600;
  color: var(--text-primary); border-bottom: 2px solid var(--border);
}
td { padding: 10px 16px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* --- Info Boxes --- */
.info-box {
  padding: 16px 20px; border-radius: var(--radius); margin: 16px 0 24px;
  border-left: 4px solid;
}
.info-box h4 { font-size: 0.95rem; margin-bottom: 4px; }
.info-box p, .info-box li { font-size: 0.9rem; color: var(--text-secondary); }
.info-box.tip { background: rgba(77, 166, 255, 0.08); border-color: var(--accent2); }
.info-box.tip h4 { color: var(--accent2); }
.info-box.warn { background: rgba(240, 192, 64, 0.08); border-color: var(--warning); }
.info-box.warn h4 { color: var(--warning); }
.info-box.danger { background: rgba(224, 64, 96, 0.08); border-color: var(--danger); }
.info-box.danger h4 { color: var(--danger); }

/* --- TOC --- */
.toc {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 32px;
}
.toc h3 { font-size: 1rem; margin-bottom: 10px; color: var(--text-primary); }
.toc ol { margin: 0 0 0 20px; }
.toc li { margin-bottom: 6px; font-size: 0.9rem; }
.toc a { color: var(--text-secondary); }
.toc a:hover { color: var(--accent2); }

/* --- Ad Slots --- */
.ad-slot {
  background: var(--bg-card); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  color: var(--text-secondary); font-size: 0.8rem; margin: 20px 0;
  display: none; /* Hidden until AdSense approved */
}
.ad-slot.horizontal { min-height: 90px; }

/* --- Footer --- */
.site-footer {
  background: var(--bg-secondary); border-top: 1px solid var(--border);
  padding: 30px 0; text-align: center; font-size: 0.85rem; color: var(--text-secondary);
}
.site-footer a { color: var(--accent2); }

/* --- Back to Top --- */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px;
  background: var(--accent); color: #000; border: none;
  width: 44px; height: 44px; border-radius: 50%;
  font-size: 1.2rem; cursor: pointer; opacity: 0; transform: translateY(20px);
  transition: all 0.3s; pointer-events: none; z-index: 99;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: #ffa066; }

/* --- Banner --- */
.announcement-banner {
  background: var(--accent-glow); border-bottom: 1px solid rgba(255, 140, 66, 0.2);
  padding: 10px 0; text-align: center; font-size: 0.85rem; color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column; width: 100%;
    position: absolute; top: 60px; left: 0;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border);
    padding: 12px 20px;
  }
  .nav-links.open { display: flex; }
  .hero h1 { font-size: 1.7rem; }
  .card-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 1.5rem; }
  .back-to-top { bottom: 20px; right: 20px; }
}
