* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-color: #040204;
  --font-decorative: 'Cinzel Decorative', serif;
  --font-serif: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --red-accent: #ff2a4b;
  --red-glow: rgba(255, 42, 75, 0.6);
  --red-dark: #800c1e;
  --red-border: rgba(255, 42, 75, 0.25);
}

html {
  scroll-behavior: auto;
}

body {
  background-color: var(--bg-color);
  color: #ffffff;
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* AMBIENT GLOW (CURSOR) */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 42, 75, 0.15) 0%, rgba(4, 2, 4, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.05s ease-out; /* Smooth movement fallback */
}

/* NAVBAR (DEFAULT / UNSCROLLED STATE) */
.navbar {
  position: fixed;
  top: 15px;
  left: 50px;
  right: 50px;
  height: 60px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10000;
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-radius: 16px;
  box-shadow: none;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

/* NAVBAR (SCROLLED STATE) */
.navbar.scrolled {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
}

.nav-top-accent {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-border), transparent);
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.logo-wrapper-small {
  font-family: var(--font-decorative);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo-wrapper-small .letter {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 42, 75, 0.9);
}

.brand-dot {
  color: var(--red-accent);
  font-size: 1rem;
  text-shadow: 0 0 8px var(--red-accent);
}

.brand-services {
  color: #71717a;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 400;
}

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 3rem;
}

.nav-links a {
  color: #8e8e93;
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--red-accent);
  box-shadow: 0 0 8px var(--red-accent);
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
  left: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-icon-btn {
  color: #8e8e93;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease, transform 0.3s ease;
  text-decoration: none;
}

.nav-icon-btn:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.nav-download-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 0.9rem;
  color: #a1a1aa;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.nav-download-btn:hover {
  color: #ffffff;
  border-color: var(--red-border);
  background: rgba(255, 42, 75, 0.05);
  box-shadow: 0 0 12px var(--red-glow);
}

/* BACKGROUND VIDEO */
.video-background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

#bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 2, 4, 0.88);
  backdrop-filter: blur(5px);
}

/* PAGE WRAPPER */
.page-content-padding {
  padding-top: 100px;
  padding-bottom: 80px;
}

.page-section {
  min-height: calc(100vh - 100px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 80px;
}

.rules-container {
  max-width: 1250px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* HEADINGS */
.rules-header-wrap {
  margin-bottom: 2.5rem;
  text-align: left;
}

.street-tag-wrap {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 0.5rem;
}

.street-tag {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 18px var(--red-accent);
}

.red-line-right {
  height: 2px;
  width: 160px;
  background: linear-gradient(90deg, var(--red-accent) 0%, rgba(255, 42, 75, 0) 100%);
  box-shadow: 0 0 10px var(--red-accent);
}

.cozy-street-heading {
  font-family: 'Cinzel Decorative', serif;
  font-size: 4.2rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.cozy-street-heading .text-street {
  color: #ff2a4b;
  text-shadow: 0 0 12px #ff2a4b, 0 0 30px rgba(255, 42, 75, 0.7);
}

.cozy-street-heading .text-laws {
  font-family: var(--font-sans);
  color: #ffffff;
  text-shadow: 0 0 10px #ffffff;
}

.rules-subtext {
  color: #a1a1aa;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* LAYOUT WITH TABS */
.rules-main-layout {
  display: flex;
  width: 100%;
  gap: 32px;
  align-items: flex-start;
}

.rules-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 280px;
  flex-shrink: 0;
}

.rule-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  padding: 0.95rem 1.8rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-align: left;
}

.rule-tab:hover,
.rule-tab.active {
  color: #ffffff;
  background: rgba(255, 42, 75, 0.18);
  border-color: var(--red-accent);
  box-shadow: 0 0 20px rgba(255, 42, 75, 0.35);
}

.rules-grid {
  flex: 1;
  width: 100%;
}

.rule-category {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
}

.rule-category.active {
  display: grid;
}

.rule-card {
  background: rgba(14, 5, 10, 0.65);
  border: 1px solid rgba(255, 42, 75, 0.2);
  padding: 1.8rem;
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.rule-card.full-width {
  grid-column: span 2;
}

/* GANG RULES SECTION TITLES */
.section-title-card {
  background: linear-gradient(135deg, rgba(255, 42, 75, 0.22) 0%, rgba(14, 5, 10, 0.85) 100%);
  border: 1px solid var(--red-border);
  border-left: 5px solid var(--red-accent);
  padding: 1.25rem 1.8rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 42, 75, 0.08);
}

.section-title-card h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 42, 75, 0.6);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title-card h2::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--red-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--red-accent);
}

.rule-card:hover {
  border-color: var(--red-accent);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 42, 75, 0.15);
}

.rule-badge {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--red-accent);
  background: rgba(255, 42, 75, 0.08);
  border: 1px solid rgba(255, 42, 75, 0.3);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(255, 42, 75, 0.2);
}

.rule-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  width: 100%;
}

.rule-content h3 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rule-content p {
  color: #a1a1aa;
  font-size: 0.95rem;
  line-height: 1.6;
}

.rule-list {
  margin-top: 8px;
  padding-left: 20px;
  color: #d4d4d8;
}

.rule-list li {
  margin-bottom: 4px;
  font-size: 0.92rem;
}

/* TEMPLATE CODE BLOCK STYLES */
.code-block-container {
  margin-top: 14px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--red-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.code-line {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.88rem;
  color: #ff8597;
  line-height: 1.5;
  background: rgba(255, 42, 75, 0.05);
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 2px solid var(--red-accent);
  word-break: break-word;
}

.code-line strong {
  color: #ffffff;
  font-family: var(--font-sans);
  font-weight: 700;
  margin-right: 6px;
  letter-spacing: 0.03em;
}

/* DANYOS CARDS TYPOGRAPHY */
.danyos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 10px;
}

.danyos-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 16px;
  border-radius: 12px;
}

.danyos-box h4 {
  font-family: var(--font-serif);
  color: var(--red-accent);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-shadow: 0 0 8px rgba(255, 42, 75, 0.4);
}

.danyos-box ul {
  padding-left: 18px;
  color: #d4d4d8;
  font-size: 0.88rem;
}

/* SANCTION TABLE TYPOGRAPHY */
.style-table-content {
  width: 100%;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 12px;
}

.rules-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.rules-table th {
  font-family: var(--font-serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  background: rgba(255, 42, 75, 0.18);
  color: #ffffff;
  padding: 14px 18px;
  border-bottom: 2px solid var(--red-accent);
}

.rules-table td {
  font-size: 0.92rem;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #d4d4d8;
}

.rules-table tr:hover td {
  background: rgba(255, 42, 75, 0.05);
  color: #ffffff;
}

/* RESPONSIVE DESIGN */
@media (max-width: 990px) {
  .rules-main-layout {
    flex-direction: column;
    gap: 24px;
  }
  .rules-tabs {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .rule-tab {
    width: auto;
    flex: 1;
    text-align: center;
  }
  .rule-card.full-width {
    grid-column: span 1;
  }
  .danyos-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-section {
    padding: 20px;
  }
  .cozy-street-heading {
    font-size: 3rem;
  }
  .rule-category {
    grid-template-columns: 1fr;
  }
}