  /* Findn AI Styles */
  :root {
    --bg: #0b0c10; /* near-black */
    --panel: #111218;
    --card-bg: #1a1b23;
    --text: #e8eaf0; /* near-white */
    --muted: #9aa3b2;
    --primary: #4f86ff; /* blue */
    --primary-hover: #3d6bff;
    --border: #262836;
    --shadow: 0 10px 30px rgba(0,0,0,0.35);
    /* Gradient colors inspired by the logo */
    --grad-a: #8b5cf6; /* purple */
    --grad-b: #4f86ff; /* blue */
    --grad-c: #60a5fa; /* sky */
  }

  * { box-sizing: border-box; }
  html, body { height: 100%; }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .container {
    max-width: 980px;
    padding: 0 20px;
    margin: 0 auto;
  }

  .header {
    position: sticky;
    top: 0;
    backdrop-filter: saturate(160%) blur(8px);
    background: rgba(17, 18, 24, 0.7);
    border-bottom: 1px solid var(--border);
    z-index: 10;
  }
  .header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 64px;
  }
  
  /* Navigation Menu */
  .nav-menu {
    display: flex;
    gap: 24px;
    margin-left: 40px;
  }

  .nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
  }

  .nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
  }

  .nav-link.active {
    color: var(--primary);
    background: rgba(79, 134, 255, 0.1);
  }
  
  /* Profile Search */
  .profile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 20px;
  }
  
  .search-input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    width: 200px;
    transition: all 0.2s ease;
  }
  
  .search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 134, 255, 0.1);
  }
  
  .search-input::placeholder {
    color: var(--muted);
  }
  
  .search-btn {
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .search-btn:hover {
    background: #3d6bff;
    transform: scale(1.05);
  }
  
  .header .header-actions { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
  }
  
  /* Auth buttons */
  .auth-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  
  .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
  }
  
  .profile-btn {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
  }
  
  .profile-btn:hover {
    background: rgba(79, 134, 255, 0.1);
    color: var(--primary);
  }
  .user-email {
    font-size: 14px;
    color: #666;
    font-weight: 500;
  }
  .status-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(79,134,255,0.15);
    color: #cfe0ff;
    border: 1px solid rgba(96,165,250,0.35);
  }
  .header h1 {
    font-size: 20px;
    letter-spacing: 0.5px;
    margin: 0;
  }

  /* Gradient text utility */
  .gradient-text {
    background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--grad-c));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .hero {
    padding: 15px 0 20px;
    text-align: center;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  .hero h2 {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    margin: 0 0 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
  .hero .subtext {
    color: var(--muted);
    margin: 0 auto 14px;
    max-width: 700px;
    font-size: 16px;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  }

  .search-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin: 0 auto 12px;
    max-width: 760px;
    width: 100%;
    padding: 0 20px;
  }

  #interestInput {
    flex: 1 1 520px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 16px;
    outline: none;
    transition: box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
    background: #0f1117;
    color: var(--text);
  }
  #interestInput:focus {
    border-color: #3a3f55;
    box-shadow: 0 0 0 6px rgba(111, 142, 255, 0.08);
  }

  .btn-primary, .btn-secondary {
    appearance: none;
    border: 1px solid #2b2f3f;
    background: var(--primary);
    color: #fff;
    padding: 14px 22px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
    box-shadow: var(--shadow);
  }
  .btn-primary:hover {
    transform: translateY(-1px);
    background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--grad-c));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 22px rgba(96,165,250,0.35);
  }
  .btn-primary:active { transform: translateY(0); }
button[disabled] { opacity: 0.6; cursor: not-allowed; }

  .btn-secondary {
    background: #141722;
    color: var(--text);
  }
  .btn-secondary:hover {
    background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--grad-c));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 22px rgba(96,165,250,0.35);
  }

  /* Small button variants */
  .btn-small {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
  }
  .btn-xsmall {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
  }

  .extra-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
    flex-wrap: wrap;
  }

  .results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 28px auto 60px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 250ms ease, transform 300ms ease;
  }
  .results.show {
    opacity: 1;
    transform: translateY(0);
  }
  .result-category {
    background: linear-gradient(180deg, rgba(139,92,246,0.12), rgba(79,134,255,0.10)) padding-box,
                linear-gradient(90deg, rgba(139,92,246,0.6), rgba(79,134,255,0.6), rgba(96,165,250,0.6)) border-box;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 14px;
    box-shadow: var(--shadow);
    margin-bottom: 8px;
  }
  .result-content {
    display: grid;
    gap: 10px;
  }
  .card {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 12px 12px;
    transition: background 180ms ease, transform 120ms ease, box-shadow 180ms ease;
    background: linear-gradient(180deg, rgba(20,23,34,1), rgba(18,21,30,1)) padding-box,
                linear-gradient(90deg, rgba(139,92,246,0.35), rgba(79,134,255,0.35), rgba(96,165,250,0.35)) border-box;
    color: var(--text);
  }
  .card:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(0,0,0,0.35); }
  .card-title { font-weight: 600; margin: 0 0 6px; }
  .card-sub { color: var(--muted); margin: 0; font-size: 14px; }
  .card-link {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 8px;
    background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--grad-c));
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: transform 120ms ease, box-shadow 180ms ease;
  }
  .card-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(96,165,250,0.35);
  }

  .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }
  .section-header h3 {
    margin: 0;
  }
  .refresh-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 180ms ease;
  }
  .refresh-btn:hover {
    background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--grad-c));
    color: #fff;
    border-color: transparent;
    transform: rotate(180deg);
  }
  .refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
  }

  .hidden {
    display: none !important;
  }

  .loading {
    position: fixed;
    left: 50%;
    top: 110px;
    transform: translateX(-50%);
    background: #141722;
    border: 2px solid #2a2e3e;
    border-top-color: var(--grad-b);
    animation: spin 1s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .hidden { display: none; }

  .footer {
    margin-top: auto;
    padding: 20px 0;
    text-align: center;
    color: #666;
  }

/* === Auth Modal Styles === */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.auth-modal.active {
  opacity: 1;
  visibility: visible;
}

.auth-container {
  background: white;
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
  margin: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.auth-modal.active .auth-container {
  transform: translateY(0);
}

.auth-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  gap: 20px;
}

.nav-menu {
  font-weight: 600;
  color: #111;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.close-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #4f86ff;
  box-shadow: 0 0 0 3px rgba(79, 134, 255, 0.1);
}

.btn-auth {
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-auth:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-auth.btn-primary {
  background: #4f86ff;
  color: white;
}

.btn-auth.btn-primary:hover:not(:disabled) {
  background: #3b72e6;
  transform: translateY(-1px);
}

.error-message {
  color: #e53e3e;
  font-size: 14px;
  margin-top: 8px;
  min-height: 20px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #666;
}

.auth-footer a {
  color: #4f86ff;
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* === Results and Card Styles === */
.results { 
  opacity: 0; 
  transition: opacity .2s, transform .25s; 
  transform: translateY(10px);
}

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

.card {
  background: #0f1117;
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  margin-bottom: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.card h4 { 
  margin: 0 0 6px; 
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.card-sub { 
  margin: 0 0 8px; 
  color: var(--muted); 
  font-size: 14px;
  line-height: 1.4;
}

.card-link { 
  font-size: 13px; 
  text-decoration: none; 
  color: var(--primary);
  font-weight: 500;
}

.card-link:hover {
  text-decoration: underline;
}

.hidden { 
  display: none !important; 
}

/* === Profile Setup Styles === */
.profile-setup {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--bg);
}

.profile-form-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-form-container h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 600;
  text-align: center;
}

.profile-form-container .subtext {
  text-align: center;
  color: var(--muted);
  margin-bottom: 32px;
}

.profile-form .form-group {
  margin-bottom: 24px;
}

.profile-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}

.profile-form input,
.profile-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.profile-form input:focus,
.profile-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 134, 255, 0.1);
}

.profile-form input::placeholder,
.profile-form textarea::placeholder {
  color: var(--muted);
}

.profile-form textarea {
  resize: vertical;
  min-height: 80px;
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.interests-container {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  min-height: 60px;
  background: var(--bg);
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.interest-tag {
  background: var(--primary);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.interest-tag button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-actions {
  margin-top: 32px;
  text-align: center;
}

.error-message {
  color: #e53e3e;
  font-size: 14px;
  margin-top: 8px;
  min-height: 20px;
}

/* === Mobile Menu Styles === */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.mobile-menu {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--card-bg);
  border-left: 1px solid var(--border);
  padding: 80px 24px 24px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu-overlay.active .mobile-menu {
  transform: translateX(0);
}

.mobile-nav-link {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--primary);
}

.mobile-auth-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.mobile-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-user-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-profile-search {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.mobile-search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  margin-bottom: 12px;
}

.mobile-search-input:focus {
  outline: none;
  border-color: var(--primary);
}

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

.mobile-search-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mobile-search-btn:hover {
  background: #3d6bff;
}

.mobile-profile-link {
  display: block;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.mobile-profile-link:hover {
  color: #3d6bff;
}

/* === Profile Page Styles === */
.profile-page {
  min-height: 100vh;
  padding: 40px 20px;
  background: var(--bg);
}

.profile-container {
  max-width: 800px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 40px;
  padding: 32px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
}

.profile-info h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.profile-username {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 12px;
}

.profile-bio {
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 8px;
}

.profile-location {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.profile-section {
  margin-bottom: 32px;
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.profile-section h3 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 20px;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: all 0.2s ease;
}

.profile-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

.no-data {
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

.join-date {
  color: var(--text);
  font-size: 16px;
  margin: 0;
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  .profile-search {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
  
  .profile-avatar {
    margin: 0 auto;
  }
  
  .profile-links {
    justify-content: center;
  }
}

/* === Top Matches Styles === */
.top-matches {
  padding: 60px 20px;
  background: var(--bg);
  min-height: 100vh;
}

.matches-header {
  text-align: center;
  margin-bottom: 40px;
}

.matches-header h2 {
  margin: 0 0 12px;
  font-size: 36px;
}

.matches-header .subtext {
  margin-bottom: 24px;
  font-size: 18px;
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.match-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s ease;
  position: relative;
}

.match-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border-color: var(--primary);
}

.match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.match-info h4 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
}

.match-username {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.match-score {
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.shared-interests {
  margin-bottom: 16px;
}

.shared-interests h5 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shared-interest-tag {
  background: rgba(79, 134, 255, 0.15);
  color: var(--primary);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.match-explanation {
  color: var(--muted);
  font-style: italic;
  line-height: 1.4;
  font-size: 14px;
  margin: 0;
}

.no-matches {
  text-align: center;
  padding: 80px 20px;
}

.no-matches-content h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 24px;
}

.no-matches-content p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
}

@media (max-width: 768px) {
  .matches-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .match-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .top-matches {
    padding: 40px 16px;
  }
}

/* === Auto-Matching Feed Styles === */
.matches {
  margin: 10px auto;
  max-width: 900px;
  text-align: center;
  padding: 0 20px;
}

.matches-title {
  font-size: 24px;
  margin-bottom: 16px;
  margin-top: 0px;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
}

.matches-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.match-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f1117;
  box-shadow: var(--shadow);
  text-align: left;
  transition: all 0.2s ease;
}

.match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
}

.clickable-card {
  cursor: pointer;
}

.match-card-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.match-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.match-card-actions .btn-small {
  width: 100%;
  text-align: center;
}

.view-profile {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-profile:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.match-card h3 {
  margin: 0 0 8px 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}

.match-card .username {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}

.match-card .interests {
  font-size: 14px;
  color: var(--muted);
  margin: 6px 0;
}

.match-card .match-score {
  display: inline-block;
  margin: 8px 0;
  padding: 4px 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.match-card .why-matched {
  font-size: 14px;
  color: #cfcfcf;
  font-style: italic;
  margin-top: 10px;
  line-height: 1.4;
}

.convo-prompts {
  margin-top: 12px;
  padding: 12px;
  background: #1a1c23;
  border-radius: 10px;
  text-align: left;
  border: 1px solid var(--border);
}

.convo-prompts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.convo-prompts li {
  font-size: 14px;
  margin: 6px 0;
  color: #cfcfcf;
  line-height: 1.4;
  padding: 4px 0;
}

.convo-prompts li:before {
  content: "💬 ";
  margin-right: 6px;
}

.generate-prompts {
  margin-top: 10px;
  padding: 6px 12px;
  font-size: 13px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.generate-prompts:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.generate-prompts:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 768px) {
  .matches-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .matches {
    margin: 30px auto;
    padding: 0 16px;
  }
}

/* === Profile Setup Styles === */
.profile-setup {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.profile-form-container {
  max-width: 400px;
  width: 100%;
  background: #0f1117;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
}

.profile-form-container h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.profile-form-container .subtext {
  margin-bottom: 30px;
  color: var(--muted);
}

.profile-form {
  text-align: left;
}

.profile-form .form-group {
  margin-bottom: 20px;
}

.profile-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}

.profile-form input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #1a1c23;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.2s ease;
}

.profile-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 134, 255, 0.2);
}

.help-text {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.form-actions {
  margin-top: 30px;
  text-align: center;
}

.form-actions .btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
}

/* === Individual Profile Page Styles === */
.profile-page {
  min-height: 100vh;
  padding: 40px 20px;
  background: var(--bg);
}

.profile-container {
  max-width: 800px;
  margin: 0 auto;
  background: #0f1117;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  position: relative;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  font-weight: bold;
  color: #fff;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
}

.profile-info h1 {
  margin: 0 0 5px 0;
  font-size: 28px;
}

.profile-username {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 8px 0;
}

.profile-bio {
  color: var(--text);
  font-size: 16px;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.profile-location {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

#editProfileBtn {
  position: absolute;
  top: 0;
  right: 0;
}

.profile-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.profile-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.profile-section h3 {
  margin: 0 0 15px 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-tag {
  background: #1a1c23;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #1a1c23;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.profile-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

.link-icon {
  font-size: 16px;
}

.join-date {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.no-data {
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

.profile-actions {
  margin-top: 20px;
  text-align: center;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.profile-actions button {
  padding: 10px 20px;
  font-size: 14px;
}

.conversation-prompts {
  margin-top: 25px;
  padding: 20px;
  background: #1a1c23;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.conversation-prompts h3 {
  margin: 0 0 15px 0;
  color: var(--text);
}

.prompts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prompt-item {
  padding: 12px 16px;
  background: #0f1117;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  #editProfileBtn {
    position: static;
    margin-top: 15px;
  }
  
  .profile-actions {
    flex-direction: column;
  }
  
  .profile-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .search-input {
    width: 150px;
  }
  
  .header .container {
    padding: 0 16px;
  }
  
  .profile-setup {
    padding: 20px 16px;
  }
  
  .profile-form-container {
    padding: 20px;
  }
  
  .profile-page {
    padding: 20px 16px;
  }
  
  .profile-container {
    padding: 20px;
  }
  
  .profile-avatar {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
}

/* === Find (Discovery) Page Styles === */
.find-page {
  min-height: 100vh;
  padding: 40px 0;
  background: var(--bg);
  width: 100%;
}

.find-page .container {
  max-width: 100%;
  padding: 0 20px;
  width: 100%;
}

.find-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 0 20px;
}

.find-title {
  font-size: 36px;
  margin-bottom: 8px;
}

.find-subtitle {
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.refresh-feed-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 8px 16px;
}

.refresh-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.refresh-feed-btn:hover .refresh-icon {
  transform: rotate(180deg);
}

.discover-loading {
  text-align: center;
  padding: 60px 20px;
}

.discover-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.discover-loading p {
  color: var(--muted);
  font-size: 16px;
}

/* Masonry Grid Layout */
.discover-feed {
  width: 100%;
  padding: 0 20px;
}

.masonry-grid {
  columns: 4;
  column-gap: 24px;
  max-width: none;
  margin: 0;
}

.loading-more {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.loading-more .spinner {
  width: 24px;
  height: 24px;
  margin: 0 auto 12px;
}

.discover-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  break-inside: avoid;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.discover-card.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.discover-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(79, 134, 255, 0.05) 100%);
}

.discover-card h3 {
  margin: 0 0 12px 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.card-subtext {
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.hero-content {
  max-width: 800px;
.card-icon {
  font-size: 36px;
  margin-bottom: 16px;
  display: block;
  opacity: 0.9;
}
}

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

.card-tags .tag {
  background: rgba(79, 134, 255, 0.1);
  border: 1px solid rgba(79, 134, 255, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.card-tags .tag:hover {
  background: rgba(79, 134, 255, 0.15);
  border-color: var(--primary);
}

.ai-reason {
  margin: 12px 0;
  font-style: italic;
  color: #cfcfcf;
  font-size: 14px;
  line-height: 1.4;
}

.discover-card .btn-small {
  width: 100%;
  margin-top: 12px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
}

.person-card {
  border-left: 3px solid var(--grad-a);
}

.project-card {
  border-left: 3px solid var(--grad-b);
}

.trend-card {
  border-left: 3px solid var(--grad-c);
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  max-width: 400px;
  margin: 0 auto;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.6;
}

.empty-state h3 {
  margin: 0 0 12px 0;
  color: var(--text);
  font-size: 24px;
}

.empty-state p {
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 1200px) {
  .masonry-grid {
    columns: 3;
    column-gap: 20px;
  }
}

@media (max-width: 768px) {
  .find-page {
    padding: 20px 0;
  }
  
  .find-page .container {
    padding: 0 16px;
  }
  
  .find-header {
    padding: 0 16px;
  }
  
  .find-title {
    font-size: 28px;
  }
  
  .find-subtitle {
    font-size: 16px;
  }
  
  .masonry-grid {
    columns: 2;
    column-gap: 16px;
  }
  
  .discover-feed {
    padding: 0 16px;
  }
  
  .discover-card {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .saved-ideas-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .saved-idea-card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .find-header {
    margin-bottom: 30px;
  }
  
  .find-title {
    font-size: 24px;
  }
  
  .find-subtitle {
    font-size: 14px;
  }
  
  .masonry-grid {
    columns: 1;
    column-gap: 0;
  }
}

/* Save Idea and Explore Buttons */
.save-idea-btn, .explore-trend-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
  width: 100%;
}

.save-idea-btn:hover, .explore-trend-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.save-idea-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.save-idea-btn.saved {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

#backToFeedBtn {
  margin-top: 16px;
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

/* Profile Picture Upload */
.profile-avatar-container {
  position: relative;
  display: inline-block;
}

.profile-avatar-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent);
  margin-bottom: 10px;
}

.upload-photo-btn {
  margin-top: 8px;
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
}

.upload-photo-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Saved Ideas Grid */
.saved-ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.saved-idea-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.saved-idea-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--grad-c));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.saved-idea-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  border-color: var(--primary);
}

.saved-idea-card:hover::before {
  opacity: 1;
}

.saved-idea-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.saved-idea-title::before {
  content: '💡';
  font-size: 16px;
  opacity: 0.8;
}

.saved-idea-description {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.saved-idea-tags .tag {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--grad-a);
  font-weight: 500;
  transition: all 0.2s ease;
}

.saved-idea-tags .tag:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--grad-a);
}

.saved-idea-date {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.saved-idea-date::before {
  content: '📅';
  font-size: 10px;
}

.delete-idea-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff3b30;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
}

.saved-idea-card:hover .delete-idea-btn {
  opacity: 1;
}

.delete-idea-btn:hover {
  background: rgba(255, 59, 48, 0.2);
  border-color: #ff3b30;
  transform: scale(1.1);
}

/* Features Section */
.features {
  padding: 3rem 0;
  background: var(--bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg);
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3 {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.6;
}

/* User Avatar Images */
.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.user-avatar-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 20px;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 1rem;
    min-height: 85vh;
  }
  
  .hero-text {
    margin-bottom: 1.5rem;
  }
  
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .search-container {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  
  .search-container input {
    padding: 14px 16px;
  }
  
  .search-container .btn-primary {
    width: 100%;
    justify-content: center;
  }
  
  .extra-actions {
    gap: 0.75rem;
    flex-direction: column;
    align-items: center;
  }
  
  .extra-actions button {
    width: 100%;
    max-width: 280px;
  }
  
  .btn-secondary {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .feature-card {
    padding: 1.25rem;
  }
  
  .feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  
  .feature-card h3 {
    font-size: 1rem;
  }
  
  .feature-card p {
    font-size: 0.85rem;
  }
  @media (max-width: 480px) {
    .hero {
      padding: 24px 16px 40px;
      min-height: 90vh;
    }
  
    .hero h2 {
      font-size: clamp(20px, 8vw, 28px);
      margin-bottom: 8px;
    }
    .hero .subtext {
      font-size: 13px;
      margin-bottom: 20px;
    }
  
    .search-container {
      padding: 0 16px;
    }
  
    .container {
      padding: 0 16px;
    }
  
    .btn-primary, .btn-secondary {
      padding: 10px 20px;
      font-size: 14px;
    }
  }
}