/* ─── VARIABLES ─────────────────────────────────────────────── */
:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1a1a26;
  --border: rgba(255,255,255,0.07);
  --accent: #7c6aff;
  --accent2: #ff6a9e;
  --accent3: #6affd4;
  --text: #f0eeff;
  --muted: #8884a8;
  --card-bg: #14141e;
}

/* ─── RESET ──────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: 'DM Sans', sans-serif; min-height: 100vh; overflow-x: hidden; }

/* ─── NAV ────────────────────────────────────────────────────── */
nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 40px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(10,10,15,0.9); backdrop-filter: blur(12px); z-index: 100; }
.logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 22px; color: var(--text); cursor: pointer; }
.logo span { color: var(--accent); }
.nav-tabs { display: flex; gap: 8px; }
.nav-tab { padding: 8px 18px; border-radius: 100px; font-size: 14px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; color: var(--muted); background: none; font-family: 'DM Sans', sans-serif; }
.nav-tab:hover { color: var(--text); border-color: var(--border); }
.nav-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.nav-cta { padding: 8px 20px; background: var(--accent); color: #fff; border: none; border-radius: 100px; font-size: 14px; cursor: pointer; font-family: 'DM Sans', sans-serif; font-weight: 500; transition: opacity 0.2s; }
.nav-cta:hover { opacity: 0.85; }
.nav-avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; }
.notif-dot { width: 8px; height: 8px; background: var(--accent2); border-radius: 50%; display: inline-block; margin-left: 6px; vertical-align: middle; }

/* ─── PAGES ──────────────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn-primary { padding: 14px 32px; background: var(--accent); color: #fff; border: none; border-radius: 100px; font-size: 16px; cursor: pointer; font-family: 'DM Sans', sans-serif; font-weight: 500; transition: all 0.2s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124,106,255,0.4); }
.btn-secondary { padding: 14px 32px; background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 100px; font-size: 16px; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.2s; }
.btn-secondary:hover { border-color: rgba(255,255,255,0.2); background: var(--surface); }

/* ─── LANDING ────────────────────────────────────────────────── */
.hero { min-height: calc(100vh - 70px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 20px; position: relative; overflow: hidden; }
.hero-glow { position: absolute; top: 10%; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(circle, rgba(124,106,255,0.15) 0%, transparent 70%); pointer-events: none; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; background: rgba(124,106,255,0.12); border: 1px solid rgba(124,106,255,0.3); border-radius: 100px; font-size: 13px; color: var(--accent); margin-bottom: 32px; }
.hero-badge-dot { width: 6px; height: 6px; background: var(--accent3); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }
.hero h1 { font-family: 'Syne', sans-serif; font-size: clamp(40px, 7vw, 78px); font-weight: 800; line-height: 1.05; max-width: 800px; margin-bottom: 24px; }
.hero h1 .c2 { color: var(--accent); }
.hero h1 .c3 { color: var(--accent2); }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 520px; line-height: 1.7; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.stats { display: flex; gap: 48px; justify-content: center; margin-top: 64px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ─── AUTH ───────────────────────────────────────────────────── */
.auth-page { max-width: 440px; margin: 0 auto; padding: 60px 24px; }
.auth-page h2 { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.auth-page p { color: var(--muted); font-size: 15px; margin-bottom: 32px; }
.auth-tabs { display: flex; background: var(--surface); border-radius: 12px; padding: 4px; margin-bottom: 28px; }
.auth-tab { flex: 1; padding: 10px; border: none; background: none; color: var(--muted); font-size: 14px; font-family: 'DM Sans', sans-serif; cursor: pointer; border-radius: 9px; transition: all 0.2s; }
.auth-tab.active { background: var(--accent); color: #fff; }
.auth-error { background: rgba(226,75,74,0.1); border: 1px solid rgba(226,75,74,0.2); border-radius: 10px; padding: 12px 16px; font-size: 14px; color: #f09595; margin-bottom: 16px; display: none; }
.auth-success { background: rgba(106,255,212,0.08); border: 1px solid rgba(106,255,212,0.2); border-radius: 10px; padding: 12px 16px; font-size: 14px; color: var(--accent3); margin-bottom: 16px; display: none; }

/* ─── FORM ───────────────────────────────────────────────────── */
.form-page { max-width: 680px; margin: 0 auto; padding: 48px 24px; }
.form-header { margin-bottom: 40px; }
.form-header h2 { font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.form-header p { color: var(--muted); font-size: 15px; }
.form-group { margin-bottom: 24px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; display: block; }
.form-input { width: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-size: 15px; font-family: 'DM Sans', sans-serif; outline: none; transition: border-color 0.2s; }
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--muted); }
select.form-input option { background: var(--surface2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.skill-tags-input { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; min-height: 56px; cursor: text; transition: border-color 0.2s; }
.skill-tags-input:focus-within { border-color: var(--accent); }
.skill-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; background: rgba(124,106,255,0.15); border: 1px solid rgba(124,106,255,0.3); border-radius: 100px; font-size: 13px; color: var(--accent); white-space: nowrap; }
.skill-tag-want { background: rgba(255,106,158,0.12); border-color: rgba(255,106,158,0.3); color: var(--accent2); }
.skill-tag-remove { cursor: pointer; opacity: 0.6; font-size: 15px; line-height: 1; }
.skill-tag-remove:hover { opacity: 1; }
.tag-input { border: none; background: transparent; color: var(--text); font-size: 14px; font-family: 'DM Sans', sans-serif; outline: none; min-width: 120px; flex: 1; padding: 4px; }
.tag-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.add-tag-btn { margin-top: 8px; padding: 8px 16px; background: rgba(124,106,255,0.12); border: 1px solid rgba(124,106,255,0.3); border-radius: 100px; color: var(--accent); font-size: 13px; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all 0.15s; }
.add-tag-btn:hover { background: rgba(124,106,255,0.2); }
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.avatar-option { width: 100%; aspect-ratio: 1; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 28px; border: 2px solid transparent; transition: all 0.15s; background: var(--surface); }
.avatar-option:hover { border-color: var(--accent); transform: scale(1.05); }
.avatar-option.selected { border-color: var(--accent); background: rgba(124,106,255,0.15); }
.form-submit { width: 100%; padding: 16px; background: var(--accent); color: #fff; border: none; border-radius: 12px; font-size: 16px; font-weight: 500; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all 0.2s; margin-top: 8px; }
.form-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124,106,255,0.35); }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── DISCOVER ───────────────────────────────────────────────── */
.discover-page { padding: 40px; max-width: 1200px; margin: 0 auto; }
.discover-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.discover-header h2 { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; }
.search-bar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 100px; padding: 10px 20px; flex: 1; max-width: 380px; }
.search-bar input { border: none; background: transparent; color: var(--text); font-size: 14px; font-family: 'DM Sans', sans-serif; outline: none; flex: 1; }
.search-bar input::placeholder { color: var(--muted); }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-chip { padding: 6px 16px; border-radius: 100px; font-size: 13px; cursor: pointer; border: 1px solid var(--border); color: var(--muted); background: transparent; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
.filter-chip:hover { border-color: rgba(124,106,255,0.4); color: var(--text); }
.filter-chip.active { background: rgba(124,106,255,0.15); border-color: rgba(124,106,255,0.4); color: var(--accent); }
.profiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

/* ─── PROFILE CARD ───────────────────────────────────────────── */
.profile-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 24px; transition: all 0.2s; cursor: pointer; }
.profile-card:hover { border-color: rgba(124,106,255,0.3); transform: translateY(-2px); }
.pc-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pc-avatar { width: 52px; height: 52px; border-radius: 14px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; }
.pc-info h3 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px; margin-bottom: 3px; }
.pc-info p { font-size: 12px; color: var(--muted); }
.match-badge { margin-left: auto; padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 500; flex-shrink: 0; }
.match-high { background: rgba(106,255,212,0.12); color: var(--accent3); border: 1px solid rgba(106,255,212,0.25); }
.match-med { background: rgba(124,106,255,0.12); color: var(--accent); border: 1px solid rgba(124,106,255,0.25); }
.match-low { background: rgba(255,106,158,0.1); color: var(--accent2); border: 1px solid rgba(255,106,158,0.2); }
.pc-skills { margin-bottom: 14px; }
.pc-skill-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.pc-skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-skill-tag { padding: 3px 10px; border-radius: 100px; font-size: 12px; background: rgba(124,106,255,0.1); color: var(--accent); border: 1px solid rgba(124,106,255,0.2); }
.pc-skill-tag-want { background: rgba(255,106,158,0.08); color: var(--accent2); border-color: rgba(255,106,158,0.2); }
.pc-connect { width: 100%; padding: 10px; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 14px; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all 0.2s; font-weight: 500; }
.pc-connect:hover { background: var(--accent); border-color: var(--accent); }
.pc-connect.requested { background: rgba(124,106,255,0.1); border-color: rgba(124,106,255,0.3); color: var(--accent); cursor: default; }
.pc-connect.connected { background: rgba(106,255,212,0.1); border-color: rgba(106,255,212,0.3); color: var(--accent3); cursor: default; }

/* ─── MODAL ──────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(8px); z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 32px; max-width: 480px; width: 100%; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-close { position: absolute; top: 16px; right: 16px; background: var(--surface2); border: none; color: var(--muted); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.modal-avatar { width: 72px; height: 72px; border-radius: 18px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 36px; margin-bottom: 16px; }
.modal h3 { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.modal-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.modal-match-bar { background: var(--surface2); border-radius: 100px; height: 8px; margin-bottom: 6px; overflow: hidden; }
.modal-match-fill { height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--accent), var(--accent3)); width: 0%; transition: width 0.8s ease; }
.modal-match-label { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.modal-skill-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.modal-skill-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.modal-connect-btns { display: flex; flex-direction: column; gap: 10px; }
.modal-btn { padding: 13px 20px; border-radius: 12px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s; border: 1px solid var(--border); background: var(--surface2); color: var(--text); text-align: center; }
.modal-btn:hover { border-color: var(--accent); color: var(--accent); }
.modal-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.modal-btn.primary:hover { opacity: 0.9; }
.modal-btn.success { background: rgba(106,255,212,0.1); border-color: rgba(106,255,212,0.3); color: var(--accent3); cursor: default; }
.modal-btn.pending { background: rgba(124,106,255,0.1); border-color: rgba(124,106,255,0.3); color: var(--accent); cursor: default; }
.status-banner { padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 20px; }
.status-banner.pending { background: rgba(124,106,255,0.1); border: 1px solid rgba(124,106,255,0.2); color: var(--accent); }
.status-banner.connected { background: rgba(106,255,212,0.08); border: 1px solid rgba(106,255,212,0.2); color: var(--accent3); }
.status-banner.incoming { background: rgba(255,106,158,0.08); border: 1px solid rgba(255,106,158,0.2); color: var(--accent2); }
.contact-reveal { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.contact-reveal-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.contact-locked { text-align: center; padding: 16px; background: var(--surface2); border: 1px dashed var(--border); border-radius: 12px; margin-bottom: 16px; }
.contact-locked p { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ─── CONNECTIONS PAGE ───────────────────────────────────────── */
.connections-page { max-width: 780px; margin: 0 auto; padding: 40px 24px; }
.connections-page h2 { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; margin-bottom: 28px; }
.conn-section-title { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; margin-top: 28px; font-weight: 500; }
.conn-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.conn-avatar { width: 48px; height: 48px; border-radius: 12px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.conn-info { flex: 1; }
.conn-info h4 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; margin-bottom: 3px; }
.conn-info p { font-size: 12px; color: var(--muted); }
.conn-actions { display: flex; gap: 8px; }
.conn-btn { padding: 7px 14px; border-radius: 8px; font-size: 13px; font-family: 'DM Sans', sans-serif; cursor: pointer; border: 1px solid var(--border); background: var(--surface2); color: var(--text); transition: all 0.15s; white-space: nowrap; }
.conn-btn.accept { background: rgba(106,255,212,0.1); border-color: rgba(106,255,212,0.3); color: var(--accent3); }
.conn-btn.accept:hover { background: rgba(106,255,212,0.2); }
.conn-btn.decline { background: rgba(255,106,158,0.08); border-color: rgba(255,106,158,0.2); color: var(--accent2); }
.conn-btn.decline:hover { background: rgba(255,106,158,0.15); }

/* ─── MY PROFILE ─────────────────────────────────────────────── */
.my-profile { max-width: 680px; margin: 0 auto; padding: 48px 24px; }
.my-profile-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 20px; padding: 32px; margin-bottom: 20px; }
.my-profile-top { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.my-avatar { width: 80px; height: 80px; border-radius: 20px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.my-profile-info h2 { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.my-profile-info p { color: var(--muted); font-size: 14px; }
.section-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; font-weight: 500; }
.tag-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag { padding: 5px 14px; border-radius: 100px; font-size: 13px; }
.tag-have { background: rgba(124,106,255,0.12); color: var(--accent); border: 1px solid rgba(124,106,255,0.25); }
.tag-want { background: rgba(255,106,158,0.1); color: var(--accent2); border: 1px solid rgba(255,106,158,0.2); }
.action-btn { padding: 10px 20px; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 14px; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all 0.15s; margin-right: 10px; margin-bottom: 10px; }
.action-btn:hover { border-color: var(--accent); color: var(--accent); }
.signout-btn { background: rgba(226,75,74,0.08); border-color: rgba(226,75,74,0.2); color: #f09595; }
.signout-btn:hover { background: rgba(226,75,74,0.15); border-color: rgba(226,75,74,0.4); color: #f09595; }

/* ─── TOAST ──────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--surface); border: 1px solid var(--border); border-radius: 100px; padding: 12px 24px; font-size: 14px; color: var(--text); z-index: 300; transition: transform 0.3s ease; white-space: nowrap; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ─── MOBILE ─────────────────────────────────────────────────── */
@media(max-width:600px) {
  nav { padding: 16px 20px; }
  .nav-tabs { display: none; }
  .discover-page { padding: 24px 16px; }
  .form-page, .my-profile, .connections-page, .auth-page { padding: 28px 16px; }
  .two-col { grid-template-columns: 1fr; }
}
