:root {
  --bg-primary: #07050d;
  --bg-secondary: #0d0a18;
  --bg-glass: rgba(13, 10, 22, 0.45);
  --border-glass: rgba(255, 255, 255, 0.08);
  
  /* Harmonious Color System */
  --color-sync: #10b981; /* Emerald */
  --color-sync-glow: rgba(16, 185, 129, 0.2);
  --color-friction: #f43f5e; /* Rose/Coral */
  --color-friction-glow: rgba(244, 63, 94, 0.25);
  
  --color-accent: #a855f7; /* Purple */
  --color-accent-alt: #ec4899; /* Pink */
  
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;
}

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

/* Custom modern scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid transparent;
  background-clip: padding-box;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(168, 85, 247, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Base Layout */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-alt) 100%);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.35);
  transition: transform 0.3s ease;
}
.brand-section:hover .logo-icon {
  transform: rotate(6deg) scale(1.05);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  opacity: 0.85;
}

/* Glass Card */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border-glass);
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 
    0 12px 40px 0 rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02) 50%, rgba(168, 85, 247, 0.12) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-card:hover {
  border-color: rgba(168, 85, 247, 0.25);
  box-shadow: 
    0 16px 48px 0 rgba(0, 0, 0, 0.6),
    0 0 30px rgba(168, 85, 247, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Forms & Inputs */
.input-group {
  margin-bottom: 1.5rem;
}

.input-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.input-text {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-glass);
  border-radius: 0.85rem;
  padding: 0.85rem 1.1rem;
  color: white;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.input-text:focus {
  border-color: var(--color-accent);
  box-shadow: 
    0 0 15px rgba(168, 85, 247, 0.15),
    inset 0 2px 4px rgba(0,0,0,0.2);
  background: rgba(0, 0, 0, 0.55);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-alt) 100%);
  border: none;
  border-radius: 0.85rem;
  color: white;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.2);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: 0.5s;
}
.btn-primary:hover::after {
  left: 100%;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(168, 85, 247, 0.4),
    0 0 15px rgba(236, 72, 153, 0.2);
}

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

/* Pricing Badges & Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.price-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border-glass);
  border-radius: 1.25rem;
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.3s ease;
}

.price-card.featured {
  border-color: var(--color-accent);
  background: rgba(168, 85, 247, 0.02);
}

.price-card.locked {
  opacity: 0.65;
  position: relative;
  background: rgba(0, 0, 0, 0.3);
}

.lock-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Play Area */
.play-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .play-layout {
    grid-template-columns: 1fr;
  }
}

.question-card {
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.question-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-btn {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  border-radius: 0.85rem;
  color: var(--text-primary);
  padding: 1.15rem 1.4rem;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.option-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--color-accent);
  transform: translateX(6px);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.option-btn.selected {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.option-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Status Panels */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-dot.active {
  background: var(--color-sync);
  box-shadow: 0 0 8px var(--color-sync);
  animation: pulse 1.5s infinite;
}

/* Telemetry Section */
.telemetry-container {
  background: rgba(0, 0, 0, 0.55);
  border-radius: 0.75rem;
  border: 1px solid var(--border-glass);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  max-height: 180px;
  overflow-y: auto;
}

.telemetry-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  color: var(--text-muted);
}

/* Sync/Friction Outcome */
.outcome-banner {
  padding: 1.25rem;
  border-radius: 0.75rem;
  margin-top: 1.5rem;
  animation: slideUp 0.3s ease;
}

.outcome-banner.sync {
  background: var(--color-sync-glow);
  border: 1px solid var(--color-sync);
  color: #a7f3d0;
}

.outcome-banner.friction {
  background: var(--color-friction-glow);
  border: 1px solid var(--color-friction);
  color: #fecdd3;
}

/* Keyframes */
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

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

/* Copy Link Area */
.copy-area {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.copy-input {
  flex: 1;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border-glass);
  border-radius: 0.5rem;
  color: white;
  padding: 0.5rem;
  font-size: 0.75rem;
  outline: none;
  font-family: var(--font-mono);
}

.copy-btn {
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0 1rem;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: bold;
}
