/* ============================================
   RANKGOAL DESIGN SYSTEM
   Dark theme + Gold accents
   ============================================ */

:root {
  --bg-primary:   #0a0a0a;
  --bg-secondary: #111111;
  --bg-card:      #161616;
  --bg-hover:     #1f1f1f;
  --border:       #2a2a2a;
  --gold:         #FFD700;
  --gold-dark:    #B8860B;
  --gold-light:   #FFE55C;
  --gold-rgb:     255, 215, 0;
  --text-primary: #f5f5f5;
  --text-secondary:#a0a0a0;
  --text-muted:   #666666;
  --header-height: 64px;
  --sidebar-width: 280px;
  --radius:       16px;
  --radius-sm:    12px;
  --transition:   all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-height);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--gold);
}

.logo {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.user-btn {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
  color: var(--bg-primary);
  font-size: 18px;
}

/* Profile Dropdown */
.profile-wrapper { position: relative; }

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 101;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.profile-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown a {
  display: block;
  padding: 10px 12px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  transition: var(--transition);
}

.profile-dropdown a:hover {
  background: var(--bg-hover);
  color: var(--gold);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.text-muted { color: var(--text-muted); }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding-top: calc(var(--header-height) + 20px);
  overflow-y: auto;
}

.sidebar.active { transform: translateX(0); }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.sidebar-overlay.active { opacity: 1; visibility: visible; }

.sidebar-nav { padding: 0 16px; }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
  border-left: 3px solid transparent;
  transition: var(--transition);
}

.sidebar-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-left-color: var(--gold-dark);
}

.sidebar-item.active {
  background: rgba(var(--gold-rgb), 0.08);
  color: var(--gold);
  border-left-color: var(--gold);
}

.sidebar-divider {
  padding: 16px 16px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ============================================
   SEARCH OVERLAY
   ============================================ */
.search-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0; right: 0;
  background: rgba(17, 17, 17, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 90;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-container { max-width: 600px; margin: 0 auto; }

.search-input {
  width: 100%;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.1);
}

.search-input::placeholder { color: var(--text-muted); }

.search-hints {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  animation: fadeIn 0.5s ease;
}

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

/* ============================================
   HERO
   ============================================ */
.hero {
  text-align: center;
  padding: 60px 20px 50px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at top, rgba(var(--gold-rgb), 0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border: 1px solid var(--border);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(var(--gold-rgb), 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
  letter-spacing: -1px;
}

.text-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================
   SECTIONS
   ============================================ */
.section { margin-bottom: 48px; }

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* ============================================
   EXAM CARDS
   ============================================ */
.exam-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.exam-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.exam-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: var(--transition);
}

.exam-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--gold-rgb), 0.4);
  box-shadow:
    0 8px 30px rgba(var(--gold-rgb), 0.08),
    0 0 0 1px rgba(var(--gold-rgb), 0.1);
}

.exam-card:hover::before { opacity: 1; }

.exam-soon { opacity: 0.7; }
.exam-soon:hover { opacity: 1; }

.exam-icon {
  font-size: 40px;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}

.exam-info { flex: 1; }

.exam-info h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.exam-info p {
  color: var(--text-secondary);
  font-size: 14px;
}

.exam-arrow {
  font-size: 20px;
  color: var(--text-muted);
  transition: var(--transition);
}

.exam-card:hover .exam-arrow {
  color: var(--gold);
  transform: translateX(4px);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-gold {
  background: rgba(var(--gold-rgb), 0.12);
  color: var(--gold);
  border: 1px solid rgba(var(--gold-rgb), 0.2);
}

.badge-soon {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ============================================
   FEATURE CARDS
   ============================================ */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: rgba(var(--gold-rgb), 0.2);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   CTA
   ============================================ */
.section-cta { margin-top: 60px; }

.cta-card {
  background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.08) 0%, rgba(var(--gold-rgb), 0.02) 100%);
  border: 1px solid rgba(var(--gold-rgb), 0.15);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
}

.cta-card h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--bg-primary);
  box-shadow: 0 4px 15px rgba(var(--gold-rgb), 0.25);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--gold-rgb), 0.35);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--gold); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 640px) {
  .hero h1 { font-size: 44px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .exam-grid { grid-template-columns: 1fr 1fr; }
  .exam-card:first-child { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
}
/* ===== FIX: MOBILE CLICK BLACK ISSUE ===== */

.exam-card:active,
.exam-card:focus {
  background: var(--bg-card) !important;
  transform: scale(0.97);
  outline: none;
}

/* Prevent unwanted tap highlight (mobile) */
.exam-card {
  -webkit-tap-highlight-color: transparent;
}