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

:root {
  --primary: #C9515B;
  --primary-dark: #A8404A;
  --primary-light: #E8828A;
  --secondary: #D4A24C;
  --accent: #6B9E6F;
  --bg: #FFF9F3;
  --bg-alt: #FFF1E6;
  --surface: #FFFFFF;
  --surface-alt: #FEF7F0;
  --text: #2C1810;
  --text-secondary: #7A6860;
  --border: #E8DDD6;
  --shadow: rgba(44,24,16,0.08);
  --radius: 14px;
}

[data-theme="dark"] {
  --bg: #1A1614;
  --bg-alt: #231F1C;
  --surface: #2A2522;
  --surface-alt: #332E2A;
  --text: #F5F0EB;
  --text-secondary: #A89E96;
  --border: #3D3632;
  --shadow: rgba(0,0,0,0.3);
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.5rem; border-radius: 50px; font-weight: 600;
  font-size: 0.9rem; cursor: pointer; transition: all 0.3s;
  text-decoration: none; border: none; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,81,91,0.3); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(201,81,91,0.1); color: var(--primary);
  padding: 0.35rem 1rem; border-radius: 50px; font-size: 0.8rem; font-weight: 600;
  margin-bottom: 1rem;
}
.accent-text { color: var(--primary); }

/* ===== Navbar ===== */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: rgba(255,249,243,0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .navbar { background: rgba(26,22,20,0.9); }
.nav-container {
  max-width: 1140px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: var(--text); font-size: 1.2rem;
}
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.9rem;
}
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.lang-switch { display: flex; gap: 2px; }
.lang-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text-secondary);
  padding: 4px 8px; font-size: 0.7rem; cursor: pointer; border-radius: 6px;
  font-weight: 600; transition: all 0.2s; font-family: inherit;
}
.lang-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.3rem; cursor: pointer; }

/* ===== Hero ===== */
.hero {
  padding: 7rem 0 4rem; position: relative; overflow: hidden;
  min-height: 90vh; display: flex; align-items: center;
}
.hero-bg {
  position: absolute; top: 0; right: 0; width: 50%; height: 100%;
  background: linear-gradient(135deg, rgba(201,81,91,0.05), rgba(212,162,76,0.08));
  border-radius: 0 0 0 40%;
}
.hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; position: relative; z-index: 1; }
.hero-text h1 { font-size: 3rem; font-weight: 800; line-height: 1.15; margin-bottom: 1.25rem; }
.hero-text p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2rem; max-width: 500px; }
.hero-ctas { margin-bottom: 2.5rem; }
.hero-stats { display: flex; gap: 2rem; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); }

/* Phone Mockup */
.phone-mockup {
  width: 300px; margin: 0 auto;
  background: var(--surface); border-radius: 32px;
  padding: 12px; box-shadow: 0 20px 60px var(--shadow), 0 0 0 1px var(--border);
}
.phone-screen { border-radius: 24px; overflow: hidden; background: var(--bg); }
.mock-card { position: relative; }
.mock-card img { width: 100%; height: 360px; object-fit: cover; display: block; }
.mock-info {
  position: absolute; bottom: 0; left: 0; width: 100%;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 2rem 1rem 1rem; color: #fff;
}
.mock-info h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.3rem; }
.mock-info p { font-size: 0.8rem; opacity: 0.85; margin-bottom: 0.15rem; }
.mock-info i { margin-right: 0.3rem; font-size: 0.7rem; }
.mock-actions { display: flex; justify-content: center; gap: 1.5rem; padding: 1rem; }
.mock-btn {
  width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--border);
  background: var(--surface); cursor: default; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.mock-btn.pass { color: var(--text-secondary); }
.mock-btn.like { color: var(--primary); border-color: var(--primary); }

/* ===== Sections ===== */
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.2rem; font-weight: 800; }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.step-card {
  text-align: center; padding: 2rem 1.5rem;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); position: relative;
  transition: transform 0.3s;
}
.step-card:hover { transform: translateY(-4px); }
.step-num {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-icon {
  width: 60px; height: 60px; border-radius: 16px; margin: 1rem auto;
  background: rgba(201,81,91,0.08); display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--primary);
}
.step-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.step-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* Values */
.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; max-width: 800px; margin: 0 auto; }
.value-card {
  padding: 1.75rem; background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); transition: transform 0.3s;
}
.value-card:hover { transform: translateY(-3px); }
.value-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(201,81,91,0.08); display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--primary); margin-bottom: 1rem;
}
.value-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.value-card p { color: var(--text-secondary); font-size: 0.88rem; }

/* Verse */
.verse-section { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; text-align: center; }
.verse-quote p { font-size: 1.6rem; font-style: italic; font-weight: 500; margin-bottom: 1rem; line-height: 1.4; }
.verse-quote cite { font-size: 1rem; opacity: 0.8; font-style: normal; }

/* CTA */
.cta-section { text-align: center; padding: 5rem 0; }
.cta-section h2 { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; }
.cta-section p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 2rem; }

/* Footer */
.footer { padding: 2rem 0; border-top: 1px solid var(--border); }
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.footer-brand p { color: var(--text-secondary); font-size: 0.85rem; margin-top: 0.5rem; }
.footer-copy p { color: var(--text-secondary); font-size: 0.8rem; }

/* ===== Auth Pages ===== */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 440px; background: var(--surface);
  border-radius: 20px; padding: 2.5rem; border: 1px solid var(--border);
  box-shadow: 0 10px 40px var(--shadow);
}
.auth-card .logo { text-align: center; margin-bottom: 2rem; }
.auth-card h2 { text-align: center; font-size: 1.5rem; margin-bottom: 0.5rem; }
.auth-card .subtitle { text-align: center; color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.75rem 1rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 0.95rem; font-family: inherit;
  transition: border-color 0.3s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-error { color: var(--primary); font-size: 0.8rem; margin-top: 0.3rem; display: none; }
.auth-link { text-align: center; margin-top: 1.5rem; color: var(--text-secondary); font-size: 0.9rem; }
.auth-link a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* ===== App Layout ===== */
.app-layout { display: flex; min-height: 100vh; padding-top: 64px; }
.app-sidebar {
  width: 70px; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  padding: 1rem 0; gap: 0.25rem; position: fixed; top: 64px; bottom: 0; z-index: 50;
}
.app-nav-btn {
  width: 50px; height: 50px; border-radius: 14px; border: none;
  background: transparent; color: var(--text-secondary); font-size: 1.1rem;
  cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
}
.app-nav-btn span { font-size: 0.6rem; font-weight: 600; }
.app-nav-btn.active { color: var(--primary); background: rgba(201,81,91,0.1); }
.app-nav-btn:hover { color: var(--primary); }
.app-main { flex: 1; margin-left: 70px; padding: 1.5rem; }
.app-section { display: none; }
.app-section.active { display: block; }

/* ===== Discover ===== */
.discover-container { max-width: 420px; margin: 0 auto; }
.discover-card {
  position: relative; border-radius: 20px; overflow: hidden;
  background: var(--surface); box-shadow: 0 8px 30px var(--shadow);
  border: 1px solid var(--border);
}
.discover-photo { width: 100%; height: 480px; object-fit: cover; display: block; }
.discover-info {
  position: absolute; bottom: 0; left: 0; width: 100%;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 3rem 1.5rem 1.5rem; color: #fff;
}
.discover-name { font-size: 1.6rem; font-weight: 700; }
.discover-detail { font-size: 0.85rem; opacity: 0.9; margin-top: 0.2rem; }
.discover-detail i { margin-right: 0.4rem; width: 16px; text-align: center; }
.discover-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.discover-tag {
  background: rgba(255,255,255,0.15); backdrop-filter: blur(4px);
  padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.75rem;
}
.discover-actions { display: flex; justify-content: center; gap: 1.25rem; padding: 1.25rem; }
.action-btn {
  width: 60px; height: 60px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface);
  font-size: 1.3rem; cursor: pointer; transition: all 0.3s;
  display: flex; align-items: center; justify-content: center;
}
.action-btn.pass-btn { color: var(--text-secondary); }
.action-btn.pass-btn:hover { border-color: #888; color: #888; transform: scale(1.1); }
.action-btn.like-btn { color: var(--primary); border-color: var(--primary); }
.action-btn.like-btn:hover { background: var(--primary); color: #fff; transform: scale(1.1); }
.action-btn.super-btn { color: var(--secondary); border-color: var(--secondary); font-size: 1rem; width: 48px; height: 48px; }
.action-btn.super-btn:hover { background: var(--secondary); color: #fff; transform: scale(1.1); }
.discover-empty {
  text-align: center; padding: 4rem 2rem; color: var(--text-secondary);
}
.discover-empty i { font-size: 3rem; opacity: 0.3; margin-bottom: 1rem; display: block; }

/* ===== Matches ===== */
.matches-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 1rem; max-width: 700px; margin: 0 auto; }
.match-card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); cursor: pointer; transition: transform 0.3s;
}
.match-card:hover { transform: translateY(-3px); }
.match-card img { width: 100%; height: 180px; object-fit: cover; }
.match-card-info { padding: 0.75rem; }
.match-card-info h4 { font-size: 0.95rem; }
.match-card-info p { font-size: 0.75rem; color: var(--text-secondary); }
.match-badge {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 2px 8px; border-radius: 10px; font-size: 0.65rem; font-weight: 600;
}

/* ===== Profile ===== */
.profile-container { max-width: 600px; margin: 0 auto; }
.profile-header { text-align: center; margin-bottom: 2rem; }
.profile-avatar {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--primary); margin-bottom: 1rem;
}
.profile-avatar-placeholder {
  width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 1rem;
  background: rgba(201,81,91,0.1); display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--primary); border: 4px solid var(--border);
}
.profile-form { background: var(--surface); border-radius: var(--radius); padding: 2rem; border: 1px solid var(--border); }

/* ===== Alerts ===== */
.alert {
  padding: 0.75rem 1rem; border-radius: 10px; margin-bottom: 1rem;
  font-size: 0.9rem; display: none;
}
.alert-success { background: rgba(107,158,111,0.15); color: var(--accent); border: 1px solid rgba(107,158,111,0.3); }
.alert-error { background: rgba(201,81,91,0.1); color: var(--primary); border: 1px solid rgba(201,81,91,0.2); }

/* ===== Match Animation ===== */
.match-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85); z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.match-overlay.show { opacity: 1; pointer-events: auto; }
.match-title { color: var(--primary); font-size: 2.5rem; font-weight: 800; margin-bottom: 1.5rem; }
.match-photos { display: flex; gap: 1rem; margin-bottom: 2rem; }
.match-photos img {
  width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--primary);
}
.match-overlay .btn { margin-top: 1rem; }

/* ===== Checkbox Tags ===== */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
.checkbox-group label {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.7rem; border-radius: 20px; font-size: 0.8rem;
  background: var(--bg-alt); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s; user-select: none;
}
.checkbox-group label:hover { border-color: var(--primary-light); }
.checkbox-group input[type=checkbox] { display: none; }
.checkbox-group label:has(input:checked) {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.section-label {
  font-weight: 600; font-size: 0.95rem; margin: 1rem 0 0.3rem;
  color: var(--text); display: flex; align-items: center; gap: 0.4rem;
}
.section-label i { color: var(--primary); font-size: 0.85rem; }
.discover-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.discover-tag {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 12px;
  font-size: 0.7rem; font-weight: 500;
}
.discover-tag.trait { background: rgba(201,81,91,0.12); color: var(--primary); }
.discover-tag.sport { background: rgba(212,162,76,0.15); color: var(--secondary); }
.discover-tag.activity { background: rgba(107,158,111,0.15); color: var(--accent); }

/* ===== Photo Upload ===== */
.photo-upload-wrap { position: relative; display: inline-block; cursor: pointer; }
.photo-upload-wrap input[type=file] { display: none; }
.photo-upload-btn {
  position: absolute; bottom: 4px; right: 4px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff; border: 2px solid var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; cursor: pointer; transition: background 0.3s;
}
.photo-upload-btn:hover { background: var(--primary-dark); }

/* ===== Discover Filters ===== */
.discover-filters {
  display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center;
  margin-bottom: 1rem; max-width: 600px; margin-left: auto; margin-right: auto;
}
.discover-filters select, .discover-filters input {
  padding: 0.4rem 0.6rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 0.8rem;
  font-family: inherit;
}
.discover-filters .btn { padding: 0.4rem 1rem; font-size: 0.8rem; }

/* ===== Chat ===== */
.chat-container { max-width: 700px; margin: 0 auto; height: calc(100vh - 140px); display: flex; flex-direction: column; }
.chat-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem; background: var(--surface); border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border); border-bottom: none;
}
.chat-header img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-header h3 { font-size: 1rem; font-weight: 600; }
.chat-back { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 1.1rem; padding: 0.25rem; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  background: var(--bg-alt); border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0.5rem;
}
.chat-bubble {
  max-width: 75%; padding: 0.6rem 0.9rem; border-radius: 16px;
  font-size: 0.9rem; line-height: 1.4; word-wrap: break-word;
}
.chat-bubble.mine {
  align-self: flex-end; background: var(--primary); color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.theirs {
  align-self: flex-start; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-bottom-left-radius: 4px;
}
.chat-bubble .chat-time {
  display: block; font-size: 0.65rem; opacity: 0.6; margin-top: 2px; text-align: right;
}
.chat-input-bar {
  display: flex; gap: 0.5rem; padding: 0.75rem;
  background: var(--surface); border-radius: 0 0 var(--radius) var(--radius);
  border: 1px solid var(--border); border-top: none;
}
.chat-input-bar input {
  flex: 1; padding: 0.6rem 0.9rem; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg);
  font-size: 0.9rem; font-family: inherit; color: var(--text);
}
.chat-input-bar button {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none;
  cursor: pointer; font-size: 1rem; transition: background 0.3s;
  display: flex; align-items: center; justify-content: center;
}
.chat-input-bar button:hover { background: var(--primary-dark); }
.chat-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 0.9rem; opacity: 0.6;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-actions { display: none; position: absolute; top: 64px; left: 0; width: 100%; background: var(--surface); padding: 1rem; flex-direction: column; border-bottom: 1px solid var(--border); }
  .nav-actions.open { display: flex; }
  .nav-toggle { display: block; }
  .hero-content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .hero-text h1 { font-size: 2.2rem; }
  .hero-text p { margin: 0 auto 2rem; }
  .hero-stats { justify-content: center; }
  .hero-visual { order: -1; }
  .phone-mockup { width: 260px; }
  .mock-card img { height: 280px; }
  .steps-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .verse-quote p { font-size: 1.2rem; }
  .footer-content { flex-direction: column; text-align: center; gap: 1rem; }
  .app-sidebar { width: 100%; height: 60px; flex-direction: row; justify-content: space-around; position: fixed; bottom: 0; top: auto; border-right: none; border-top: 1px solid var(--border); }
  .app-main { margin-left: 0; padding-bottom: 80px; }
  .discover-photo { height: 400px; }
  .chat-container { height: calc(100vh - 200px); }
  .discover-filters { gap: 0.4rem; }
  .discover-filters select, .discover-filters input { font-size: 0.75rem; }
}
@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.8rem; }
  .section-header h2 { font-size: 1.6rem; }
  .discover-photo { height: 350px; }
  .auth-card { padding: 1.5rem; }
}
