/* Design System & Reset */
:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #a855f7;
  --secondary-hover: #9333ea;
  --bg-color: #0b0f19;
  --card-bg: rgba(20, 28, 47, 0.65);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(99, 102, 241, 0.4);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --glow-shadow: 0 0 40px -10px rgba(99, 102, 241, 0.15);
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background Gradients Glows */
body::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -2;
  pointer-events: none;
}

body::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -2;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

button, input, textarea {
  font-family: inherit;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 1rem 2rem;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-text {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 40%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  font-size: 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

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

.btn-nav-admin {
  border: 1px solid var(--border-color);
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  font-weight: 500;
  font-size: 0.9rem;
}

.btn-nav-admin:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  color: #fff;
}

/* Page Layouts */
.page-content {
  margin-top: 5rem;
  min-height: calc(100vh - 5rem - 8rem); /* viewport minus header and footer */
}

/* Landing Page Elements */
.hero-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  font-family: var(--font-title);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  max-width: 900px;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #ffffff, #e2e8f0, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 750px;
  margin-bottom: 3rem;
  font-weight: 400;
}

/* Unified App Showcase */
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  width: 100%;
  max-width: 1100px;
  margin-bottom: 5rem;
}

.app-card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2.5rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
  box-shadow: var(--card-shadow);
}

.app-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--glow-shadow);
}

.app-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
}

.app-card.seeker .app-badge {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.app-card.owner .app-badge {
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
}

.app-name {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.app-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.app-features-list {
  list-style: none;
  margin-bottom: 2.5rem;
}

.app-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.app-feature-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.download-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.badge-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  transition: all 0.2s ease;
}

.badge-btn:hover {
  background: white;
  color: var(--bg-color);
  border-color: white;
  transform: translateY(-2px);
}

.badge-btn svg {
  width: 20px;
  height: 20px;
}

/* Feature Grid */
.features-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
  text-align: center;
}

.section-title {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 3.5rem auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  width: 100%;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  text-align: left;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.feature-icon-wrapper {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-card:nth-child(2n) .feature-icon-wrapper {
  background: rgba(168, 85, 247, 0.1);
  color: var(--secondary);
}

.feature-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Legal Documents Structure */
.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.legal-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--card-shadow);
}

.legal-content h1 {
  font-family: var(--font-title);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.legal-content h2 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  margin: 2rem 0 1rem 0;
  color: #fff;
}

.legal-content h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem 0;
}

.legal-content p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.legal-content ul {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

/* Admin Dashboard Portal */
.admin-login-container {
  max-width: 420px;
  margin: 6rem auto;
  padding: 0 1.5rem;
}

.admin-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
}

.admin-header {
  text-align: center;
  margin-bottom: 2rem;
}

.admin-header h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.admin-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input, .form-textarea {
  width: 100%;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: white;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

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

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

/* Admin Panel Logged In Layout */
.admin-dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.admin-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.admin-top-bar h1 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
}

.admin-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.03);
  color: white;
}

.admin-main-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tab-btn {
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: white;
}

.tab-btn.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  font-weight: 600;
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
}

.admin-content-pane {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
}

.pane-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.feature-edit-card {
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.01);
}

/* Footer Section */
footer {
  border-top: 1px solid var(--border-color);
  padding: 4rem 2rem;
  background: rgba(11, 15, 25, 0.5);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-link:hover {
  color: var(--text-primary);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.8rem;
  }
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .admin-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}
