/* ===== Variables ===== */
:root {
  --bg: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f0f5;
  --text-muted: #8b8b9e;
  --accent: #e2231a;
  --accent-2: #00d4aa;
  --accent-3: #6366f1;
  --gradient: linear-gradient(135deg, #e2231a 0%, #ff6b35 50%, #eab308 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(226, 35, 26, 0.15), rgba(99, 102, 241, 0.1));
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --header-h: 72px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

img { max-width: 100%; display: block; }

.container {
  width: min(1200px, 92vw);
  margin-inline: auto;
}

/* ===== Background effects ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--1 {
  width: 500px;
  height: 500px;
  background: rgba(226, 35, 26, 0.12);
  top: -200px;
  right: -100px;
}

.bg-glow--2 {
  width: 400px;
  height: 400px;
  background: rgba(99, 102, 241, 0.1);
  bottom: 20%;
  left: -150px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  transition: background var(--transition), backdrop-filter var(--transition);
}

.header.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  z-index: 101;
}

.logo-icon {
  color: var(--accent);
  font-size: 1.1rem;
}

.logo-accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn--primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(226, 35, 26, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(226, 35, 26, 0.45);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--outline:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  padding: calc(var(--header-h) + 4rem) 0 5rem;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s ease both;
}

.pulse {
  width: 8px;
  height: 8px;
  background: var(--accent-2);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.6s 0.1s ease both;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 520px;
  margin: 0 auto 3rem;
  padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  animation: fadeUp 0.6s 0.3s ease both;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.hero-search:focus-within {
  border-color: rgba(226, 35, 26, 0.4);
  box-shadow: 0 0 0 3px rgba(226, 35, 26, 0.1);
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.hero-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
}

.hero-search input::placeholder {
  color: var(--text-muted);
}

.hero-search .btn {
  flex-shrink: 0;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  animation: fadeUp 0.6s 0.4s ease both;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
}

.section--alt {
  background: rgba(255, 255, 255, 0.02);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* ===== Guide cards ===== */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  animation: fadeUp 0.5s ease both;
}

.guide-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.guide-card.hidden {
  display: none;
}

.guide-thumb {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #12121a;
}

.guide-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-card:hover .guide-thumb img {
  transform: scale(1.06);
}

.guide-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    #0a0a0f 0%,
    rgba(10, 10, 15, 0.5) 40%,
    rgba(10, 10, 15, 0.15) 100%
  );
  pointer-events: none;
}

.guide-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 0.25rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 6px;
  z-index: 1;
}

.guide-badge--new {
  background: var(--accent-2);
  color: #0a0a0f;
}

.guide-badge--hot {
  background: var(--accent);
  color: white;
}

.guide-body {
  padding: 1.25rem;
}

.guide-game {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.guide-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.guide-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.guide-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ===== Categories ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.category-card {
  position: relative;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
  cursor: pointer;
  overflow: hidden;
  min-height: 200px;
}

.category-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.category-card:hover .category-bg {
  opacity: 0.5;
  transform: scale(1.05);
}

.category-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, rgba(10, 10, 15, 0.92) 0%, rgba(10, 10, 15, 0.75) 100%);
  pointer-events: none;
}

.category-card > *:not(.category-bg) {
  position: relative;
  z-index: 1;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.category-card:hover::before {
  opacity: 1;
}

.category-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.category-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.category-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.category-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

/* ===== Tips ===== */
.tips-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.tips-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tip-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.tip-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.tip-card--featured {
  background: var(--gradient-subtle);
  border-color: rgba(226, 35, 26, 0.2);
  padding: 2rem;
}

.tip-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}

.tip-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.tip-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.tip-card--featured p {
  margin-bottom: 1rem;
}

.link-arrow {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--transition);
}

.link-arrow:hover {
  text-decoration: underline;
}

.tips-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-box {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.sidebar-box h4 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.sidebar-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.sidebar-box--codes {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(0, 212, 170, 0.05));
  border-color: rgba(99, 102, 241, 0.2);
}

.codes-list {
  margin-bottom: 0.75rem;
}

.codes-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.codes-list li:last-child {
  border-bottom: none;
}

.codes-list code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-2);
  background: rgba(0, 212, 170, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition);
}

.codes-list code:hover {
  background: rgba(0, 212, 170, 0.2);
}

.codes-list span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.codes-note {
  font-size: 0.75rem !important;
  margin-bottom: 0 !important;
}

/* ===== CTA ===== */
.section--cta {
  padding: 3rem 0 5rem;
}

.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 3rem;
  background: var(--gradient-subtle);
  border: 1px solid rgba(226, 35, 26, 0.2);
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  position: relative;
}

.cta-content {
  flex: 1;
  max-width: 480px;
}

.cta-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta-content > p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.cta-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cta-form input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}

.cta-form input:focus {
  border-color: rgba(226, 35, 26, 0.4);
}

.cta-visual {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.cube {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  animation: float 4s ease-in-out infinite;
}

.cube--1 {
  background: linear-gradient(135deg, #e2231a, #ff6b35);
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.cube--2 {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  top: 40%;
  right: 10%;
  width: 50px;
  height: 50px;
  animation-delay: -1.3s;
}

.cube--3 {
  background: linear-gradient(135deg, #00d4aa, #3b82f6);
  bottom: 15%;
  left: 35%;
  width: 45px;
  height: 45px;
  animation-delay: -2.6s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(8deg); }
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.about-text > p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.about-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  font-size: 0.95rem;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(0, 212, 170, 0.15);
  color: var(--accent-2);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.about-stat-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: transform var(--transition);
}

.about-stat-card:hover {
  transform: scale(1.03);
}

.about-stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.about-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo--footer {
  font-size: 1.1rem;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--text);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.85rem 1.5rem;
  background: rgba(30, 30, 40, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  z-index: 200;
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  pointer-events: none;
  backdrop-filter: blur(12px);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .tips-layout {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .cta-box {
    flex-direction: column;
    text-align: center;
  }

  .cta-visual {
    display: none;
  }

  .cta-form {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .burger {
    display: flex;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.98);
    align-items: center;
    justify-content: center;
    gap: 2rem;
    font-size: 1.25rem;
  }

  .nav-links.open a {
    color: var(--text);
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .stat-divider {
    display: none;
  }

  .guides-grid {
    grid-template-columns: 1fr;
  }

  .about-cards {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-search {
    flex-direction: column;
    padding: 1rem;
  }

  .hero-search .btn {
    width: 100%;
  }

  .hero-search input {
    width: 100%;
    text-align: center;
  }
}

/* ===== Filter bar ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--text);
  border-color: rgba(226, 35, 26, 0.4);
  background: rgba(226, 35, 26, 0.1);
}

.filter-btn.active {
  color: white;
  background: var(--gradient);
  border-color: transparent;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #12121a;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text);
  background: var(--bg-card-hover);
}

.modal-header {
  display: block;
  padding: 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.modal-banner {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.modal-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.modal-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    #12121a 0%,
    rgba(18, 18, 26, 0.7) 50%,
    rgba(18, 18, 26, 0.2) 100%
  );
}

.modal-meta {
  padding: 1.25rem 2rem 1rem;
  margin-top: -3rem;
  position: relative;
  z-index: 1;
}

.modal-meta h2 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0.35rem 0 0.75rem;
  padding-right: 2.5rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-body {
  padding: 1.5rem 2rem 2rem;
}

.guide-section {
  margin-bottom: 1.75rem;
}

.guide-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--accent-2);
}

.guide-section p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.guide-section ul {
  list-style: none;
  padding: 0;
}

.guide-section li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.guide-section li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.guide-tip {
  padding: 1rem 1.25rem;
  background: var(--gradient-subtle);
  border: 1px solid rgba(226, 35, 26, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.guide-tip strong {
  color: var(--accent-2);
}

.guide-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.8;
}

.open-guide-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
}

.tip-card[data-guide-id] {
  cursor: pointer;
}

.tip-card[data-guide-id]:hover {
  border-color: rgba(255, 255, 255, 0.12);
}
