/* 
   WINK GO Core Stylesheet - 1-to-1 Light Theme Recreation
   Premium, clean layout with high-contrast typography, pill buttons, and canvas particle system
*/

/* --- Google Fonts Import --- */
@import url('https://fonts.geekzu.org/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* --- Design Tokens (Light Theme) --- */
:root {
  /* Colors */
  --bg-primary: #fcfcfd;
  --bg-secondary: #f8f9fa;
  --bg-white: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.6);
  --border-glass: rgba(234, 236, 240, 0.8);
  --border-glass-hover: rgba(208, 213, 221, 0.8);

  --accent-primary: #7c4dff;     /* Royal Purple */
  --accent-secondary: #3b82f6;   /* Electric Blue */
  --accent-success: #12b76a;     /* Success Green */

  --text-primary: #090b0f;       /* Deep slate black */
  --text-secondary: #475467;     /* Slate gray for body */
  --text-muted: #667085;
  --text-dark: #98a2b3;

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Transition Curves */
  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base Reset --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow: hidden;
  height: 100%;
}

body {
  position: relative;
  height: 100%;
  line-height: 1.6;
  background: radial-gradient(circle at 50% 0%, #ffffff 0%, #fafafd 50%, #f4f5f8 100%);
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.015;
  z-index: 1000;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Subtle Background Grid --- */
.bg-grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  pointer-events: none;
  opacity: 0.25;
  background-image: 
    radial-gradient(circle at 1px 1px, #d0d5dd 1px, transparent 0);
  background-size: 32px 32px;
}

/* --- Background Pastel Glows (Subtle Light Orbs) --- */
.bg-ambience {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
}

.orb-purple {
  background: var(--accent-primary);
  width: 40vw;
  height: 40vw;
  top: -10vw;
  right: -5vw;
  animation: drift-orb 20s ease-in-out infinite alternate;
}

.orb-cyan {
  background: var(--accent-secondary);
  width: 35vw;
  height: 35vw;
  bottom: -10vw;
  left: -5vw;
  animation: drift-orb 25s ease-in-out infinite alternate-reverse;
}

@keyframes drift-orb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-10%, 8%) scale(1.1); }
  100% { transform: translate(5%, -5%) scale(0.95); }
}

/* --- Layout Structures --- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2.5rem;
  width: 100%;
}

/* --- Navigation Bar --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: all 0.4s var(--transition-smooth);
}

header.scrolled {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.8rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.01);
}

header:not(.scrolled) {
  padding: 1.8rem 0;
}

.nav-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 80px; /* Expand to screen edges */
  transition: padding 0.3s var(--transition-smooth);
}

@media (max-width: 992px) {
  .nav-container {
    padding: 0 40px;
  }
}

@media (max-width: 576px) {
  .nav-container {
    padding: 0 24px;
  }
}

/* Logo Alignment */
.logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-block;
}

.logo-svg {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.25s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links i {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.25s;
}

.nav-links a:hover i {
  transform: translateY(1px);
}

/* --- Pill Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.8rem;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
}

.btn-black {
  background-color: #0f1115;
  color: var(--bg-white);
  border: 1px solid #0f1115;
  box-shadow: 0 4px 15px rgba(15, 17, 21, 0.15);
}

.btn-black:hover {
  background-color: #1f2229;
  border-color: #1f2229;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 17, 21, 0.25);
}

.btn-gray {
  background-color: #f2f4f7;
  color: #344054;
  border: 1px solid #f2f4f7;
}

.btn-gray:hover {
  background-color: #eaecf0;
  border-color: #eaecf0;
  transform: translateY(-2px);
}

/* --- Hero Section (Centered Layout) --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding-top: 8rem;
  padding-bottom: 4rem;
  z-index: 10;
}

.hero-content {
  text-align: center;
  max-width: 1100px; /* Increased from 800px to ensure the two-line heading fits without wrapping */
  position: relative;
  z-index: 5;
}

/* Small central badge logo */
.hero-logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.hero-logo-badge .logo-svg {
  width: 22px;
  height: 22px;
}

/* Main huge heading matching image font layout */
.hero h1 {
  font-family: var(--font-display); /* Use Outfit display font for wider, geometric round characters */
  font-size: 6.8rem; /* Further enlarged for maximum visual impact */
  line-height: 1.0; /* Keep line height extremely tight */
  font-weight: 700; /* Bold weight for a solid, premium feel */
  letter-spacing: -0.025em; /* Slightly wider tracking for the geometric font to breathe, yet tight and cohesive */
  color: #000000;
  margin-bottom: 2rem;
}

/* Typewriter Cursor */
.typewriter-cursor {
  display: inline-block;
  margin-left: 4px;
  font-weight: 300;
  color: var(--accent-primary); /* Blinks with the purple accent color for premium feel */
  animation: blink-cursor 0.9s step-end infinite;
}

@keyframes blink-cursor {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.8rem auto;
  opacity: 0; /* Hidden initially, typed by typewriter JS */
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0; /* Managed dynamically in JS after typewriter finishes */
  transform: translateY(15px);
  transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.hero-actions.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Keyframes for text reveals */
@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- 3D Three.js Particle Canvas Container --- */
.canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

#vortexCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.95;
  pointer-events: none;
}

/* --- Dropdown Menus --- */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  width: 220px;
  background-color: var(--bg-white);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 0.6rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  z-index: 100;
  transition: transform 0.3s var(--transition-smooth), 
              opacity 0.3s ease, 
              visibility 0.3s;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-align: left;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.dropdown-item i {
  font-size: 1.1rem;
  width: 16px;
  text-align: center;
  color: var(--text-muted);
  transition: color 0.2s;
}

.dropdown-item:hover i {
  color: var(--accent-secondary);
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 4.8rem;
    line-height: 1.02;
    letter-spacing: -0.025em;
  }
  
  #vortexCanvas {
    width: 90vw;
    height: 60vh;
    top: auto;
    bottom: -10%;
    right: -10%;
    opacity: 0.6;
  }

  .nav-links {
    display: none; /* Hide for cleaner header on mobile */
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 3.6rem;
    line-height: 1.03;
    letter-spacing: -0.025em;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.8rem; /* Scale down on small mobile screens to keep it strictly on 2 lines */
    line-height: 1.05;
    letter-spacing: -0.02em;
  }
}

/* --- Registration Code Modal (Premium Dark Glassmorphism) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 4, 10, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  position: relative;
  width: 90%;
  max-width: 480px;
  background: rgba(10, 10, 20, 0.88);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 28px;
  padding: 2.75rem 2.5rem 2rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 40px 80px rgba(0, 0, 0, 0.7),
    0 0 100px rgba(124, 77, 255, 0.07);
  transform: scale(0.9) translateY(24px);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  overflow: hidden;
}

/* Animated shimmer top border */
.modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    #3b82f6 30%,
    #7c4dff 55%,
    #a855f7 75%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer-top 3s linear infinite;
}

@keyframes shimmer-top {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* Subtle ambient glow in bottom corner */
.modal-card::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(124, 77, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.modal-overlay.show .modal-card {
  transform: scale(1) translateY(0);
}

/* Close button */
.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: all 0.25s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  transform: rotate(90deg) scale(1.05);
}

/* Icon with glow pulse */
.modal-icon-container {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 66px;
  height: 66px;
  border-radius: 22px;
  background: linear-gradient(135deg, #3b82f6 0%, #7c4dff 60%, #a855f7 100%);
  color: #fff;
  font-size: 1.65rem;
  margin-bottom: 1.5rem;
  position: relative;
  box-shadow:
    0 0 0 10px rgba(124, 77, 255, 0.08),
    0 0 0 20px rgba(124, 77, 255, 0.04),
    0 8px 30px rgba(124, 77, 255, 0.45);
  animation: icon-pulse 2.8s ease-in-out infinite;
}

@keyframes icon-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 8px rgba(124, 77, 255, 0.07),
      0 0 0 16px rgba(124, 77, 255, 0.03),
      0 8px 30px rgba(124, 77, 255, 0.45);
  }
  50% {
    box-shadow:
      0 0 0 12px rgba(124, 77, 255, 0.11),
      0 0 0 24px rgba(124, 77, 255, 0.05),
      0 8px 40px rgba(124, 77, 255, 0.6);
  }
}

/* Title - white gradient */
.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(160deg, #ffffff 0%, rgba(255, 255, 255, 0.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.modal-desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.65;
  margin-bottom: 2rem;
  padding: 0 0.25rem;
}

/* Form Styles */
.input-wrapper {
  position: relative;
  margin-bottom: 0.9rem;
}

.input-wrapper.has-icon .input-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

/* Focus state: recolor the icon */
.input-wrapper.has-icon:focus-within .input-icon {
  color: #7c4dff;
}

#regCodeInput, #regNameInput, #regPhoneInput, #tokenQueryKeyInput {
  width: 100%;
  padding: 0.95rem 1.25rem 0.95rem 2.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-body);
  font-size: 0.93rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
  letter-spacing: normal;
  outline: none;
  transition: all 0.25s ease;
}

#regCodeInput::placeholder, #regNameInput::placeholder, #regPhoneInput::placeholder, #tokenQueryKeyInput::placeholder {
  color: rgba(255, 255, 255, 0.22);
  font-size: 0.88rem;
}

#regCodeInput:focus, #regNameInput:focus, #regPhoneInput:focus, #tokenQueryKeyInput:focus {
  border-color: rgba(124, 77, 255, 0.55);
  background: rgba(124, 77, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.14);
}

/* Divider between sections */
.modal-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.1rem 0 0.9rem;
}

.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.modal-divider span {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}

.error-message {
  font-size: 0.82rem;
  font-weight: 500;
  color: #ff6b6b;
  margin-top: -0.15rem;
  margin-bottom: 0.85rem;
  min-height: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.error-message.show {
  opacity: 1;
}

/* Gradient Submit Button */
.btn-submit-verify {
  width: 100%;
  height: 52px;
  position: relative;
  background: linear-gradient(135deg, #3b82f6 0%, #7c4dff 55%, #a855f7 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--transition-smooth);
  box-shadow: 0 4px 24px rgba(124, 77, 255, 0.4);
  overflow: hidden;
}

.btn-submit-verify::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.12) 0%, transparent 60%);
  opacity: 1;
  pointer-events: none;
}

.btn-submit-verify:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 35px rgba(124, 77, 255, 0.55);
}

.btn-submit-verify:active {
  transform: translateY(0);
}

.btn-submit-verify.loading .btn-text {
  opacity: 0;
}

/* Spinner Animation */
.spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.btn-submit-verify.loading .spinner {
  display: block;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.modal-footer {
  margin-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.25rem;
}

.modal-footer p {
  font-size: 0.77rem;
  color: rgba(255, 255, 255, 0.28);
  font-weight: 400;
}

/* --- Token Query Modal Dashboard Styles --- */
.modal-card-lg {
  max-width: 920px !important;
  width: 95% !important;
  height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 2.25rem 2.25rem 1.5rem !important;
  overflow: hidden;
}

.modal-panels-container {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.modal-panels-container::-webkit-scrollbar {
  width: 6px;
}

.modal-panels-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Nav Tabs */
#tokenModal .nav-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
}

#tokenModal .nav-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.8rem 0;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

#tokenModal .nav-tab:hover {
  color: rgba(255, 255, 255, 0.85);
  background: none;
}

#tokenModal .nav-tab.active {
  color: #818cf8 !important;
  border-bottom: 2px solid #818cf8 !important;
  background: none !important;
}

/* Status Badge Styles */
#tokenModal .status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

#tokenModal .active-badge {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

#tokenModal .exhausted-badge {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

#tokenModal .expired-badge {
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

/* Equivalent Cards Grid */
#tokenModal .eq-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#tokenModal .eq-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.1rem;
  transition: all 0.3s ease;
}

#tokenModal .eq-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

#tokenModal .eq-card.border-purple { border-left: 3px solid #818cf8; }
#tokenModal .eq-card.border-green { border-left: 3px solid #12b76a; }
#tokenModal .eq-card.border-orange { border-left: 3px solid #f59e0b; }
#tokenModal .eq-card.border-blue { border-left: 3px solid #3b82f6; }

/* Table styles */
#tokenModal .data-table {
  width: 100%;
  border-collapse: collapse;
}

#tokenModal .data-table th, 
#tokenModal .data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
}

#tokenModal .data-table th {
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#tokenModal .data-table tr.date-row {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.01);
  transition: background 0.2s;
}

#tokenModal .data-table tr.date-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

#tokenModal .data-table tr.model-row {
  background: rgba(0, 0, 0, 0.15);
  transition: all 0.25s ease;
}

#tokenModal .data-table tr.model-row.collapsed {
  display: none;
}

#tokenModal .data-table td.model-indent-cell {
  padding-left: 2rem;
  font-family: monospace;
  color: rgba(255, 255, 255, 0.55);
}

#tokenModal .data-table tr.date-row .toggle-icon {
  font-size: 0.75rem;
  margin-right: 0.4rem;
  transition: transform 0.2s;
  color: rgba(255, 255, 255, 0.3);
}

#tokenModal .data-table tr.date-row.expanded .toggle-icon {
  transform: rotate(90deg);
  color: #818cf8;
}

/* Badge tags for logs table */
#tokenModal .badge-stream {
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-right: 0.4rem;
}

#tokenModal .stream-yes {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

#tokenModal .stream-no {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
}

#tokenModal .badge-time {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-right: 0.4rem;
}

#tokenModal .badge-frt {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

#tokenModal .cost-highlight {
  font-weight: 600;
  color: #fb923c;
}

/* Skeleton Loading styles */
#tokenModal .skeleton-card {
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 18px;
  background: rgba(255,255,255,0.01);
}

#tokenModal .skeleton-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#tokenModal .skeleton-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.02) 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

#tokenModal .skeleton-lines {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

#tokenModal .skeleton-line {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.02) 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

#tokenModal .skeleton-line.line-short { width: 35%; }
#tokenModal .skeleton-line.line-long { width: 65%; }

#tokenModal .skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

#tokenModal .skeleton-box {
  height: 70px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.02) 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

/* Pagination buttons */
#tokenModal .pag-btn,
#tokenModal .pag-num-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#tokenModal .pag-btn:hover:not(:disabled),
#tokenModal .pag-num-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

#tokenModal .pag-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

#tokenModal .pag-num-btn.active {
  background: #6366f1 !important;
  border-color: #6366f1 !important;
  color: #fff !important;
  font-weight: 600;
}

/* ===================================================
   Token Query Modal: Premium Light (White/Black) Theme
   =================================================== */
#tokenModal .modal-card-lg {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(40px) !important;
  -webkit-backdrop-filter: blur(40px) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  color: #0f1115 !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 30px 60px rgba(0, 0, 0, 0.12),
    0 0 100px rgba(99, 102, 241, 0.05) !important;
}

#tokenModal .modal-card-lg::before {
  background: linear-gradient(90deg,
    transparent 0%,
    #4f46e5 30%,
    #818cf8 55%,
    #6366f1 75%,
    transparent 100%
  ) !important;
}

/* Settings Split Layout */
#tokenModal .settings-modal {
  width: 920px !important;
  max-width: 95vw !important;
  height: 600px !important;
  max-height: 85vh !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  overflow: hidden !important;
  text-align: left !important;
}

/* Sidebar Styling */
#tokenModal .settings-sidebar {
  width: 220px;
  background: #f4f5f6;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
}

#tokenModal .sidebar-title-container {
  margin-bottom: 20px;
  padding-left: 8px;
}

#tokenModal .sidebar-title-container h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f1115 !important;
  margin: 0;
  background: none !important;
  -webkit-text-fill-color: initial !important;
}

#tokenModal .sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#tokenModal .sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #475467;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s var(--transition-smooth);
}

#tokenModal .sidebar-nav .nav-item i {
  font-size: 1rem;
  width: 18px;
  text-align: center;
  color: #667085;
  transition: color 0.25s;
}

#tokenModal .sidebar-nav .nav-item:hover {
  background: rgba(0, 0, 0, 0.03);
  color: #090b0f;
}

#tokenModal .sidebar-nav .nav-item:hover i {
  color: #475467;
}

#tokenModal .sidebar-nav .nav-item.active {
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
  font-weight: 600;
}

#tokenModal .sidebar-nav .nav-item.active i {
  color: #6366f1;
}

/* Content Area */
#tokenModal .settings-content {
  flex: 1;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 24px 32px;
  min-width: 0;
}

#tokenModal .settings-content .modal-close-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  font-size: 0.95rem;
  color: rgba(0, 0, 0, 0.4) !important;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 10;
}

#tokenModal .settings-content .modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: rgba(0, 0, 0, 0.8) !important;
  transform: rotate(90deg);
}

#tokenModal .modal-panels-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

#tokenModal .modal-panels-container::-webkit-scrollbar {
  width: 6px;
}

#tokenModal .modal-panels-container::-webkit-scrollbar-track {
  background: transparent;
}

#tokenModal .modal-panels-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

/* Panels */
#tokenModal .settings-panel {
  display: none;
  flex-direction: column;
}

#tokenModal .settings-panel.active {
  display: flex;
}

#tokenModal .panel-header {
  margin-bottom: 20px;
  text-align: left;
}

#tokenModal .panel-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f1115;
  margin: 0;
}

#tokenModal .panel-desc {
  font-size: 0.82rem;
  color: #667085 !important;
  margin: 4px 0 0 0 !important;
}

/* Option Cards (Mac-like settings style) */
#tokenModal .settings-group-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
  margin-bottom: 16px;
  overflow: hidden;
}

#tokenModal .settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#tokenModal .settings-row:last-child {
  border-bottom: none;
}

#tokenModal .settings-row.flex-column {
  flex-direction: column;
}

#tokenModal .settings-row.align-stretch {
  align-items: stretch;
}

#tokenModal .settings-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

#tokenModal .settings-row-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

#tokenModal .settings-row-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f1115;
}

#tokenModal .settings-row-desc {
  font-size: 0.78rem;
  color: #667085;
  margin-top: 2px;
}

#tokenModal .settings-row-btn {
  background: #ffffff;
  color: #344054;
  border: 1px solid #d0d5dd;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

#tokenModal .settings-row-btn:hover {
  background: #f9fafb;
  border-color: #6366f1;
  color: #6366f1;
}

/* Toggle Switch */
#tokenModal .toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

#tokenModal .toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

#tokenModal .toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e4e4e7;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}

#tokenModal .toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

#tokenModal .toggle-switch input:checked + .toggle-slider {
  background-color: #34d399;
}

#tokenModal .toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Equivalent Cards on White theme */
#tokenModal .eq-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

#tokenModal .eq-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-left-width: 4px !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01) !important;
  transition: all 0.25s ease !important;
  text-align: left;
}

#tokenModal .eq-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}

#tokenModal .eq-card.border-purple { border-left-color: #6366f1 !important; border-color: rgba(99, 102, 241, 0.12) !important; }
#tokenModal .eq-card.border-green { border-left-color: #12b76a !important; border-color: rgba(18, 183, 106, 0.12) !important; }
#tokenModal .eq-card.border-orange { border-left-color: #f59e0b !important; border-color: rgba(245, 158, 11, 0.12) !important; }
#tokenModal .eq-card.border-blue { border-left-color: #3b82f6 !important; border-color: rgba(59, 130, 246, 0.12) !important; }

#tokenModal .eq-card-icon-wrapper {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

#tokenModal .wallet-purple { background: rgba(99, 102, 241, 0.08); color: #6366f1; }
#tokenModal .logo-green { background: rgba(18, 183, 106, 0.08); color: #12b76a; }
#tokenModal .logo-orange { background: rgba(245, 158, 11, 0.08); color: #f59e0b; }
#tokenModal .logo-blue { background: rgba(59, 130, 246, 0.08); color: #3b82f6; }

#tokenModal .eq-title {
  font-size: 0.72rem;
  color: #667085;
  font-weight: 500;
}

#tokenModal .eq-card-val {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 4px 0;
}

#tokenModal .text-purple { color: #6366f1 !important; }
#tokenModal .text-green { color: #12b76a !important; }
#tokenModal .text-orange { color: #f59e0b !important; }
#tokenModal .text-blue { color: #3b82f6 !important; }

#tokenModal .eq-card-sub {
  font-size: 0.65rem;
  color: #98a2b3;
}

/* Key Info Bar */
#tokenModal .key-info-bar {
  background: #f4f5f6 !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  color: #475467 !important;
}

/* Tables styling */
#tokenModal .data-table {
  color: #475467 !important;
}

#tokenModal .data-table th {
  background: rgba(0, 0, 0, 0.015) !important;
  color: rgba(15, 17, 21, 0.5) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

#tokenModal .data-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
  color: rgba(15, 17, 21, 0.75) !important;
}

#tokenModal .data-table tr.date-row td {
  color: #0f1115 !important;
  font-weight: 600;
}

#tokenModal .data-table tr.model-row {
  background: #f9fafb !important;
}

#tokenModal .data-table tr.model-row td {
  color: rgba(15, 17, 21, 0.55) !important;
}

#tokenModal .logs-count-badge {
  background: rgba(99, 102, 241, 0.08) !important;
  color: #6366f1 !important;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

#tokenModal .pagination-container {
  color: rgba(15, 17, 21, 0.5) !important;
}

#tokenModal .page-size-select {
  background: #ffffff !important;
  border: 1px solid #d0d5dd !important;
  color: #344054 !important;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  outline: none;
}

#tokenModal .pag-btn,
#tokenModal .pag-num-btn {
  background: #ffffff !important;
  border: 1px solid #d0d5dd !important;
  color: #344054 !important;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#tokenModal .pag-btn:hover:not(:disabled),
#tokenModal .pag-num-btn:hover {
  background: #f9fafb !important;
  border-color: #b2ddff !important;
}

#tokenModal .pag-num-btn.active {
  background: #6366f1 !important;
  border-color: #6366f1 !important;
  color: #fff !important;
  font-weight: 600;
}

/* Range Selector style overrides */
#tokenModal .range-selector .btn-group {
  display: flex;
  background: rgba(0, 0, 0, 0.03) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  padding: 0.15rem;
  border-radius: 8px;
}

#tokenModal .range-selector .selector-btn {
  background: none !important;
  border: none !important;
  padding: 0.35rem 0.8rem !important;
  font-size: 0.82rem !important;
  border-radius: 6px !important;
  color: rgba(15, 17, 21, 0.5) !important;
  cursor: pointer;
  transition: all 0.2s;
}

#tokenModal .range-selector .selector-btn.active {
  background: #ffffff !important;
  color: #0f1115 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

#tokenModal .stats-month-input {
  background: #ffffff !important;
  border: 1px solid #d0d5dd !important;
  border-radius: 8px !important;
  color: #344054 !important;
  padding: 0.35rem 0.6rem !important;
  font-size: 0.82rem !important;
  outline: none;
}

#tokenPercentVal {
  color: #0f1115 !important;
}

/* Input styling overrides on white theme settings */
#tokenModal #tokenQueryKeyInput {
  background: #f4f5f6 !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #0f1115 !important;
  padding-left: 2.75rem !important;
}

#tokenModal #tokenQueryKeyInput::placeholder {
  color: rgba(0, 0, 0, 0.35) !important;
}

#tokenModal #tokenQueryKeyInput:focus {
  border-color: rgba(99, 102, 241, 0.6) !important;
  background: rgba(99, 102, 241, 0.03) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

#tokenModal .input-wrapper.has-icon .input-icon {
  color: rgba(0, 0, 0, 0.4) !important;
}

#tokenModal .input-wrapper.has-icon:focus-within .input-icon {
  color: #6366f1 !important;
}

/* Mobile Responsiveness for Split Settings Layout */
@media (max-width: 768px) {
  #tokenModal .settings-modal {
    flex-direction: column !important;
    height: auto !important;
    max-height: 90vh !important;
  }

  #tokenModal .settings-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px 20px !important;
    flex: none !important;
  }

  #tokenModal .sidebar-title-container {
    margin-bottom: 10px !important;
  }

  #tokenModal .sidebar-nav {
    flex-direction: row !important;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 8px !important;
    scrollbar-width: none; /* Hide scrollbar for clean look */
  }

  #tokenModal .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  #tokenModal .sidebar-nav .nav-item {
    padding: 8px 12px !important;
    white-space: nowrap;
    flex-shrink: 0;
  }

  #tokenModal .settings-content {
    padding: 20px !important;
    height: 380px !important; /* fixed height for content scrolling on mobile */
    flex: none !important;
  }

  #tokenModal .eq-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

/* Code Box Copy Button */
#tokenModal .code-copy-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

#tokenModal .code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* CC Switch Import Button Styles */
#tokenModal .cc-import-btn {
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
}

#tokenModal .cc-import-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* OS Switch Toggle Button inside panels */
#tokenModal .os-toggle {
  background: rgba(0, 0, 0, 0.03) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  padding: 0.15rem;
  border-radius: 8px;
}

#tokenModal .os-toggle .selector-btn {
  background: none !important;
  border: none !important;
  padding: 0.35rem 0.8rem !important;
  font-size: 0.82rem !important;
  border-radius: 6px !important;
  color: rgba(15, 17, 21, 0.5) !important;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

#tokenModal .os-toggle .selector-btn.active {
  background: #ffffff !important;
  color: #0f1115 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

/* Model tags style */
#tokenModal .model-tag {
  background: #f4f5f6;
  color: #475467;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.04);
}



