/* =========================================================
   TIGEROZ CFW — rule.css
   Matches index.css design system exactly
   ========================================================= */

:root {
  --primary:       #56C3F2;
  --primary-light: #75CEF5;
  --primary-dark:  #36AFE4;

  --background:    #080808;
  --surface:       #111111;

  --text:          #ffffff;
  --text-muted:    #9b9b9b;
  --text-dark:     #6d6d6d;

  --border:        rgba(255, 255, 255, 0.075);
  --border-hover:  rgba(86, 195, 242, 0.28);

  --shadow:        0 20px 60px rgba(0, 0, 0, 0.42);
  --shadow-small:  0 8px 25px rgba(0, 0, 0, 0.28);

  --radius:        20px;
  --radius-small:  14px;

  --container:     760px;
}

/* =========================================================
   RESET
   ========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Tajawal', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  overflow-x: hidden;
}

/* =========================================================
   BACKGROUND
   ========================================================= */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(circle at 85% 5%, rgba(86,195,242,0.10), transparent 28%),
    radial-gradient(circle at 10% 40%, rgba(86,195,242,0.055), transparent 25%),
    linear-gradient(180deg, #0a0a0a 0%, #080808 50%, #060606 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 45px 45px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

/* =========================================================
   HOME BUTTON
   ========================================================= */

.home-btn {
  position: fixed;
  top: 22px;
  left: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 50px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(15,15,15,0.78);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-small);
  z-index: 1000;
  transition: 0.25s ease;
}

.home-btn i {
  color: var(--primary);
}

.home-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.home-btn:hover i {
  color: #fff;
}

/* =========================================================
   HEADER
   ========================================================= */

.rules-header {
  position: relative;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 30px 55px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background:
    radial-gradient(ellipse at center top, rgba(86,195,242,0.19), transparent 52%),
    linear-gradient(180deg, #121212 0%, #0a0a0a 100%);
  text-align: center;
}

.rules-header::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: 50%;
  width: 520px;
  height: 200px;
  transform: translateX(-50%);
  background: var(--primary);
  opacity: 0.08;
  filter: blur(80px);
  pointer-events: none;
}

.header-glow {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.08;
  pointer-events: none;
}

.header-glow-one {
  top: -150px;
  right: -70px;
  background: var(--primary);
}

.header-glow-two {
  bottom: -170px;
  left: -70px;
  background: #249ed1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  margin-bottom: 18px;
  border: 1px solid rgba(86,195,242,0.22);
  border-radius: 10px;
  background: rgba(86,195,242,0.07);
  color: #8bd8f8;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(86,195,242,0.8);
}

.rules-header h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
  text-shadow: 0 0 45px rgba(86,195,242,0.13);
}

.rules-header p {
  color: #bcbcbc;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 500;
}

.hero-line {
  width: 55px;
  height: 3px;
  margin: 20px auto 0;
  border-radius: 10px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* =========================================================
   RULES CONTAINER
   ========================================================= */

.rules-container {
  width: min(calc(100% - 40px), var(--container));
  margin: 50px auto 70px;
}

/* =========================================================
   RULE ITEM — accordion card
   ========================================================= */

.rule-item {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(22,22,22,0.94), rgba(13,13,13,0.94));
  box-shadow: var(--shadow-small);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

/* blue right-edge accent */
.rule-item::before {
  content: '';
  position: absolute;
  right: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.rule-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.rule-item:hover::before,
.rule-item.open::before {
  opacity: 0.7;
}

/* =========================================================
   RULE HEADER (h3 / accordion trigger)
   ========================================================= */

.rule-item h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  margin: 0;
  cursor: pointer;
  color: #d0d0d0;
  font-size: 1rem;
  font-weight: 700;
  transition: color 0.25s ease, background 0.25s ease;
  user-select: none;
  position: relative;
}

/* icon box — same style as .section-number */
.rule-item h3 .rule-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(86,195,242,0.16);
  border-radius: 10px;
  background: rgba(86,195,242,0.06);
  color: var(--primary);
  font-size: 0.82rem;
  transition: background 0.25s ease, color 0.25s ease;
}

/* chevron */
.rule-item h3 .chevron {
  margin-right: auto;
  color: #555;
  font-size: 0.75rem;
  transition: transform 0.28s ease, color 0.25s ease;
  flex-shrink: 0;
}

.rule-item h3.active {
  color: #fff;
}

.rule-item h3.active .rule-icon {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(86,195,242,0.18);
}

.rule-item h3.active .chevron {
  transform: rotate(90deg);
  color: var(--primary);
}

/* =========================================================
   RULE CONTENT
   ========================================================= */

.rule-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.28s ease;
  border-top: 1px solid transparent;
}

.rule-content.active {
  max-height: 9000px;
  padding: 0 22px 22px;
  border-top-color: var(--border);
}

.rule-content ul {
  list-style: none;
  padding-top: 16px;
}

.rule-content li {
  position: relative;
  padding-right: 28px;
  margin-bottom: 13px;
  color: #a8a8a8;
  font-size: 0.95rem;
  line-height: 1.85;
  white-space: pre-line;
}

.rule-content li:last-child {
  margin-bottom: 0;
}

/* blue check bullet */
.rule-content li::before {
  content: '\f058';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  color: var(--primary);
  position: absolute;
  right: 0;
  top: 3px;
  font-size: 0.82rem;
  opacity: 0.85;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
  padding: 0 0 35px;
  text-align: center;
}

.footer-line {
  height: 1px;
  margin-bottom: 22px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.footer p {
  color: #606060;
  font-size: 0.78rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {
  :root { --radius: 17px; }

  .home-btn {
    top: 16px;
    left: 16px;
    height: 46px;
    padding: 0 14px;
    font-size: 0.85rem;
    border-radius: 13px;
  }

  .rules-header {
    min-height: 210px;
    padding: 70px 20px 45px;
  }

  .rules-header h1 { font-size: 1.9rem; }

  .rules-container {
    width: min(calc(100% - 24px), var(--container));
    margin: 35px auto 50px;
  }

  .rule-item h3 {
    padding: 15px 18px;
    font-size: 0.95rem;
  }

  .rule-content.active {
    padding: 0 18px 18px;
  }

  .footer {
    width: calc(100% - 24px);
    padding-bottom: 25px;
  }
}

@media (max-width: 380px) {
  .rules-header h1 { font-size: 1.6rem; }
  .rules-container { width: calc(100% - 18px); }
  .rule-item h3 { padding: 13px 15px; font-size: 0.9rem; }
  .rule-content.active { padding: 0 15px 15px; }
}

@media (hover: none) {
  .rule-item:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}