:root {
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --error: #ef4444;
  --success: #10b981;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Nav */
.navbar {
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}

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

.logo {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

/* Hero */
.hero {
  padding: 6rem 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(139, 92, 246, 0.1);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero .tagline {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
}

/* Download State styling */
.download-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.download-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.download-btn:hover:not(:disabled) {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.download-btn.locked {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.download-btn.locked:hover {
  background-color: #334155;
}

.download-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Auth Modal Styling */
.modal {
  display: none; 
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--text-main);
}

.auth-form-container h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.auth-form-container p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.input-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.input-group label {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.input-field {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field i {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
}

.input-field input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background-color: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

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

.submit-btn {
  width: 100%;
  padding: 0.875rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.submit-btn:hover {
  background-color: var(--primary-hover);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}

.auth-error.visible {
  display: block;
}

/* User State Container */
.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-email {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.logout-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
}

.login-trigger-btn {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}
.login-trigger-btn:hover {
  border-color: var(--text-muted);
}

/* Base Features */
.section {
  padding: 5rem 2rem;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
}

.feature-showcase {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.feature-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  background-color: var(--bg-card);
  padding: 3rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
}

.feature-item:nth-child(even) .feature-content { order: 2; }
.feature-item:nth-child(even) .feature-screenshot { order: 1; }

.feature-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}
.feature-content h3 i { margin-right: 0.5rem; color: var(--primary); }
.feature-content p { color: var(--text-muted); }

.feature-image {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.footer {
  text-align: center;
  padding: 4rem 2rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .feature-item {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }
  .feature-item:nth-child(even) .feature-content { order: 1; }
  .feature-item:nth-child(even) .feature-screenshot { order: 2; }
  .hero h1 { font-size: 2.25rem; }
}
