/* Modern Enhanced TSTO API CSS */

/* Root Variables for Consistent Design System */
:root {
  --primary-yellow: #ffd700;
  --simpsons-blue: #4a9eff;
  --accent-pink: #ff66b2;
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --bg-card: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --text-muted: #808080;
  --border-color: #333333;
  --gradient-primary: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
  --gradient-blue: linear-gradient(135deg, #4a9eff 0%, #0066cc 100%);
  --gradient-card: linear-gradient(145deg, #1e1e1e 0%, #2a2a2a 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 30px rgba(255, 215, 0, 0.3);
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --border-radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Base Styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.display-3 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.display-5 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.display-6 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.lead {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
}

.text-warning {
  color: var(--primary-yellow) !important;
  font-weight: 700;
}

.text-info {
  color: var(--simpsons-blue) !important;
  font-weight: 600;
}

/* Enhanced Navigation */
.navbar {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 10, 0.9) !important;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999 !important; /* Much higher z-index */
  width: 100%;
}

.navbar .dropdown-menu {
  z-index: 10000 !important; /* Even higher for dropdown */
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.navbar .dropdown-item {
  color: var(--text-secondary);
  transition: var(--transition);
  padding: 0.75rem 1rem;
}

.navbar .dropdown-item:hover {
  background: rgba(255, 215, 0, 0.1);
  color: var(--primary-yellow);
}

/* Add padding to body to account for fixed navbar */
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  padding-top: 76px; /* Space for fixed navbar */
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 0.75rem 1rem !important;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-yellow) !important;
  background: rgba(255, 215, 0, 0.1);
  transform: translateY(-1px);
}

.nav-link.active {
  color: var(--primary-yellow) !important;
  background: rgba(255, 215, 0, 0.15);
}

/* Username badge in navbar */
.navbar .username-badge {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: var(--primary-yellow);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  transition: var(--transition);
}

.navbar .username-badge:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--primary-yellow);
  text-decoration: none;
}

/* Enhanced Hero Section */
.hero-section,
.bg-fade-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-primary);
  margin-top: -76px; /* Overlap the fixed navbar */
  padding-top: 76px; /* But maintain content spacing */
}

.hero-section::before,
.bg-fade-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at top left, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(74, 158, 255, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.7) 0%, rgba(10, 10, 10, 0.9) 100%);
  z-index: 2;
}

.bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0;
  transition: opacity 3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

#bg1 { z-index: 1; }
#bg2 { z-index: 2; }

.hero-content {
  position: relative;
  z-index: 3;
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-align: center;
}

.hero-title .tsto {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  text-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* Enhanced Credit Box */
.bg-credit,
#bg-credit {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8) !important;
  backdrop-filter: blur(10px);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  border-left: 3px solid var(--primary-yellow);
  z-index: 4;
  transition: var(--transition);
}

.bg-credit:hover,
#bg-credit:hover {
  background: rgba(0, 0, 0, 0.9) !important;
  transform: translateX(-5px);
}

.bg-credit a,
#bg-credit a {
  color: var(--simpsons-blue);
  text-decoration: none;
  transition: var(--transition);
}

.bg-credit a:hover,
#bg-credit a:hover {
  color: var(--primary-yellow);
  text-decoration: underline;
}

/* Enhanced Buttons */
.btn {
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: var(--border-radius);
  padding: 0.75rem 2rem;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-pink {
  background: linear-gradient(135deg, var(--accent-pink) 0%, #ff3385 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 102, 178, 0.3);
}

.btn-pink:hover {
  background: linear-gradient(135deg, #ff3385 0%, #e6005c 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 102, 178, 0.4);
}

.btn-primary {
  background: var(--gradient-blue);
  color: white;
  box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(74, 158, 255, 0.4);
}

.btn-outline,
.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.btn-outline:hover,
.btn-outline-light:hover {
  border-color: var(--primary-yellow);
  background: rgba(255, 215, 0, 0.1);
  color: var(--primary-yellow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-outline-info,
.btn-outline-success,
.btn-outline-warning {
  border-width: 2px;
  font-weight: 600;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
  border-radius: var(--border-radius);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: scale(1.03);
}

/* Enhanced Cards */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

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

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 215, 0, 0.3);
}

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

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Enhanced Sections */
section {
  padding: 5rem 0;
  position: relative;
}

.section {
  padding: 6rem 0;
}

.bg-dark {
  background: var(--bg-secondary) !important;
}

.bg-deep-dark {
  background: var(--bg-tertiary) !important;
  position: relative;
}

.bg-deep-dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Enhanced Getting Started Section */
.getting-started .card {
  height: 100%;
  transition: var(--transition);
}

.getting-started .card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.getting-started .card:nth-child(1):hover {
  box-shadow: 0 8px 40px rgba(74, 158, 255, 0.3);
}

.getting-started .card:nth-child(2):hover {
  box-shadow: 0 8px 40px rgba(40, 167, 69, 0.3);
}

.getting-started .card:nth-child(3):hover {
  box-shadow: 0 8px 40px rgba(255, 215, 0, 0.3);
}

/* Live Stats & Feature Cards */
.stats-ticker {
  position: relative;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 0;
  z-index: 3;
}

.stat-item {
  text-align: center;
  padding: 0 1rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
}

.stats-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 215, 0, 0.1), transparent);
  animation: rotate 20s linear infinite;
  opacity: 0;
  transition: var(--transition);
}

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

.stats-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 215, 0, 0.3);
}

.stats-card h3 {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stats-card h6 {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* Feature Grid & Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 4rem 0;
}

.feature-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 215, 0, 0.1), transparent);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover::before {
  opacity: 1;
  animation: rotate 3s ease-in-out;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--bg-primary);
  position: relative;
  z-index: 1;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.feature-section {
  padding: 6rem 0;
}

.feature-section img {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.feature-section img:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* API Demo & Code Sections */
.api-demo {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  padding: 3rem;
  margin: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.api-demo::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
  animation: scan 3s ease-in-out infinite;
}

.demo-terminal,
#quoteBox {
  background: #000;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  color: #00ff88;
  text-align: left;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-terminal::before,
#quoteBox::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(90deg, #ff5f56 0%, #ffbd2e 50%, #27ca3f 100%);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

#quoteBox::before {
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
  animation: scan 3s ease-in-out infinite;
  border-radius: 0;
}

.demo-button {
  background: var(--gradient-primary);
  color: var(--bg-primary);
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.1rem;
}

.demo-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.demo-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.dev-experience {
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-lg);
  padding: 4rem 3rem;
  margin: 4rem 0;
  text-align: center;
  position: relative;
}

.dev-experience::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
  border-radius: var(--border-radius-lg);
}

.code-example {
  background: #1a1a1a;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin: 2rem 0;
  text-align: left;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  color: var(--text-secondary);
  overflow-x: auto;
}

.code-comment { color: #6a9955; }
.code-string { color: #ce9178; }
.code-keyword { color: #569cd6; }
.code-function { color: #dcdcaa; }

/* Enhanced Code Blocks */
pre, code {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;
}

code {
  padding: 0.2rem 0.4rem;
  font-size: 0.9em;
  color: var(--primary-yellow);
}

/* Enhanced List Styles */
.list-unstyled li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  transition: var(--transition);
}

.list-unstyled li:hover {
  color: var(--text-primary);
  transform: translateX(5px);
}

/* Enhanced Roadmap Section */
.roadmap-board {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding: 2rem 0;
  margin: 2rem 0;
  justify-content: center;
  scroll-snap-type: x mandatory;
}

.roadmap-list {
  background: var(--gradient-card);
  border-radius: var(--border-radius-lg);
  min-width: 320px;
  max-width: 360px;
  flex: 1 1 0px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  scroll-snap-align: start;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.roadmap-list:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.4);
}

.roadmap-list-title {
  background: var(--gradient-blue);
  color: white;
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
  padding: 1.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.roadmap-cards {
  padding: 1.5rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.roadmap-card {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: var(--border-radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
  transition: var(--transition);
  border-left: 4px solid var(--primary-yellow);
  position: relative;
}

.roadmap-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
  background: var(--bg-secondary);
}

.roadmap-card strong {
  color: var(--text-primary);
  font-size: 1.1em;
  display: block;
  margin-bottom: 0.5rem;
}

.roadmap-card small {
  color: var(--text-muted);
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9em;
}

/* Enhanced Page Titles */
.page-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 2rem 0 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: none;
}

.page-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 600;
  color: var(--simpsons-blue);
  margin-bottom: 2rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

/* Enhanced Forms */
.form-control.bg-dark,
.form-select.bg-dark {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
  transition: var(--transition);
}

.form-control.bg-dark:focus,
.form-select.bg-dark:focus {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--primary-yellow);
  box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

#searchUserLinksInput::placeholder {
  color: #b9bbbe !important;
}

#searchUserLinksInput {
  background-color: #1e1f22 !important;
  color: #ffffff;
  border: 1px solid #40444b;
}

/* Enhanced Pagination */
.pagination-dark .page-link {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.pagination-dark .page-link:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.pagination-dark .page-item.active .page-link {
  background-color: var(--simpsons-blue);
  color: var(--text-primary);
  border-color: var(--simpsons-blue);
}

/* Sidebar */
.sidebar {
  min-height: 100vh;
  background-color: #1c1c1c;
}

.sidebar a {
  color: var(--text-secondary);
  padding: 10px 20px;
  display: block;
  transition: var(--transition-fast);
  text-decoration: none;
  border-radius: 5px;
}

.sidebar a:hover {
  background-color: #2d2f35;
  color: white;
}

.sidebar .active,
.sidebar .nav-link.active {
  background-color: #3b3f4a;
  color: #fff;
}

/* Username & API Key Styles */
.username-badge {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 10px;
  display: inline-block;
  font-weight: 500;
}

.username-badge:hover {
  background-color: rgba(255,255,255,0.1);
  text-decoration: underline;
}

.apikey-blur {
  cursor: pointer;
  filter: blur(4px);
  transition: filter 0.3s ease;
  user-select: none;
}

.apikey-ellipsis {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  cursor: pointer;
}

.apikey-blur:hover {
  filter: blur(0);
}

/* Enhanced Tables */
.table-responsive.card {
  border-radius: var(--border-radius) !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
}

.table.table-dark > tbody > tr:last-child > td {
  border-bottom: none !important;
  padding-bottom: 0.1rem !important;
}

/* OTP Badge Containers */
.otp-badge-container {
  position: relative;
}

.otp-overlay {
  top: 50%;
  left: -90px;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  color: white;
  white-space: nowrap;
  font-size: 0.85rem;
  z-index: 999;
}

.otp-badge-container:hover .otp-badge-inner {
  transform: scale(1.03);
  background: rgba(255, 255, 255, 0.07);
  transition: transform 150ms ease, background 150ms ease;
}

.otp-badge-container.bouncing {
  animation: bounceCopy 180ms ease;
}

/* OTP Demo Section */
.otp-demo-section {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  background-color: #111;
  overflow: hidden;
}

.otp-img-container {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 50%;
  background-repeat: no-repeat;
  background-position: right center;
  background-size: cover;
  z-index: 1;
}

.otp-gradient-mask {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 50%;
  background: linear-gradient(to right, rgba(17, 17, 17, 1) 0%, rgba(17, 17, 17, 0.8) 20%, rgba(17, 17, 17, 0) 100%);
  z-index: 2;
}

.otp-demo-section .container {
  position: relative;
  z-index: 3;
}

/* Container Utilities */
.container-xl {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.z-2 {
  z-index: 4 !important;
  position: relative;
}

/* Fade Effects */
.fade-in::before {
  opacity: 1;
  transition: opacity 1s ease-in-out;
}

.fade-out::before {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scan {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

@keyframes bounceCopy {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes sparkle {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0) translateY(-20px);
  }
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-yellow);
}

.roadmap-board::-webkit-scrollbar {
  height: 8px;
  background: transparent;
}

.roadmap-board::-webkit-scrollbar-thumb {
  background: #22293a;
  border-radius: 4px;
}

/* Enhanced Selection */
::selection {
  background: rgba(255, 215, 0, 0.3);
  color: var(--text-primary);
}

/* Enhanced Focus States */
button:focus-visible, 
.btn:focus-visible {
  outline: 2px solid var(--primary-yellow);
  outline-offset: 2px;
}

/* Enhanced Responsive Design */
@media (max-width: 900px) {
  .roadmap-board { 
    gap: 0.8rem; 
  }
  .roadmap-list { 
    min-width: 220px; 
    max-width: 94vw; 
  }
}

@media (max-width: 768px) {
  section, .section {
    padding: 3rem 0;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
  }
  
  .btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .feature-card {
    padding: 2rem;
  }
  
  .api-demo,
  .dev-experience {
    padding: 2rem;
  }
  
  .roadmap-board {
    flex-direction: column;
    gap: 1.5rem;
    overflow-x: unset;
    padding: 1rem 0;
  }
  
  .roadmap-list {
    min-width: unset;
    max-width: 100%;
    width: 100%;
  }
  
  .bg-image {
    background-attachment: scroll;
  }
  
  .sidebar {
    min-height: auto; 
    background-color: #1c1c1c;
  }

  .collapse.sidebar {
    position: static;
    min-height: auto;
    background-color: #1c1c1c;
    overflow-y: auto;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  /* Enhanced Mobile Tables */
  .table-responsive thead {
    display: none;
  }
  
  .table-responsive tr {
    display: block;
    margin-bottom: 1.5rem;
    background-color: #212529;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    padding: 0;
    width: 100%;
  }
  
  .table-responsive td {
    display: flex;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    align-items: center;
  }
  
  .table-responsive td:last-child {
    border-bottom: none;
  }
  
  .table-responsive td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #aaa;
    width: 40%;
    padding-right: 1rem;
  }
  
  .table-responsive td > * {
    margin-left: auto;
  }
  
  .table-responsive .username-badge {
    width: auto !important;
  }
  
  .table-responsive .badge {
    display: inline-block;
    width: auto;
  }
  
  .table-responsive .toggle-approval {
    float: right;
  }
  
  .table-responsive .apikey-blur {
    text-align: right;
    float: right;
  }
  
  .table-responsive td[data-label="Requests"],
  .table-responsive td[data-label="Errors"],
  .table-responsive td[data-label="Data"] {
    display: flex;
    justify-content: space-between;
  }
  
  .table-responsive tbody {
    padding: 0.5rem;
  }
  
  .table-responsive table,
  .table-responsive tr,
  .table-responsive td {
    border-collapse: separate;
  }
  
  .table-responsive tbody > tr:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
  }
  
  .table-responsive tbody > tr {
    margin-bottom: 2rem;
  }

  /* General mobile table styles */
  table thead {
    display: none;
  }

  table tbody tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 0.5rem;
  }

  table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 0.4rem 1rem;
    border: none;
  }

  table td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #aaa;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .stat-item {
    padding: 0 0.5rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .page-title {
    font-size: 2rem;
    margin-top: 0.8rem;
    margin-bottom: 0.1em;
    padding-left: 0.04em;
  }
  
  .page-subtitle {
    font-size: 1.1rem;
    margin-bottom: 0.8em;
    padding-left: 0.07em;
  }

  .roadmap-card {
    padding: 0.6rem 0.7rem;
    font-size: 1em;
  }
  
  .roadmap-list-title {
    font-size: 1.05em;
    padding: 0.7rem 1rem;
    border-radius: 14px 14px 0 0;
  }
}

@media (max-width: 576px) {
  .display-3 {
    font-size: 2.5rem;
  }
  
  .lead {
    font-size: 1.1rem;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
    max-width: 300px;
  }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: no-preference) {
  .card, .btn, .stats-card {
    transition: var(--transition);
  }
  
  .fade-img {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out forwards;
  }
  
  .feature-section:nth-child(even) .fade-img {
    animation-delay: 0.2s;
  }
  
  .feature-section:nth-child(odd) .fade-img {
    animation-delay: 0.4s;
  }
}

.bg-fade-container, 
.bg-image {
  will-change: opacity;
}

.card:hover, 
.btn:hover {
  will-change: transform;
}

.ticket-card {
  background-color: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 15px;
  position: relative;
  overflow: hidden;
}

/* .ticket-card.needs-attention::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 8px;
  height: 100%;
  background: linear-gradient(to bottom, #facc15, #fbbf24); /* yellow gradient */
}

.ticket-card.awaiting-user::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 8px;
  height: 100%;
  background: linear-gradient(to bottom, #38bdf8, #0ea5e9); /* blue gradient */
} */

.ticket-meta {
  min-width: 160px;
}

/* Compact table spacing (all sizes) */
.table-compact td, .table-compact th { padding: .4rem .5rem; }
.table-compact .badge { padding: .15rem .45rem; font-size: .7rem; line-height: 1.1; }
.username-badge { padding: .25rem .5rem !important; font-size: .85rem; }

/* Stack table on small screens */
@media (max-width: 576px) {
  .stackable-table thead { display: none; }
  .stackable-table tbody tr {
    display: block;
    margin: .5rem 0;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: .5rem;
    overflow: hidden;
    background: rgba(255,255,255,.03);
  }
  .stackable-table tbody tr > td {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding: .45rem .65rem;
    font-size: .9rem;
    border-bottom: 1px dashed rgba(255,255,255,.08);
  }
  .stackable-table tbody tr > td:last-child { border-bottom: 0; }
  .stackable-table tbody td::before {
    content: attr(data-label);
    color: #9aa0a6;
    font-weight: 600;
  }
  /* keep long usernames from exploding width */
  .stackable-table [data-label="Username"] a { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }
}
.mobile-nav-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
  padding: .25rem 0;
}
.mobile-nav-stack .btn { width: 100%; }
/* API key cards */
.key-card .key-index{
  width:28px;height:28px;border-radius:6px;
  background:#1f1f1f;display:inline-flex;align-items:center;justify-content:center;
  font-weight:700;font-size:.9rem
}
.key-secret{cursor:pointer;user-select:none}
.key-actions .btn{white-space:nowrap}

/* tighter spacing on mobile */
@media (max-width:576px){
  .key-actions{width:100%}
}

/* this change broke things */
section.card,
.card-compact {
  padding: 0 !important;
}

/* If you added this earlier, it will also help trim things */
.account-main { padding-top: 1.25rem !important; }