/* StorySmith Landing Page Styles */
/* Based on the StorySmith theme colors */

:root {
  --landing-bg: #050816;
  --landing-panel: rgba(5, 8, 22, 0.55);
  --landing-text: #f7f8fc;
  --landing-muted: #a9b3d4;
  --landing-primary: #39b3a6;
  --landing-accent: #f5b042;
}

.landing-container {
  background: var(--landing-bg);
  color: var(--landing-text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  min-height: 100vh;
  position: relative;
}

/* Header */
.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 5vw;
  background: linear-gradient(90deg, rgba(5, 8, 22, 0.8), rgba(5, 8, 22, 0));
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--landing-text);
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--landing-primary), var(--landing-accent));
  display: grid;
  place-items: center;
  color: #050816;
  font-size: 18px;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.landing-nav a {
  color: var(--landing-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.landing-nav a:hover {
  color: #fff;
}

.btn-header {
  padding: 8px 16px;
  background: var(--landing-text);
  color: var(--landing-bg);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}

.btn-header:hover {
  background: #e5e7eb;
}

.signin-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 60px;
}

/* Buttons */
.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn.primary {
  background: var(--landing-primary);
  color: #050816;
}

.btn.primary:hover {
  background: #2a9b90;
  transform: translateY(-1px);
}

.btn.secondary {
  background: rgba(247, 248, 252, 0.04);
  color: #fff;
  border: 1px solid rgba(247, 248, 252, 0.08);
}

.btn.secondary:hover {
  background: rgba(247, 248, 252, 0.08);
}

.btn.small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn.full-width {
  width: 100%;
  margin-top: 16px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  padding: 110px 5vw 70px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  background:
    linear-gradient(130deg, rgba(57, 179, 166, 0.08), rgba(5, 8, 22, 0)),
    url('https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=1800&q=60') right/cover no-repeat;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.05;
  margin-bottom: 14px;
  font-weight: 700;
}

.hero p {
  color: var(--landing-muted);
  max-width: 520px;
  font-size: 16px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 20px;
}

.hero-subtitle {
  margin-top: 18px;
  color: var(--landing-muted);
  font-size: 14px;
}

.hero-panel {
  background: rgba(5, 8, 22, 0.62);
  border: 1px solid rgba(247, 248, 252, 0.06);
  border-radius: 16px;
  padding: 18px 18px 28px;
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.hero-panel small {
  color: var(--landing-muted);
  font-size: 12px;
  display: block;
  margin-bottom: 12px;
}

.scene-snippet {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 13px;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 14px;
  white-space: pre-line;
  max-height: 260px;
  overflow-y: auto;
  color: var(--landing-text);
  font-family: inherit;
}

/* Sections */
.section {
  padding: 60px 5vw;
}

.section h2 {
  margin-bottom: 20px;
  font-size: 1.9rem;
  font-weight: 700;
}

.section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.muted {
  color: var(--landing-muted);
}

/* Worlds Grid */
.worlds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.world-card {
  background: linear-gradient(150deg, rgba(247, 248, 252, 0.05), rgba(5, 8, 22, 0));
  border: 1px solid rgba(247, 248, 252, 0.03);
  border-radius: 14px;
  padding: 18px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Steps Grid */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.step {
  background: rgba(247, 248, 252, 0.02);
  border: 1px solid rgba(247, 248, 252, 0.03);
  border-radius: 12px;
  padding: 18px;
}

/* Scene Demo */
.scene-demo {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(247, 248, 252, 0.04);
  border-radius: 14px;
  padding: 16px;
  margin-top: 24px;
}

.scene-demo pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  margin: 16px 0;
  color: var(--landing-text);
}

/* Footer */
.landing-footer {
  padding: 30px 5vw 50px;
  color: var(--landing-muted);
  text-align: center;
  font-size: 14px;
}

/* Sign In Modal + all modals (Upgrade, Add Chapter, Add Scene, etc.) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content,
.modal-container .modal-content {
  background: #050816;
  border: 1px solid rgba(247, 248, 252, 0.12);
  border-radius: 16px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  color: var(--landing-text);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--landing-muted);
  font-size: 28px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(247, 248, 252, 0.1);
  color: var(--landing-text);
}

.modal-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--landing-text);
  font-family: 'Inter', serif;
}

.social-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid rgba(247, 248, 252, 0.1);
  border-radius: 12px;
  background: rgba(247, 248, 252, 0.04);
  color: var(--landing-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.social-btn:hover {
  background: rgba(247, 248, 252, 0.08);
  border-color: rgba(247, 248, 252, 0.2);
}

.social-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.social-btn svg {
  flex-shrink: 0;
}

.social-btn.google-btn {
  background: rgba(247, 248, 252, 0.08);
  border: 1px solid rgba(247, 248, 252, 0.1);
  color: var(--landing-text);
}

.social-btn.google-btn:hover {
  background: rgba(247, 248, 252, 0.12);
  border-color: rgba(247, 248, 252, 0.2);
}

.social-btn.apple-btn {
  background: rgba(247, 248, 252, 0.04);
  border: 1px solid rgba(247, 248, 252, 0.1);
  color: var(--landing-text);
}

.social-btn.apple-btn:hover:not(:disabled) {
  background: rgba(247, 248, 252, 0.08);
}

.modal-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--landing-muted);
  font-size: 14px;
}

.modal-separator::before,
.modal-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(247, 248, 252, 0.1);
}

.modal-separator span {
  padding: 0 12px;
}

.form-group {
  margin-bottom: 16px;
}

/* Form inputs: same as Create account (auth) – light text on dark background for readability */
.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: rgba(247, 248, 252, 0.05);
  border: 1px solid rgba(247, 248, 252, 0.1);
  border-radius: 8px;
  color: var(--landing-text);
}

.form-input::placeholder {
  color: var(--landing-muted);
  opacity: 1;
}

.form-input:focus {
  outline: none;
  border-color: var(--landing-primary);
  background: rgba(247, 248, 252, 0.08);
}

.form-links {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 13px;
}

.form-links a {
  color: var(--landing-text);
  text-decoration: none;
  transition: color 0.2s;
}

.form-links a:hover {
  color: var(--landing-primary);
}

.error-message {
  background: rgba(228, 90, 90, 0.1);
  border: 1px solid rgba(228, 90, 90, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  color: #ff6b6b;
  font-size: 14px;
}

.btn-signin {
  width: 100%;
  padding: 14px;
  background: var(--landing-accent);
  color: #050816;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-signin:hover:not(:disabled) {
  background: #f0a62e;
  transform: translateY(-1px);
}

.btn-signin:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 990px) {
  .hero {
    grid-template-columns: 1fr;
  }
  
  .hero-panel {
    max-width: 480px;
  }
  
  .landing-header {
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .landing-nav {
    gap: 12px;
  }
  
  .landing-nav a {
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .social-login {
    grid-template-columns: 1fr;
  }
  
  .worlds,
  .steps {
    grid-template-columns: 1fr;
  }
}

