/* ==========================================================================
   UniTV Web Store — Modern Dark Theme & Glassmorphism Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  --bg-main: #0a0b10;
  --bg-surface: #11131f;
  --bg-surface-elevated: #181b2c;
  --bg-glass: rgba(17, 19, 31, 0.75);
  --bg-glass-card: rgba(24, 27, 44, 0.65);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(124, 77, 255, 0.4);

  --primary: #7c4dff;
  --primary-glow: rgba(124, 77, 255, 0.35);
  --primary-hover: #9366ff;
  --secondary: #00e5ff;
  --secondary-glow: rgba(0, 229, 255, 0.3);
  --accent-gold: #ffb300;
  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.3);
  --accent-red: #ef4444;

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px var(--primary-glow);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(124, 77, 255, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(0, 229, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, .brand-font {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 1rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.logo-badge {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  box-shadow: var(--shadow-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-link:hover, .nav-link.active {
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-btn {
  position: relative;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.cart-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.cart-badge {
  background: var(--accent-green);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #5e2de0 100%);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #703ff3 100%);
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--primary-glow);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-green-glow);
}

.btn-success:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-green-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

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

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(124, 77, 255, 0.15);
  border: 1px solid rgba(124, 77, 255, 0.3);
  color: #c4b5fd;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(124, 77, 255, 0.2); }
  50% { box-shadow: 0 0 25px rgba(124, 77, 255, 0.5); }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.text-gradient {
  background: linear-gradient(135deg, #fff 30%, #a78bfa 70%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.hero-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}

.hero-badge-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Pricing Cards
   ========================================================================== */
.pricing-section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 2.3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

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

.pricing-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 77, 255, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 25px var(--primary-glow);
}

.pricing-card.popular {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(30, 27, 58, 0.85) 0%, rgba(18, 16, 38, 0.85) 100%);
  box-shadow: var(--shadow-glow);
}

.badge-popular {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.35rem 1.2rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.plan-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.plan-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.plan-price-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  margin: 1rem 0;
}

.plan-currency {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.plan-price {
  font-size: 3.2rem;
  font-weight: 900;
  color: #fff;
}

.plan-period {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.stock-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-top: 0.5rem;
}

.stock-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
}

.plan-features {
  list-style: none;
  margin: 1.5rem 0 2rem;
  flex-grow: 1;
}

.plan-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.plan-feature-item svg {
  color: var(--accent-green);
  flex-shrink: 0;
}

.qty-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  margin-bottom: 1.2rem;
}

.qty-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

.qty-val {
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 25px;
  text-align: center;
}

/* ==========================================================================
   Features & How it Works
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.step-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
}

.step-number {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow-glow);
}

.step-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ==========================================================================
   Cart Drawer / Modal
   ========================================================================== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-glass);
  z-index: 2000;
  box-shadow: -10px 0 40px rgba(0,0,0,0.8);
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  right: 0;
}

.cart-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-body {
  padding: 1.5rem;
  flex-grow: 1;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid var(--border-glass);
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-glass);
  background: var(--bg-surface);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

/* ==========================================================================
   Chat IA Widget
   ========================================================================== */
.chat-widget-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1500;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  box-shadow: 0 8px 30px rgba(124, 77, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: var(--transition);
}

.chat-widget-btn:hover {
  transform: scale(1.08);
}

.chat-box {
  position: fixed;
  bottom: 95px;
  right: 25px;
  width: 360px;
  max-width: calc(100vw - 50px);
  height: 480px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 1500;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.chat-box.open {
  display: flex;
}

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

.chat-box-header {
  padding: 1rem 1.25rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.4;
}

.chat-msg.bot {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: #fff;
  align-self: flex-start;
}

.chat-msg.user {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
}

.chat-input-area {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-glass);
  display: flex;
  gap: 0.5rem;
  background: var(--bg-surface);
}

.chat-input {
  flex-grow: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-full);
  outline: none;
  font-size: 0.9rem;
}

.chat-send-btn {
  background: var(--primary);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.2);
}

/* ==========================================================================
   Code Display Box
   ========================================================================== */
.code-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px dashed var(--accent-green);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1rem 0;
}

.code-value {
  font-family: monospace;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent-green);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.3rem;
  }
  .nav-links {
    display: none;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}
