/* =============================================
   GOSC - Global Open Space Community
   Main Stylesheet
   ============================================= */

:root {
  --gosc-bg:          #0a0a1a;
  --gosc-bg-card:     #111128;
  --gosc-bg-card-2:   #1a1a35;
  --gosc-bg-input:    #0e0e26;
  --gosc-border:      rgba(79, 195, 247, 0.12);
  --gosc-border-2:    rgba(255, 255, 255, 0.08);
  --gosc-primary:     #4fc3f7;
  --gosc-glow:        rgba(79, 195, 247, 0.25);
  --gosc-text:        #e0e0f0;
  --gosc-muted:       #8892aa;
  --gosc-navbar-h:    64px;
}

/* -------- Base -------- */
html { scroll-behavior: smooth; }

body {
  background-color: var(--gosc-bg);
  color: var(--gosc-text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

/* -------- Stars Background -------- */
.stars-bg,
.stars-bg-fixed {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.stars-bg-fixed { position: fixed; }

.stars-bg::before,
.stars-bg-fixed::before,
.stars-bg::after,
.stars-bg-fixed::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 70%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 10% 80%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 55%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 15%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 45%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 85%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 55%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 40%, rgba(255,255,255,0.35) 0%, transparent 100%);
  background-repeat: repeat;
  background-size: 400px 400px;
}

/* -------- Navbar -------- */
.gosc-navbar {
  background: rgba(10, 10, 26, 0.95) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gosc-border);
  height: var(--gosc-navbar-h);
  z-index: 1030;
}
.gosc-navbar-transparent {
  background: transparent !important;
}
.gosc-navbar .navbar-brand {
  color: var(--gosc-primary) !important;
  letter-spacing: -0.02em;
}
.gosc-navbar .nav-link {
  color: rgba(224, 224, 240, 0.8) !important;
  font-size: 0.875rem;
  padding: 0.4rem 0.7rem !important;
  border-radius: 6px;
  transition: all 0.2s;
}
.gosc-navbar .nav-link:hover {
  color: #fff !important;
  background: rgba(79, 195, 247, 0.1);
}
.gosc-dropdown {
  background: var(--gosc-bg-card-2) !important;
  border: 1px solid var(--gosc-border) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
}
.gosc-dropdown .dropdown-item {
  color: var(--gosc-muted) !important;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  transition: all 0.15s;
}
.gosc-dropdown .dropdown-item:hover {
  background: rgba(79, 195, 247, 0.1) !important;
  color: #fff !important;
}
.gosc-points-badge {
  background: linear-gradient(135deg, #ffd700, #ff8c00) !important;
  color: #111 !important;
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-weight: 700;
}

/* -------- Main Layout -------- */
.gosc-app { background: var(--gosc-bg); }
.gosc-main { min-height: calc(100vh - var(--gosc-navbar-h) - 80px); }

/* -------- Cards -------- */
.gosc-card {
  background: var(--gosc-bg-card);
  border: 1px solid var(--gosc-border);
  border-radius: 14px;
  transition: all 0.25s;
}
.gosc-card-hover:hover {
  border-color: rgba(79, 195, 247, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79, 195, 247, 0.1);
}
.gosc-hero-card {
  background: linear-gradient(135deg, var(--gosc-bg-card) 0%, #1a1040 100%);
  border: 1px solid rgba(79, 195, 247, 0.2);
  border-radius: 16px;
}

/* -------- Inputs -------- */
.gosc-input {
  background: var(--gosc-bg-input) !important;
  border: 1px solid var(--gosc-border-2) !important;
  color: var(--gosc-text) !important;
  border-radius: 8px !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gosc-input:focus {
  border-color: var(--gosc-primary) !important;
  box-shadow: 0 0 0 3px var(--gosc-glow) !important;
  outline: none !important;
}
.gosc-input::placeholder { color: var(--gosc-muted) !important; }

/* -------- Buttons -------- */
.btn-primary {
  background: linear-gradient(135deg, #1565c0, #0288d1) !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn-outline-primary {
  border-color: var(--gosc-primary) !important;
  color: var(--gosc-primary) !important;
  border-radius: 8px !important;
}
.btn-outline-primary:hover {
  background: rgba(79, 195, 247, 0.15) !important;
  color: #fff !important;
}

/* -------- Badges -------- */
.gosc-rank-badge {
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.rank-galaxy    { background: linear-gradient(135deg, #7c4dff, #e040fb) !important; color: #fff !important; }
.rank-orbit     { background: linear-gradient(135deg, #0288d1, #00bcd4) !important; color: #fff !important; }
.rank-star      { background: linear-gradient(135deg, #f57c00, #ffa726) !important; color: #fff !important; }
.rank-cadet     { background: linear-gradient(135deg, #388e3c, #66bb6a) !important; color: #fff !important; }
.rank-astronaut { background: linear-gradient(135deg, #1976d2, #42a5f5) !important; color: #fff !important; }
.rank-earthling { background: rgba(255,255,255,0.15) !important; color: var(--gosc-text) !important; }

.gosc-skill-badge {
  background: rgba(79, 195, 247, 0.12) !important;
  color: var(--gosc-primary) !important;
  border: 1px solid rgba(79, 195, 247, 0.25) !important;
  border-radius: 20px;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
}

.gosc-channel-badge {
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.badge-primary { background: rgba(79, 195, 247, 0.15) !important; color: var(--gosc-primary) !important; border: 1px solid rgba(79, 195, 247, 0.3) !important; }
.badge-warning { background: rgba(255, 193, 7, 0.15) !important; color: #ffc107 !important; border: 1px solid rgba(255,193,7,0.3) !important; }
.badge-success { background: rgba(76, 175, 80, 0.15) !important; color: #4caf50 !important; border: 1px solid rgba(76,175,80,0.3) !important; }
.badge-info    { background: rgba(0, 188, 212, 0.15) !important; color: #00bcd4 !important; border: 1px solid rgba(0,188,212,0.3) !important; }
.badge-danger  { background: rgba(244, 67, 54, 0.15) !important; color: #f44336 !important; border: 1px solid rgba(244,67,54,0.3) !important; }
.badge-secondary { background: rgba(255,255,255,0.1) !important; color: var(--gosc-muted) !important; border: 1px solid rgba(255,255,255,0.1) !important; }

.gosc-badge-orbit {
  background: rgba(79, 195, 247, 0.1) !important;
  color: var(--gosc-primary) !important;
  border: 1px solid rgba(79, 195, 247, 0.3) !important;
  border-radius: 30px;
}

/* -------- Event Date Badge -------- */
.event-date-badge {
  background: linear-gradient(135deg, #1565c0, #0288d1);
  border-radius: 10px;
  padding: 0.4rem 0.7rem;
  min-width: 52px;
  text-align: center;
}
.event-date-month {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.event-date-day {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

/* -------- Footer -------- */
.gosc-footer {
  background: var(--gosc-bg-card);
  border-top: 1px solid var(--gosc-border);
}

/* -------- Landing Page -------- */
.gosc-landing { background: var(--gosc-bg); }
.gosc-hero {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(21, 101, 192, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(123, 31, 162, 0.2) 0%, transparent 50%),
    var(--gosc-bg);
  position: relative;
  padding: 120px 0 80px;
}
.text-gradient-space {
  background: linear-gradient(135deg, #4fc3f7 0%, #7c4dff 50%, #e040fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gosc-stats-bar {
  background: var(--gosc-bg-card);
  border-top: 1px solid var(--gosc-border);
  border-bottom: 1px solid var(--gosc-border);
}
.stat-number { font-size: 1.8rem; font-weight: 800; }
.stat-label  { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Pillars */
.gosc-pillar-card {
  background: var(--gosc-bg-card);
  border: 1px solid var(--gosc-border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  transition: all 0.3s;
}
.gosc-pillar-card:hover {
  border-color: rgba(79, 195, 247, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(79, 195, 247, 0.1);
}
.gosc-pillar-card.pillar-featured {
  background: linear-gradient(135deg, #1a1040, #0d1b3a);
  border-color: rgba(79, 195, 247, 0.3);
}
.pillar-icon {
  width: 64px;
  height: 64px;
  background: rgba(79, 195, 247, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--gosc-primary);
}
.pillar-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #4fc3f7, #7c4dff);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.feature-list li { padding: 0.25rem 0; font-size: 0.9rem; }

/* CTA */
.gosc-cta-section {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(79, 195, 247, 0.08) 0%, transparent 70%),
    var(--gosc-bg);
}
.bg-darker { background: rgba(0,0,0,0.3); }

/* -------- Auth Page -------- */
.gosc-auth-page {
  background:
    radial-gradient(ellipse at 40% 40%, rgba(21,101,192,0.25) 0%, transparent 55%),
    var(--gosc-bg);
  position: relative;
}

/* -------- Channel Checkbox -------- */
.gosc-channel-check { cursor: pointer; }
.channel-label {
  color: var(--gosc-muted);
  font-size: 0.8rem;
  transition: all 0.2s;
}
.channel-label.channel-selected {
  background: rgba(79, 195, 247, 0.15) !important;
  border-color: var(--gosc-primary) !important;
  color: var(--gosc-primary) !important;
}

/* -------- Leaderboard -------- */
.podium-1 { background: rgba(255, 193, 7, 0.1); border: 1px solid rgba(255,193,7,0.3); }
.podium-2 { background: rgba(158, 158, 158, 0.1); border: 1px solid rgba(158,158,158,0.3); }
.podium-3 { background: rgba(121, 85, 72, 0.1); border: 1px solid rgba(121,85,72,0.3); }

/* -------- Orbit Match Steps -------- */
.step-number {
  width: 40px;
  height: 40px;
  background: rgba(79, 195, 247, 0.15);
  border: 2px solid var(--gosc-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--gosc-primary);
  font-size: 1.1rem;
  margin: 0 auto;
}

/* -------- Scrollbar -------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gosc-bg); }
::-webkit-scrollbar-thumb { background: rgba(79, 195, 247, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(79, 195, 247, 0.5); }

/* -------- Alerts -------- */
.alert { border-radius: 10px; border: none; }
.alert-success  { background: rgba(76,175,80,0.15); color: #a5d6a7; }
.alert-danger   { background: rgba(244,67,54,0.15); color: #ef9a9a; }
.alert-warning  { background: rgba(255,193,7,0.15); color: #ffe082; }
.alert-info     { background: rgba(79,195,247,0.15); color: #b3e5fc; }

/* -------- Pagination -------- */
.pagination .page-link {
  background: var(--gosc-bg-card) !important;
  border-color: var(--gosc-border) !important;
  color: var(--gosc-muted) !important;
  border-radius: 8px !important;
  margin: 0 2px;
}
.pagination .page-item.active .page-link {
  background: var(--gosc-primary) !important;
  color: #000 !important;
}
.pagination .page-link:hover { color: #fff !important; border-color: var(--gosc-primary) !important; }

/* -------- Responsive -------- */
@media (max-width: 768px) {
  .gosc-hero { padding: 100px 0 60px; }
  .display-3 { font-size: 2.2rem !important; }
  .gosc-hero-card { flex-direction: column; }
}

/* -------- Utilities -------- */
.py-lg-7 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
.px-6 { padding-left: 3rem !important; padding-right: 3rem !important; }
.min-w-0 { min-width: 0; }
.bg-highlight { background: rgba(79, 195, 247, 0.03); }
