/* ==========================================================================
   SOLARIS RP — STANDALONE AAA OBSIDIAN & GOLD DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&family=Syne:wght@700;800&display=swap');

:root {
  --bg-pure: #050608;
  --bg-card: rgba(14, 16, 25, 0.75);
  --bg-card-hover: rgba(22, 26, 38, 0.9);
  --border-gold: rgba(245, 166, 35, 0.22);
  --border-bright: rgba(255, 215, 0, 0.55);
  
  --gold-primary: #f5a623;
  --gold-bright: #ffd700;
  --gold-dark: #b87300;
  --gold-glow: rgba(245, 166, 35, 0.25);
  
  --text-title: #ffffff;
  --text-body: #a7b3cc;
  --text-muted: #6a7692;
  
  --danger: #ff4757;
  --warning: #ffa502;
  --info: #70a1ff;
  --success: #2ed573;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  
  --font-heading: 'Outfit', sans-serif;
  --font-accent: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-pure);
  color: var(--text-body);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmosphere */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
}

.sun-glow {
  position: absolute;
  top: -15vh;
  left: 50%;
  transform: translateX(-50%);
  width: 75vw;
  height: 55vh;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.12) 0%, rgba(255, 140, 0, 0.04) 50%, rgba(5, 6, 8, 0) 80%);
  filter: blur(80px);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-pure);
}
::-webkit-scrollbar-thumb {
  background: rgba(245, 166, 35, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* Sticky Header Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 6, 8, 0.88);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-gold);
  padding: 0.85rem 2rem;
}

.nav-container {
  max-width: 1350px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  box-shadow: 0 0 14px var(--gold-glow);
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--text-title);
  letter-spacing: 0.5px;
}

.brand-title span {
  color: var(--gold-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-item:hover, .nav-item.active {
  color: var(--gold-bright);
  background: rgba(245, 166, 35, 0.12);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.server-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

/* Search Trigger Button */
.search-trigger {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-gold);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.search-trigger:hover {
  border-color: var(--gold-primary);
  color: var(--text-title);
  background: rgba(245, 166, 35, 0.08);
}

.kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: monospace;
}

/* Hero Portal Section */
.hero-portal {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
  background: url('hero-bg.jpg') center/cover no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(5, 6, 8, 0.65) 0%, rgba(5, 6, 8, 0.95) 85%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  text-align: center;
  margin: 0 auto;
}

.hero-logo-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 1.5rem;
}

.logo-ring {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 2px dashed var(--gold-primary);
  border-radius: 50%;
  animation: rotateRing 35s linear infinite;
  opacity: 0.6;
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-logo-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-bright);
  box-shadow: 0 0 45px var(--gold-glow);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-primary);
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid var(--border-gold);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  margin-bottom: 1.2rem;
}

.hero-h1 {
  font-family: var(--font-heading);
  font-size: 3.6rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-title);
  letter-spacing: -1px;
  margin-bottom: 1.2rem;
}

.hero-h1 span {
  background: linear-gradient(135deg, #ffffff 0%, #ffd700 50%, #f5a623 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-p {
  font-size: 1.15rem;
  color: var(--text-body);
  max-width: 750px;
  margin: 0 auto 2.5rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* Console Command Box */
.f8-box {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-gold);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 1.05rem;
  color: var(--gold-bright);
  font-weight: 700;
}

.f8-copy-btn {
  background: rgba(245, 166, 35, 0.2);
  border: 1px solid var(--border-gold);
  color: #ffffff;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.f8-copy-btn:hover {
  background: var(--gold-primary);
  color: #050608;
}

/* Form Controls */
.form-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-title);
  margin-bottom: 0.4rem;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(10, 12, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 15px var(--gold-glow);
  background: rgba(18, 22, 34, 0.9);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.67rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, #f5a623 0%, #d48300 100%);
  color: #050608;
  box-shadow: 0 4px 25px var(--gold-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 35px rgba(245, 166, 35, 0.55);
  background: linear-gradient(135deg, #ffd700 0%, #f5a623 100%);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-title);
  border: 1px solid var(--border-gold);
}

.btn-glass:hover {
  background: rgba(245, 166, 35, 0.14);
  border-color: var(--gold-bright);
}

.btn-discord {
  background: #5865F2;
  color: #ffffff;
}

.btn-discord:hover {
  background: #4752C4;
  box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
}

/* Stats Counter Grid Bar */
.stats-bar {
  max-width: 1200px;
  margin: -3rem auto 4rem;
  position: relative;
  z-index: 10;
  padding: 0 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.5rem;
}

.stat-icon {
  width: 50px;
  height: 50px;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  font-size: 1.3rem;
}

.stat-val {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-title);
}

.stat-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Page / View Container */
.view-section {
  display: none;
  animation: fadeIn 0.35s ease;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-container {
  max-width: 1280px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-title);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Factions Showcase Cards */
.factions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

.faction-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.faction-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-bright);
  background: var(--bg-card-hover);
}

.faction-icon-box {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.faction-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-title);
  margin-bottom: 0.3rem;
}

.faction-tagline {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.faction-desc {
  font-size: 0.9rem;
  color: var(--text-body);
}

/* Rules Section Tab Pill Navigation */
.tab-nav {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
}

.tab-item {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-item:hover {
  color: var(--text-title);
  background: rgba(245, 166, 35, 0.1);
  border-color: var(--gold-primary);
}

.tab-item.active {
  color: var(--gold-bright);
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.25) 0%, rgba(184, 115, 0, 0.15) 100%);
  border-color: var(--gold-bright);
  box-shadow: 0 4px 15px var(--gold-glow);
}

/* Rules Accordion & Cards */
.rules-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(20px);
  transition: var(--transition);
}

.cat-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cat-icon {
  width: 52px;
  height: 52px;
  background: rgba(245, 166, 35, 0.15);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  font-size: 1.4rem;
}

.cat-title h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-title);
  font-weight: 800;
}

.cat-title p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sub-group {
  margin-bottom: 1.5rem;
}

.sub-group:last-child {
  margin-bottom: 0;
}

.sub-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold-primary);
  margin-bottom: 0.85rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--gold-primary);
}

/* Accordion Item Box */
.rule-accordion-item {
  background: rgba(10, 12, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: var(--transition);
}

.rule-accordion-item:hover {
  border-color: var(--border-gold);
  background: rgba(20, 24, 36, 0.85);
}

.rule-accordion-header {
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  user-select: none;
}

.rule-name-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rule-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-title);
}

.accordion-chevron {
  color: var(--gold-primary);
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.rule-accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}

.rule-accordion-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.4rem;
  transition: max-height 0.35s ease, padding 0.35s ease;
  border-top: 1px solid transparent;
}

.rule-accordion-item.open .rule-accordion-body {
  max-height: 300px;
  padding: 1rem 1.4rem 1.25rem;
  border-top-color: rgba(255, 255, 255, 0.05);
}

.rule-desc {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.6;
}

.rule-action-bar {
  margin-top: 0.85rem;
  display: flex;
  justify-content: flex-end;
}

.copy-rule-btn {
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.copy-rule-btn:hover {
  color: var(--gold-bright);
  border-color: var(--gold-bright);
  background: rgba(245, 166, 35, 0.1);
}

/* Badges */
.badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-danger {
  background: rgba(255, 71, 87, 0.15);
  color: #ff6b81;
  border: 1px solid rgba(255, 71, 87, 0.35);
}

.badge-warning {
  background: rgba(255, 165, 2, 0.15);
  color: #ffa502;
  border: 1px solid rgba(255, 165, 2, 0.35);
}

.badge-info {
  background: rgba(112, 161, 255, 0.15);
  color: #70a1ff;
  border: 1px solid rgba(112, 161, 255, 0.35);
}

/* Grid Cards for Tables (Horaires, Braquages, Armes) */
.grid-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.grid-card {
  background: rgba(10, 12, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  transition: var(--transition);
}

.grid-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
  background: rgba(20, 24, 36, 0.85);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.card-title {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-title);
  font-size: 1.1rem;
}

.card-stat {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gold-bright);
  margin-bottom: 0.4rem;
}

.card-subtext {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Spotlight Search Modal Window */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #0a0c12;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 680px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.modal-input {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-gold);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 1.1rem;
  outline: none;
}

.modal-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 1rem;
}

/* Toast Notification Popup */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0a0c12;
  border: 1px solid var(--gold-bright);
  color: #ffffff;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  box-shadow: 0 10px 35px var(--gold-glow);
  transform: translateY(120%);
  opacity: 0;
  transition: var(--transition);
  z-index: 3000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.footer {
  background: rgba(4, 5, 8, 0.95);
  border-top: 1px solid var(--border-gold);
  padding: 3rem 1.5rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.footer-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-h1 { font-size: 2.4rem; }
  .nav-menu { display: none; }
}
