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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0a0a0a;
  color: #e1e4e8;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 200px;
  background: #0f0f0f;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  position: relative;
}

.sidebar[hidden] {
  display: none;
}

.sidebar.collapsed {
  width: 50px;
}

.sidebar-toggle {
  position: absolute;
  top: 1rem;
  right: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.sidebar-toggle:hover {
  background: #2a2a2a;
}

.toggle-icon {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 6px solid #a1a1aa;
}

.sidebar.collapsed .toggle-icon {
  border-right: none;
  border-left: 6px solid #a1a1aa;
}

.sidebar-nav {
  padding: 1rem 0;
  margin-top: 2rem;
}

.sidebar-nav-bottom {
  margin-top: auto;
  margin-bottom: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.token-display {
  cursor: default;
}

.token-display .nav-icon {
  color: #3fb950;
}

.token-display.plan-free .nav-icon {
  color: #da3633;
}

.token-count {
  font-size: 0.75rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #a1a1aa;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid #7c3aed;
}

.nav-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-icon-img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
}

.sidebar.collapsed .nav-label {
  display: none;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 0.75rem;
}

.app-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.trial-banner {
  width: 100%;
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, #7c3aed, #6d28d9);
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  z-index: 100;
}

.trial-banner a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
}

.trial-banner a:hover {
  color: #e6e6e6;
}

/* Main content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  background: radial-gradient(ellipse at top, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
              #0a0a0a;
}

/* Loading state */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem;
  color: #a1a1aa;
}

.loading-state[hidden] {
  display: none;
}

/* Landing Page */
.landing {
  width: 100%;
  max-width: 1200px;
  padding: 0 2rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 6rem 0 4rem;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 500;
  color: #7c3aed;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.1rem;
  color: #a1a1aa;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-note {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  transform: translateY(-1px);
}

.btn-glow {
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-glow:hover {
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #e1e4e8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.btn-ghost {
  background: transparent;
  color: #a1a1aa;
}

.btn-ghost:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}

.btn-danger:hover {
  background: #ef4444;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Screenshots Section */
.screenshots-section {
  padding: 2rem 0 4rem;
  overflow: hidden;
}

.screenshots-gallery {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.screenshot {
  width: 280px;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.screenshot:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.3);
}

/* Video Section */
.video-section {
  padding: 2rem 0 4rem;
  text-align: center;
}

.video-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(26, 26, 26, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.video-link:hover {
  background: rgba(26, 26, 26, 0.8);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
}

.video-play-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-play-icon svg {
  width: 18px;
  height: 18px;
  color: #ffffff;
  margin-left: 2px;
}

/* Features Section */
.features-section {
  padding: 4rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: rgba(26, 26, 26, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
}

.feature-card:hover {
  background: rgba(26, 26, 26, 0.8);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(109, 40, 217, 0.2) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon {
  width: 24px;
  height: 24px;
  color: #7c3aed;
}

.feature-title {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.feature-description {
  font-size: 0.875rem;
  color: #a1a1aa;
  line-height: 1.5;
  margin: 0;
}

/* Pricing Section */
.pricing-section {
  padding: 4rem 0;
  text-align: center;
}

.section-title {
  font-size: 2rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2.5rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.pricing-single {
  max-width: 400px;
  margin: 0 auto;
}

.pricing-card {
  background: rgba(26, 26, 26, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  text-align: left;
  position: relative;
  transition: all 0.2s ease;
}

.pricing-card:hover {
  background: rgba(26, 26, 26, 0.8);
}

.pricing-card.featured {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(109, 40, 217, 0.1) 100%);
  border-color: rgba(124, 58, 237, 0.3);
}

.featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 1rem;
  border-radius: 20px;
}

.pricing-header {
  margin-bottom: 1.5rem;
}

.pricing-tier {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.pricing-tagline {
  font-size: 0.875rem;
  color: #a1a1aa;
  margin: 0;
}

.pricing-price {
  margin-bottom: 1.5rem;
}

.price-amount {
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff;
}

.price-currency {
  font-size: 1rem;
  color: #a1a1aa;
  margin-left: 0.25rem;
}

.pricing-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pricing-features li {
  font-size: 0.9rem;
  color: #a1a1aa;
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.pricing-trial-note {
  font-size: 0.85rem;
  color: #a1a1aa;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Add-ons Section */
.addons-section {
  padding: 4rem 0;
  text-align: center;
}

.addon-card {
  background: rgba(26, 26, 26, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
  text-align: left;
  transition: all 0.2s ease;
}

.addon-card:hover {
  background: rgba(26, 26, 26, 0.8);
  border-color: rgba(124, 58, 237, 0.3);
}

.addon-icon-wrapper {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(109, 40, 217, 0.2) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.addon-icon {
  width: 28px;
  height: 28px;
  color: #7c3aed;
}

.addon-content {
  flex: 1;
}

.addon-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.addon-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.addon-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.15);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.addon-description {
  font-size: 0.95rem;
  color: #a1a1aa;
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
}

.addon-price {
  font-size: 0.95rem;
  color: #a1a1aa;
  margin: 0 0 1rem 0;
}

.addon-price-amount {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.addon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9rem;
  color: #7c3aed;
  text-decoration: none;
  transition: color 0.2s ease;
}

.addon-link:hover {
  color: #8b5cf6;
}

.link-icon {
  width: 14px;
  height: 14px;
}

@media (max-width: 600px) {
  .addon-card {
    flex-direction: column;
    text-align: center;
  }

  .addon-icon-wrapper {
    margin: 0 auto;
  }

  .addon-header {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Landing Footer */
.landing-footer {
  padding: 3rem 0;
  text-align: center;
}

.landing-footer p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.landing-footer a {
  color: #7c3aed;
  text-decoration: none;
}

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

/* Dashboard (Signed In) */
.dashboard {
  width: 100%;
  max-width: 600px;
  padding: 3rem 1.5rem;
}

/* Upgrade Overlay */
.upgrade-overlay {
  text-align: center;
  padding: 2rem 0;
}

.upgrade-overlay[hidden] {
  display: none;
}

#dashboard-content[hidden] {
  display: none;
}

.upgrade-card {
  background: rgba(26, 26, 26, 0.5);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 450px;
  margin: 0 auto;
}

.upgrade-icon-wrapper {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(109, 40, 217, 0.2) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upgrade-icon {
  width: 32px;
  height: 32px;
  color: #7c3aed;
}

.upgrade-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.upgrade-description {
  font-size: 1rem;
  color: #a1a1aa;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.upgrade-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.upgrade-feature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #e1e4e8;
}

.upgrade-feature svg {
  width: 18px;
  height: 18px;
  color: #3fb950;
  flex-shrink: 0;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.upgrade-note {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 1rem;
}

.upgrade-actions {
  margin-top: 2rem;
}

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #ffffff;
}

.create-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.create-section h3 {
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 1rem;
}

.dashboard-help {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.help-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Form Elements */
.form-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.form-row input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(26, 26, 26, 0.5);
  color: #ffffff;
  font-size: 0.95rem;
  font-family: inherit;
}

.form-row input::placeholder {
  color: #6b7280;
}

.form-row input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Site Cards */
#sites-list {
  margin-bottom: 1rem;
}

.site-card {
  padding: 1rem 1.25rem;
  background: rgba(26, 26, 26, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.deploying-card {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.3);
}

.deploying-card .site-info {
  justify-content: flex-start;
}

.site-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-name {
  font-weight: 500;
  color: #ffffff;
}

.site-actions {
  display: flex;
  gap: 0.5rem;
}

.site-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.productions-list {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.production-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
  font-size: 0.9rem;
}

.production-name {
  color: #e1e4e8;
}

.production-lines {
  font-size: 0.8rem;
}

/* Utility Classes */
.muted {
  color: #6b7280;
}

.empty-state {
  text-align: center;
  color: #6b7280;
  padding: 2rem;
}

.error-text {
  color: #ef4444;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(124, 58, 237, 0.2);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .landing {
    padding: 0 1rem;
  }

  .hero {
    padding: 4rem 0 3rem;
  }

  .screenshot {
    width: 100%;
    max-width: 320px;
  }
}
