/**
 * Refined Landing Page Styles for led.run
 * Design: Modern Dark UI with Neon Accents
 */

:root {
  --bg-body: #030303;
  --bg-surface: #0e0e10;
  --bg-surface-hover: #161618;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  
  --primary: #00e676; /* Bright Green */
  --primary-glow: rgba(0, 230, 118, 0.4);
  
  --text-main: #ffffff;
  --text-muted: #888899;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
  
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

/* Landing Layout */
.landing {
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg-body);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 230, 118, 0.08) 0%, transparent 40%),
    linear-gradient(to bottom, transparent, var(--bg-body));
  color: var(--text-main);
  font-family: var(--font-sans);
  padding: 0 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header & Hero */
.landing-hero {
  max-width: 800px;
  width: 100%;
  text-align: center;
  margin-top: 8vh;
  margin-bottom: 4rem;
  animation: fadeIn 0.8s ease-out;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.hero-brand-icon {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-glow);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  background: linear-gradient(to bottom right, #fff 30%, #aaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

/* Input Section */
.landing-content {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.mode-switcher {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem;
  border-radius: 100px;
  border: 1px solid var(--border-light);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.mode-tab {
  padding: 0.6rem 1.5rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  background: transparent;
}

.mode-tab.active {
  background: var(--text-main);
  color: #000;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.mode-panel {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.mode-panel.active {
  display: block;
}

/* Simple Mode */
.simple-mode-container {
  max-width: 600px;
  margin: 0 auto;
}

.input-group {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.1), 0 20px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(-4px);
}

/* Builder Mode - Studio Layout */
.builder-canvas {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 3rem;
  perspective: 1000px;
}

.preview-card {
  background: #000;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  aspect-ratio: 16 / 9;
  position: relative;
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 40px rgba(0, 230, 118, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.preview-card:hover {
  transform: translateY(-5px) scale(1.01);
}

#builder-live-preview {
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}

.preview-label {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  z-index: 10;
  border: 1px solid rgba(0, 230, 118, 0.2);
}

/* Property Grid */
.builder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.prop-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.3s ease;
}

.prop-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.prop-card-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prop-card-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.prop-card-highlight {
  grid-column: 1 / -1;
  background: rgba(0, 230, 118, 0.03);
  border-color: rgba(0, 230, 118, 0.15);
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.prop-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.prop-row-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.prop-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prop-label-row span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.prop-label-row .val {
  font-family: var(--font-mono);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.8rem;
}

.prop-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Builder Controls Refinement */
.builder-text-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s;
}

.builder-text-input:focus {
  border-color: var(--primary);
  background: rgba(0, 230, 118, 0.02);
}

.builder-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  min-width: 120px;
}

.builder-color-input {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: none;
  cursor: pointer;
}

.builder-range {
  width: 100%;
  accent-color: var(--primary);
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
}

.builder-url-box {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.builder-url-preview {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  word-break: break-all;
}

.builder-actions {
  display: flex;
  gap: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: #000;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.8rem;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
}

/* Original Styles to keep/adjust */
.input-prefix {
  padding-left: 1rem;
  padding-right: 0.25rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 1rem;
  user-select: none;
}

.url-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1rem;
  padding: 0.75rem 0;
  outline: none;
  min-width: 0;
}

.input-actions {
  display: flex;
  gap: 0.375rem;
  align-items: center;
}

.btn-random {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-random:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 230, 118, 0.08);
}

.btn-random:active {
  transform: scale(0.92);
}

.btn-random svg {
  display: block;
}

.btn-launch {
  background: var(--text-main);
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.1s, background-color 0.2s;
}

.btn-launch:hover {
  background-color: var(--primary);
  transform: scale(1.02);
}

.btn-launch:active {
  transform: scale(0.98);
}

/* Responsive Adjustments */
@media (max-width: 900px) {
  .prop-card-highlight {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2.75rem;
  }
  
  .builder-canvas {
    margin-bottom: 2rem;
  }
  
  .preview-card {
    border-radius: 16px;
  }
  
  .preview-label {
    top: 1rem;
    left: 1rem;
    font-size: 0.6rem;
  }

  .builder-grid {
    grid-template-columns: 1fr;
  }
  
  .input-group {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .input-prefix {
    padding-left: 0.5rem;
    font-size: 0.875rem;
  }
  
  .url-input {
    padding: 0.5rem;
    text-align: center;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
  }
  
  .input-actions {
    width: 100%;
  }

  .btn-launch {
    flex: 1;
  }
}

/* Range Styling Refinement */
.builder-range {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

.builder-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
  transition: all 0.2s;
}

.builder-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.5);
}

/* Select Styling Refinement */
.builder-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  padding-right: 32px;
}

/* Prop Card Entrance Animation */
.prop-card {
  animation: slideUp 0.5s cubic-bezier(0.23, 1, 0.32, 1) backwards;
}

.prop-card:nth-child(1) { animation-delay: 0.1s; }
.prop-card:nth-child(2) { animation-delay: 0.15s; }
.prop-card:nth-child(3) { animation-delay: 0.2s; }
.prop-card:nth-child(4) { animation-delay: 0.25s; }
.prop-card:nth-child(5) { animation-delay: 0.3s; }
.prop-card:nth-child(6) { animation-delay: 0.35s; }

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

/* Original Styles to keep/adjust */
.landing-footer {
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  width: 100%;
  max-width: 1000px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Grid Sections */
.section-title {
  width: 100%;
  max-width: 1000px;
  margin: 3rem auto 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.preset-card {
  text-decoration: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.preset-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.preset-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.preset-icon {
  font-size: 1.75rem;
}

.preset-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.preset-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.preset-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Footer */
.landing-footer {
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  width: 100%;
  max-width: 1000px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

/* Language switcher */
.footer-lang {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  font-size: 0.8rem;
}

.footer-lang-label {
  color: var(--text-muted);
}

.footer-lang-sep {
  color: rgba(255, 255, 255, 0.15);
}

.footer-lang-current {
  color: var(--primary);
  font-weight: 600;
}

.footer-lang-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.builder-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.builder-toggle input {
  display: none;
}

.builder-toggle-track {
  width: 40px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  position: relative;
  transition: background 0.3s;
}

.builder-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}

.builder-toggle input:checked + .builder-toggle-track {
  background: var(--primary);
}

.builder-toggle input:checked + .builder-toggle-track::after {
  transform: translateX(20px);
}