/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── CSS Variables ── */
:root {
  --bg: #0a0a0f;
  --surface: #13131a;
  --surface2: #1c1c28;
  --border: #2a2a3a;
  --accent: #6c63ff;
  --accent2: #a78bfa;
  --green: #22c55e;
  --orange: #f97316;
  --blue: #38bdf8;
  --pink: #f472b6;
  --text: #f0f0f8;
  --muted: #8888aa;
  --card-hover: #1e1e2e;
}

/* ── Base ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

/* ────────────────────────────
   NAVBAR
──────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nav-btn:hover {
  opacity: 0.85;
}

/* ────────────────────────────
   HERO
──────────────────────────── */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(108, 99, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(108, 99, 255, 0.12);
  border: 1px solid rgba(108, 99, 255, 0.3);
  color: var(--accent2);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 18px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* ────────────────────────────
   PLATFORM PILLS
──────────────────────────── */
.platforms {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.platform-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.platform-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* ────────────────────────────
   SEARCH BAR
──────────────────────────── */
.search-wrapper {
  max-width: 680px;
  margin: 0 auto 16px;
  position: relative;
}

.search-wrapper input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  padding: 16px 60px 16px 20px;
  border-radius: 14px;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}

.search-wrapper input:focus {
  border-color: var(--accent);
}

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

.search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.search-btn:hover {
  opacity: 0.85;
}

/* ────────────────────────────
   STATS BAR
──────────────────────────── */
.stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 32px 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.stat-num span {
  color: var(--accent);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

/* ────────────────────────────
   FILTERS
──────────────────────────── */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  margin-right: 4px;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
  background: rgba(108, 99, 255, 0.12);
  border-color: var(--accent);
  color: var(--accent2);
}

.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  outline: none;
}

/* ────────────────────────────
   JOB GRID
──────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.job-count {
  color: var(--muted);
  font-size: 13px;
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

/* ────────────────────────────
   JOB CARD
──────────────────────────── */
.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.job-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.2s;
}

.job-card:hover {
  background: var(--card-hover);
  border-color: rgba(108, 99, 255, 0.3);
  transform: translateY(-2px);
}

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

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.company-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  flex-shrink: 0;
}

/* ── Source Badges ── */
.source-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.source-internshala {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.source-unstop {
  background: rgba(249, 115, 22, 0.12);
  color: var(--orange);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.source-naukri {
  background: rgba(56, 189, 248, 0.12);
  color: var(--blue);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.source-indeed {
  background: rgba(244, 114, 182, 0.12);
  color: var(--pink);
  border: 1px solid rgba(244, 114, 182, 0.2);
}

.job-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.company-name {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.job-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.stipend {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--green);
}

.apply-btn {
  background: rgba(108, 99, 255, 0.12);
  border: 1px solid rgba(108, 99, 255, 0.25);
  color: var(--accent2);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}

.apply-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ────────────────────────────
   LOADING STATE
──────────────────────────── */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ────────────────────────────
   EMPTY STATE
──────────────────────────── */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* ────────────────────────────
   RESPONSIVE
──────────────────────────── */
@media (max-width: 600px) {
  nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .hero { padding: 50px 20px 40px; }
  .job-grid { grid-template-columns: 1fr; }
  .stats { gap: 24px; }
}


/* ────────────────────────────
   PROFILE AVATAR (navbar)
──────────────────────────── */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.avatar:hover {
  opacity: 0.85;
  transform: scale(1.06);
}

/* ────────────────────────────
   AVATAR WRAP + DROPDOWN
──────────────────────────── */
.avatar-wrap {
  position: relative;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: #0a0a0f;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  z-index: 400;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

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

/* Header */
.dropdown-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.user-text-details {
  display: flex;
  flex-direction: column;
  text-align: left;
  overflow: hidden;
}

.dropdown-avatar-header {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-username-header {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-completion-header {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Divider */
.dropdown-divider {
  height: 1px;
  background: #2a2a3a;
  margin: 6px 0;
}

/* Menu items */
.dropdown-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 10px;
  color: #8888aa;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  background: transparent;
  line-height: 1.4;
  border-radius: 6px;
  cursor: pointer;
  margin: 1px 12px;
  width: calc(100% - 24px);
  box-sizing: border-box;
}

.dropdown-item:hover {
  background: rgba(108, 99, 255, 0.08);
  color: var(--text);
}

.dropdown-item.active {
  background: rgba(108, 99, 255, 0.1);
  color: #c0c0d8;
}

.menu-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.dropdown-item.dropdown-signout {
  color: #f87171;
}

.dropdown-item.dropdown-signout:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
}

@media (max-width: 600px) {
  .profile-dropdown {
    position: fixed;
    top: 62px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* Bookmark Button Styling */
.bookmark-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #8888aa;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, transform 0.2s;
  border-radius: 50%;
}

.bookmark-btn:hover {
  transform: scale(1.15);
  color: #6c63ff;
  background: rgba(108, 99, 255, 0.08);
}

.bookmark-btn.saved {
  color: #6c63ff;
}


.hidden { display: none !important; }

/* ── Loading Spinner ── */
.loader-container {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: #64748b;
  font-size: 15px;
  gap: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(108, 99, 255, 0.1);
  border-left-color: #6c63ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
