/* ============================================
   JuaLive App Styles
   ============================================ */

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  background: rgba(13, 13, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.navbar-logo .logo-icon {
  font-size: 1.7rem;
}

.navbar-links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.navbar-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

@media (max-width: 768px) {
  .navbar-links .nav-text {
    display: none;
  }
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: var(--gradient-glow);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.1s forwards;
}

.hero h1 {
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.2s forwards;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.3s forwards;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.4s forwards;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-3xl);
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.6s forwards;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: var(--space-xs);
}

/* ── Features ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  border: 1px solid var(--border-card);
}

.feature-card h3 {
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: 0.9rem;
}

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  align-items: start;
}

.pricing-card {
  padding: var(--space-xl);
  text-align: center;
  position: relative;
}

.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.pricing-card.popular::before {
  content: 'TERLARIS';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-brand);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  letter-spacing: 0.05em;
}

.pricing-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.pricing-price {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.pricing-price .currency {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pricing-period {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  margin-bottom: var(--space-lg);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.pricing-features li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.pricing-features li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 700;
}

/* ── Section Headers ── */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-2xl) auto;
}

.section-header p {
  margin-top: var(--space-sm);
}

/* ── Footer ── */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* ── Bottom Nav (App Pages) ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 13, 18, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-sm) 0 calc(var(--space-sm) + env(safe-area-inset-bottom, 0px));
}

.bottom-nav-items {
  display: flex;
  justify-content: space-around;
  list-style: none;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-tertiary);
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
  border-radius: var(--radius-sm);
}

.bottom-nav-item .nav-icon {
  font-size: 1.3rem;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item.active {
  background: rgba(255, 107, 53, 0.08);
}

/* ── App Page Layout ── */
.app-page {
  padding-top: 80px;
  padding-bottom: 90px;
  min-height: 100vh;
}

.app-header {
  margin-bottom: var(--space-xl);
}

.app-header h1 {
  font-size: 1.75rem;
}

/* ── Output Box ── */
.output-box {
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  min-height: 200px;
  white-space: pre-wrap;
  font-size: 0.95rem;
  line-height: 1.8;
  position: relative;
}

.output-box.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-style: italic;
}

.output-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* ── Loading ── */
.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-card);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.loading-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ── Timer Specific ── */
.timer-display {
  font-family: var(--font-display);
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 900;
  text-align: center;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -2px;
}

.timer-tip-popup {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-brand);
  color: white;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1.2rem;
  animation: fadeInUp 0.4s ease, fadeIn 0.3s ease;
  box-shadow: var(--shadow-glow-strong);
  z-index: 200;
  text-align: center;
  max-width: 90%;
}

/* ── Teleprompter ── */
.teleprompter {
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  height: 300px;
  overflow-y: auto;
  font-size: 1.3rem;
  line-height: 2;
  scroll-behavior: smooth;
}

.teleprompter .current-line {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.5rem;
}

.teleprompter .past-line {
  color: var(--text-tertiary);
}

.teleprompter .future-line {
  color: var(--text-secondary);
}
