/* style.css */
:root {
  --bg: #0D1018;
  --panel: #121621;
  --ink: #E9EDF5;
  --dim: #76839C;
  --line: rgba(233, 237, 245, 0.09);
  --acc: #FF9E54;

  --primary-color: var(--acc);
  --primary-hover: #E88C45;
  --bg-color: var(--bg);
  --text-color: var(--ink);
  --text-light: var(--dim);
  --card-bg: var(--panel);
  --border-color: var(--line);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  line-height: 1.8;
  color: var(--text-color);
  background-color: var(--bg-color);
  font-weight: 400;
}

/* Background & Dice */
#dice-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: auto; /* Catch drags */
  background: var(--bg);
  overflow: hidden;
}
.dice-corner {
  position: absolute;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.corner-tl { top: 20px; left: 20px; }
.corner-bl { bottom: 20px; left: 20px; }
.corner-br { bottom: 20px; right: 20px; }

#dice-tray {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 400px;
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
#dice-tray-inner {
  position: relative;
  width: 100%;
  height: 100%;
}
.dice-result {
  position: absolute;
  bottom: 30px;
  width: 100%;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--acc);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}
.dice {
  position: absolute;
  width: 50px;
  height: 50px;
  background-color: var(--acc);
  border-radius: 8px; /* Rounded block */
  box-shadow: inset 0 0 10px rgba(0,0,0,0.2), 0 5px 15px rgba(0,0,0,0.3);
  cursor: grab;
  /* Setup 3D transform origin */
  transform-style: preserve-3d;
  /* Faces styling done in JS or via classes if needed, we'll keep it simple: 
     Actually, a simple 2D dice that spins 3D is easiest. 
     The prompt says: "六面骰（骰面即 CPU / 内存参数）" -> let's just make the face update text.
     Wait, "五点骰面" -> standard pip face, or just numbers. We'll draw pips or numbers in JS. */
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 24px;
  color: #0D1018;
  font-weight: bold;
  user-select: none;
  touch-action: none; /* Prevent scroll on touch drag */
}
.dice:active { cursor: grabbing; }

/* Pointer events passthrough for overlaying layout */
/* The layout sits on top of dice-bg, so empty areas must pass clicks through */
main, header, footer, .container, .hero, .features, .media-ai, .pricing, .testimonials, .faq, .subpage-header, .subpage-content {
  pointer-events: none;
}
a, button, .card, .faq-item, .btn {
  pointer-events: auto;
}

h1, h2, h3, h4, h5, h6, .logo {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  color: var(--ink);
}
h1 { font-weight: 700; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background-color: rgba(18, 22, 33, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  pointer-events: auto; /* header background can catch clicks or not? Better let it auto so it doesn't let dice drag thru header */
}

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

.logo {
  font-size: 24px;
}

.main-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}
.main-nav a {
  text-decoration: none;
  color: var(--text-color);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.4s ease;
}
.main-nav a:hover {
  color: var(--acc);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--acc);
  color: #0D1018; /* Solid button dark text */
  text-decoration: none;
  border-radius: 3px;
  font-weight: 600;
  font-family: 'Sora', sans-serif;
  text-align: center;
  transition: background-color 0.4s ease;
  border: 1px solid transparent;
}
.btn:hover {
  background-color: var(--primary-hover);
}
.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}
.btn[style*="background-color: #10B981"] {
  /* Override the inline green button to match theme */
  background-color: var(--panel) !important;
  color: var(--ink) !important;
  border: 1px solid var(--border-color) !important;
}
.btn[style*="background-color: #10B981"]:hover {
  border-color: rgba(255, 158, 84, 0.5) !important;
  color: var(--acc) !important;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 80px 20px;
  /* Removed gradient */
}
.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
}
.hero p {
  font-size: 18px;
  color: var(--dim);
  max-width: 600px;
  margin: 0 auto 30px;
}

/* Sections */
section { padding: 80px 20px; }
.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 40px;
}

/* Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Cards */
.card, .faq-item {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 3px;
  border: 1px solid var(--border-color);
  transition: border-color 0.4s ease, transform 0.4s ease;
}
.card:hover, .faq-item:hover {
  border-color: rgba(255, 158, 84, 0.5);
  transform: translateY(-5px);
}
.card:hover h3, .faq-item:hover h4 {
  color: var(--acc);
}
.card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  transition: color 0.4s ease;
}
.card p {
  color: var(--dim);
  font-size: 14px;
}

/* Pricing */
.pricing-card { text-align: center; }
.pricing-card .price {
  font-family: 'Space Mono', monospace;
  font-size: 36px;
  margin: 20px 0;
  color: var(--ink);
  letter-spacing: 0;
}
.pricing-card .price span {
  font-size: 14px;
  color: var(--dim);
}
.pricing-card ul {
  list-style: none;
  margin-bottom: 30px;
  text-align: left;
}
.pricing-card ul li {
  margin-bottom: 10px;
  padding-left: 24px;
  position: relative;
  font-size: 14px;
  color: var(--dim);
}
.pricing-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background-color: var(--dim);
  border-radius: 50%;
}
.card:hover ul li::before {
  background-color: var(--acc);
}

/* Testimonials */
.testimonial-card { font-style: normal; }
.testimonial-author {
  margin-top: 15px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--acc);
}

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item h4 {
  font-size: 16px;
  margin-bottom: 10px;
  transition: color 0.4s ease;
}
.faq-item p {
  font-size: 14px;
  color: var(--dim);
}

/* Footer */
footer {
  background-color: var(--bg);
  border-top: 1px solid var(--border-color);
  padding: 60px 20px 20px;
  pointer-events: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 40px;
}
.footer-col h4 {
  margin-bottom: 20px;
  font-size: 16px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-col a {
  color: var(--dim);
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  transition: color 0.4s ease;
}
.footer-col a:hover {
  color: var(--acc);
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--dim);
  font-size: 12px;
  font-family: 'Space Mono', monospace;
}

/* Subpage */
.subpage-header {
  background: transparent;
  padding: 60px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}
.subpage-content {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.subpage-content h2 {
  margin: 30px 0 15px;
  color: var(--ink);
}
.subpage-content p, .subpage-content ul {
  color: var(--dim);
}
.subpage-content a {
  color: var(--acc);
}

/* Scroll Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: revealUp 0.4s ease forwards;
}
@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .grid-3, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .btn { display: block; width: 100%; margin-bottom: 10px; }
  #dice-tray { width: 90%; height: 300px; }
}

/* A11y: Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--acc);
    color: var(--bg);
    padding: 8px 16px;
    z-index: 9999;
    transition: top 0.2s ease;
    text-decoration: none;
    font-weight: bold;
}
.skip-link:focus {
    top: 0;
}

/* A11y: Focus */
:focus-visible {
    outline: 2px dashed var(--acc);
    outline-offset: 4px;
}

/* Anchor overlap fix */
section[id] {
    scroll-margin-top: 80px;
}

/* FAQ Details/Summary */
details.faq-item {
    cursor: pointer;
    background-color: var(--panel);
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid var(--line);
    transition: background 0.3s;
}
details.faq-item > summary {
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    list-style: none; /* Hide default triangle in standard browsers */
    display: flex;
    justify-content: space-between;
    align-items: center;
}
details.faq-item > summary::-webkit-details-marker {
    display: none; /* Hide in Safari */
}
details.faq-item > summary::after {
    content: '+';
    font-size: 24px;
    color: var(--dim);
    transition: transform 0.3s;
}
details.faq-item[open] > summary::after {
    transform: rotate(45deg);
}
details.faq-item > p {
    padding: 0 20px 20px;
    margin: 0;
    color: var(--dim);
}
