/* ==========================================================================
   Huxley PickerWheel - Nubel Design System (nubel.co.uk/huxley)
   ========================================================================== */

:root {
  /* Nubel Brand Palette */
  --primary: #4f46e5;       /* Vibrant Indigo */
  --primary-hover: #4338ca;
  --primary-light: rgba(79, 70, 229, 0.1);
  --secondary: #10b981;     /* Emerald Green */
  --secondary-hover: #059669;
  --secondary-light: rgba(16, 185, 129, 0.1);
  --accent: #f97316;        /* Warm Coral */
  --accent-light: rgba(249, 115, 22, 0.1);

  /* Backgrounds & Cards */
  --bg-dark: #0b0f19;       /* Deep Slate */
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-nav: rgba(11, 15, 25, 0.85);

  --border-light: rgba(255, 255, 255, 0.1);
  --border-color: rgba(255, 255, 255, 0.12);
  --border-focus: #4f46e5;

  --text-primary: #f8fafc;  /* Slate-50 */
  --text-secondary: #cbd5e1;/* Slate-300 */
  --text-muted: #94a3b8;    /* Slate-400 */

  /* Gradients */
  --gradient-shine: linear-gradient(120deg, #4f46e5 0%, #10b981 40%, #f97316 60%, #4f46e5 100%);
  --spin-gradient: linear-gradient(135deg, #4f46e5 0%, #10b981 50%, #f97316 100%);
  --spin-shadow: 0 8px 25px rgba(79, 70, 229, 0.45);

  --danger-color: #ef4444;
  --danger-hover: #dc2626;

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-main: var(--font-body);
  --font-title: var(--font-display);

  /* Constants */
  --header-height: 72px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-card: 0 15px 35px rgba(0, 0, 0, 0.6);
  --backdrop-blur: blur(16px);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Nubel SaaS Dot Grid Background */
body {
  background-image: radial-gradient(rgba(79, 70, 229, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
}

.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 20% 20%, rgba(79, 70, 229, 0.12) 0%, transparent 40%),
              radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 40%);
}

.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* Header Navbar */
.app-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: var(--bg-nav);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nubel-brand-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.huxley-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.logo-text h1 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.logo-text h1 span {
  color: var(--secondary);
}

.by-nubel-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-left: 6px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  margin-right: 1.5rem;
}

/* Gradient Shine Heading Effect */
.gradient-shine {
  background: var(--gradient-shine);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shineFlow 6s linear infinite;
  display: inline-block;
}

@keyframes shineFlow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Main Layout Grid */
.main-content {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* Buttons (Nubel Style) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  outline: none;
  user-select: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
  color: white;
}

.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

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

.btn-danger-outline {
  background: transparent;
  color: var(--danger-color);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.15);
}

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

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

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--secondary);
  border-color: var(--secondary);
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 1.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.6);
}

.app-footer a {
  color: var(--secondary);
  text-decoration: none;
}

/* Mobile Navigation Dropdown Backdrop */
.menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.menu-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-dropdown {
  display: none;
}

.mobile-actions-section {
  display: none;
}

.menu-toggle-btn {
  display: none; /* hidden on desktop */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .menu-toggle-btn {
    display: flex;
  }

  .header-nav-links {
    display: none;
  }

  .header-actions #btn-share,
  .header-actions #btn-embed {
    display: none !important;
  }

  .mobile-nav-dropdown {
    display: none; /* hidden by default */
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 150;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  }

  .mobile-nav-dropdown.active {
    display: flex;
  }

  .mobile-nav-dropdown .btn {
    width: 100%;
    justify-content: flex-start;
  }

  .mobile-actions-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    width: 100%;
    margin-top: 1rem;
  }
}

@media (max-width: 768px) {
  .app-header {
    height: auto;
    min-height: var(--header-height);
    padding: 0.6rem 1rem;
  }
  
  .logo-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .huxley-logo-img {
    height: 22px;
  }

  .logo-text h1 {
    font-size: 1.1rem;
  }
}

@media (max-width: 600px) {
  .header-actions .btn .btn-text {
    display: none;
  }

  .header-actions .btn {
    padding: 0.65rem;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
  }
}
