@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Dark Premium Palette */
  --bg-main: #0B0F19;
  --bg-sidebar: #111827;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --accent-primary: #3B82F6;
  --accent-secondary: #8B5CF6;
  --accent-gradient: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --sidebar-width: 250px;
  --header-height: 70px;
  
  --bg-sidebar-glass: rgba(17, 24, 39, 0.35);
  --hover-bg: rgba(59, 130, 246, 0.1); /* Fondo sutilmente azulado */
  --hover-text-color: #FFFFFF;
  --hover-glow: 0 0 0 1px rgba(96, 165, 250, 0.7), 0 0 15px rgba(59, 130, 246, 0.4); /* Anillo nítido + brillo */
  --btn-hover-glow: 0 0 0 1px rgba(96, 165, 250, 0.5), 0 0 15px rgba(59, 130, 246, 0.4); /* Resplandor para botones */
  --hover-icon-color: #60A5FA;
  --hover-icon-glow: drop-shadow(0 0 6px rgba(96, 165, 250, 0.8));
  --hover-transform: translateY(-2px);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  /* Light Theme Palette */
  --bg-main: #F3F4F6;
  --bg-sidebar: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-hover: rgba(255, 255, 255, 1);
  
  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  
  /* Mantener acentos vibrantes */
  --accent-primary: #2563EB;
  --accent-secondary: #7C3AED;
  --accent-gradient: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  
  --bg-sidebar-glass: rgba(255, 255, 255, 0.7);
  --bg-header-glass: rgba(255, 255, 255, 0.8);
  
  --hover-bg: rgba(37, 99, 235, 0.08); /* Fondo azul muy suave y transparente */
  --hover-text-color: var(--accent-primary); /* Texto e icono del mismo azul para armonía */
  --hover-glow: none; 
  --btn-hover-glow: 0 6px 15px rgba(0, 0, 0, 0.1); /* Sombra gris clásica en modo claro */
  --hover-icon-color: var(--accent-primary); 
  --hover-icon-glow: none;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background-color: var(--bg-main);
  min-height: 100vh;
  position: relative;
}

/* Orbes de luz de fondo para el efecto Glassmorphism */
html::before, html::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
  animation: floatOrb 20s infinite ease-in-out alternate;
}

html::before {
  top: -10%;
  left: -5%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(0,0,0,0) 70%);
}

html::after {
  bottom: -10%;
  right: -5%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(0,0,0,0) 70%);
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 10%) scale(1.1); }
}

body {
  font-family: 'Inter', sans-serif;
  background-color: transparent;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* =========================================
   LAYOUT 
   ========================================= */

.app-container {
  display: flex;
  width: 100%;
}


/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar-glass);
  backdrop-filter: blur(24px); /* Efecto Glassmorphism */
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255, 255, 255, 0.05); /* Borde de cristal */
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-color);
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 8px;
  transition: opacity 0.3s ease;
}

.logo-link:hover {
  opacity: 0.8;
}

.logo-icon {
  background: var(--accent-gradient);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.sidebar-nav {
  padding: 24px 16px;
  flex: 1;
  overflow-y: auto;
  /* Ocultar scrollbar nativo */
  scrollbar-width: none; /* Firefox */
}

.sidebar-nav::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
  padding-left: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 4px;
}

.nav-item i {
  margin-right: 12px;
  font-size: 18px;
  width: 24px;
  text-align: center;
  color: var(--icon-color, var(--text-secondary));
  transition: var(--transition);
}

.nav-item:hover i, .nav-item.active i {
  color: var(--icon-color, var(--accent-primary));
  filter: brightness(1.2);
}

.nav-item:hover, .nav-item.active {
  background-color: var(--hover-bg, var(--bg-card));
  color: var(--hover-text-color, #FFFFFF);
  box-shadow: var(--hover-glow);
  transform: var(--hover-transform, none);
}

.nav-item.active {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  border-left: 3px solid var(--accent-primary);
}

/* SIDEBAR COLLAPSIBLE GROUPS */
.nav-group {
  margin-bottom: 8px;
}

.nav-group-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 12px 20px 12px 16px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 8px;
}

.header-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
  flex: 1;
  padding-right: 16px;
  min-width: 0;
}

.header-title i {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 1px;
  width: 20px;
  text-align: center;
  transition: var(--transition);
}

.nav-group-header:hover, .nav-group.open .nav-group-header {
  background-color: var(--hover-bg, var(--bg-card));
  color: var(--hover-text-color, #FFFFFF);
  box-shadow: var(--hover-glow);
  transform: var(--hover-transform, none);
}

.nav-group-header:hover .header-title i, .nav-group.open .header-title i {
  color: var(--hover-icon-color, var(--accent-primary));
  filter: var(--hover-icon-glow, none);
}

.nav-group-header .chevron {
  font-size: 10px;
  transition: transform 0.3s ease;
  position: absolute;
  right: 4px;
  top: 15px;
}

.nav-group.open .chevron {
  transform: rotate(180deg);
}

.nav-group-content {
  display: none;
  padding-left: 8px;
  margin-top: 4px;
}

.nav-group.open .nav-group-content {
  display: block;
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.top-header {
  height: var(--header-height);
  background-color: var(--bg-header-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}

.search-bar {
  position: relative;
  width: 300px;
}

.search-bar input {
  width: 100%;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 16px 10px 40px;
  border-radius: 100px;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.search-bar input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-bar > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* SMART SEARCH DROPDOWN */
.search-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 100%;
  /* Cristal mucho más oscuro (95% opaco) para no mezclar el texto */
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.05);
  max-height: 400px;
  overflow-y: auto;
}

.search-dropdown.active {
  display: flex;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover, .search-result-item.highlighted {
  background: rgba(255, 255, 255, 0.08);
}

.search-result-icon {
  width: 36px;
  height: 36px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
}

.search-result-icon i {
  color: #60A5FA !important;
  font-size: 16px !important;
  opacity: 1 !important;
  display: inline-block;
}

.search-result-info {
  display: flex;
  flex-direction: column;
}

.search-result-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.search-result-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.search-no-results {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.lang-selector:hover {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

/* DASHBOARD AREA */
.dashboard-area {
  padding: 40px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.page-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 40px;
}

/* CATEGORY TABS */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.tab-btn {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.tab-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-3px);
  box-shadow: var(--btn-hover-glow);
}

.tab-btn.active {
  background: var(--accent-gradient);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* CARDS GRID */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-gradient);
  opacity: 0;
  transition: var(--transition);
  z-index: 0;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tool-card:hover::before {
  opacity: 0.05;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: color-mix(in srgb, var(--icon-color, var(--accent-primary)) 12%, transparent);
  color: var(--icon-color, var(--accent-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.card-content {
  position: relative;
  z-index: 1;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Efecto hover global para los contenedores de guías */
.guide-box {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.guide-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.15);
}

/* ADSENSE SLOTS */
.ad-slot {
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  overflow: hidden;
}

.ad-horizontal {
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin: 0 auto 40px auto;
}

.ad-square {
  width: 100%;
  min-height: 250px;
}

/* RESPONSIVE */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .search-bar {
    display: none;
  }
  
  .top-header {
    padding: 0 20px;
  }
  
  .dashboard-area {
    padding: 20px;
  }
  
  .page-title {
    font-size: 28px;
  }
}

/* Dropdown Multi-Idioma Manual */
.lang-selector-dropdown {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}
.lang-selector-dropdown:hover {
  border-color: var(--accent-primary);
}
.lang-selector-dropdown option {
  background: var(--bg-sidebar);
  color: var(--text-primary);
}

/* Custom Audio Range Input */
input[type=range] {
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  height: 6px;
  border-radius: 100px;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #fff;
}
.hidden-numpad { display: none !important; }
.key-trackpad { width: 140px !important; height: 50px !important; border-radius: 8px !important; }

/* BOTÓN TIPO TARJETA PARA SIDEBAR (GUÍAS) */
.nav-card-item {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 8px;
  margin-bottom: 8px;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.nav-card-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.nav-card-item i {
  font-size: 22px;
  color: var(--text-primary);
  margin-right: 14px;
}

.nav-card-text {
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}

/* DASHBOARD LAYOUT & RIGHT SIDEBAR (AdSense) */
.dashboard-layout {
  display: flex;
  gap: 40px;
  align-items: stretch;
}

.dashboard-main {
  flex: 1;
  min-width: 0;
}

.right-ad-sidebar {
  display: none;
  width: 300px;
  flex-shrink: 0;
}

@media (min-width: 1200px) {
  .right-ad-sidebar {
    display: block;
  }
}

.ad-vertical {
  width: 100%;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* GLOBAL BACKGROUND PARTICLES */
.global-particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  opacity: 0.6;
}

.global-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(59, 130, 246, 0.4);
  border-radius: 50%;
  animation: floatUpGlobal 15s infinite linear;
}

@keyframes floatUpGlobal {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) scale(1.5); opacity: 0; }
}

/* RELATED TOOLS SECTION (RETENTION) */
.related-tools-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.related-tools-section h3 {
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
}

.related-tools-section h3 i {
  color: #F59E0B;
  margin-right: 12px;
  font-size: 20px;
}

.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* =========================================
   THEME TOGGLE (iOS Switch)
   ========================================= */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  margin-right: 15px;
}
.theme-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}
.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider.round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255,255,255,0.2);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,0.1);
}
.slider.round:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .slider.round {
  background-color: #34C759; /* iOS Green */
  border-color: #34C759;
}
input:checked + .slider.round:before {
  transform: translateX(22px);
}
[data-theme="light"] .slider.round {
  background-color: rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] input:checked + .slider.round {
  background-color: #34C759; 
}

/* Evitar resaltado de texto no deseado en headers */
.tool-hero {
  user-select: none;
  -webkit-user-select: none;
  background: transparent !important;
}
.tool-hero * {
  user-select: none;
  -webkit-user-select: none;
}
/* L�mite de ancho para las herramientas (dev-container) */
.dev-container { max-width: 800px !important; margin: 0 auto !important; }


/* Límite universal para todas las cajas de herramientas */
.dashboard-main > [class*="-container"], .dashboard-main > .jwt-tabs { max-width: 700px !important; margin: 0 auto !important; }


/* --- PREMIUM BUTTON DESIGN SYSTEM --- */
button[class*="btn-"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 12px 24px !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: none;
  outline: none;
}

button[class*="btn-"]:hover {
  transform: translateY(-3px) !important;
}

/* Botón Principal */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary, #3B82F6), #8B5CF6);
  color: white !important;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  border: none !important;
}
.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5) !important;
}

/* Botón Secundario */
.btn-secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: none !important;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: var(--text-muted) !important;
}

/* =========================================
   PREMIUM UI UPGRADES (Animations & Affiliates)
   ========================================= */

/* Fade-in Animation for Page Load */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.dashboard-area {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Enhanced Glassmorphism & Magnetic Hover */
.tool-card {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.tool-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  background: var(--bg-card-hover);
}

.btn-play, .btn-action {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-play:hover, .btn-action:hover {
  transform: translateY(-4px) scale(1.05);
  filter: brightness(1.1);
}

/* Affiliate Recommendation Box */
.affiliate-box {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 16px;
  padding: 30px;
  margin: 40px auto;
  max-width: 800px;
  text-align: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: fadeInUp 0.8s ease-out forwards;
}

.affiliate-box h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.affiliate-box h3 i {
  color: #F59E0B; /* Amazon Orange-ish */
}

.affiliate-box p {
  color: var(--text-secondary);
  margin-bottom: 25px;
  font-size: 15px;
  line-height: 1.6;
}

.affiliate-items {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.affiliate-item {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 150px;
  max-width: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.affiliate-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-secondary);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.2);
}

.affiliate-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
  border-radius: 8px;
  background: white;
  padding: 10px;
}

.affiliate-item h4 {
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.affiliate-btn {
  margin-top: auto;
  background: #F59E0B;
  color: #000;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  width: 100%;
}

/* =========================================
   KEYBOARD TEST SPECIFIC STYLES
   ========================================= */

.dashboard-area {
  max-width: 1400px !important;
  padding-left: 10px !important;
}

html body .dashboard-main .kb-test-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 40px;
  backdrop-filter: blur(10px);
  width: 100%; 
  max-width: 100% !important;
}

.kb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding: 15px 20px;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  color: #E2E8F0;
}

.kb-stat { font-size: 15px; color: #94A3B8; }
.kb-stat strong { color: #FFFFFF; font-size: 18px; margin-left: 8px; }

.kb-wrapper {
  background: #1A202C;
  padding: 15px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 10px 40px rgba(0,0,0,0.4) inset;
  overflow-x: auto;
  text-align: left;
}

.kb-row {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
  flex-wrap: nowrap;
  min-width: 800px;
}

.key {
  background: #2D3748;
  border: 1px solid #4A5568;
  color: #E2E8F0;
  border-radius: 6px;
  height: 38px;
  width: 38px;
  min-width: 38px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 4px 0 #1A202C, inset 0 1px 1px rgba(255,255,255,0.1);
  transition: all 0.1s ease;
  position: relative;
  user-select: none;
}

.key span.sub { font-size: 10px; color: #A0AEC0; margin-bottom: 2px; }

/* Dual Label Keys (Asian Keyboards) */
.key-dual {
  display: block; /* Override flex */
  position: relative;
}
.key-dual .eng {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 11px;
}
.key-dual .kor {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 11px;
  color: #A0AEC0;
}
.key-dual .kor-shift {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 9px;
  color: #A0AEC0;
}

.key-dual .local,
.key-dual .dual-br {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 11px;
  color: #A0AEC0;
}

.key-w125 { width: 48px; }
.key-w15 { width: 59px; }
.key-w175 { width: 69px; }
.key-w20 { width: 80px; }
.key-w225 { width: 90px; }
.key-w275 { width: 111px; }
.key-space { width: 258px; }
.key-h20 { height: 80px; }

.key.active {
  background: #3B82F6;
  border-color: #60A5FA;
  color: white;
  transform: translateY(4px);
  box-shadow: 0 0 0 #1A202C, 0 0 15px rgba(59, 130, 246, 0.6);
}

.key.tested {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10B981;
  color: #10B981;
  box-shadow: 0 4px 0 #064E3B, 0 0 10px rgba(16, 185, 129, 0.3);
}

.key.tested.active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #064E3B, 0 0 15px rgba(16, 185, 129, 0.8);
  background: #10B981;
  color: white;
}

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 25px; }

.stat-card {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.stat-card h3 {
  font-size: 16px; color: #94A3B8; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px;
}

.stat-data-row { display: flex; justify-content: space-between; margin-bottom: 10px; color: #94A3B8; font-size: 14px; }
.stat-data-row span:last-child { color: #FFFFFF; font-weight: 600; }

.btn-reset {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white; border: none; padding: 12px 24px; border-radius: 8px; font-weight: bold; cursor: pointer; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); transition: all 0.3s; width: 100%;
}
.btn-reset:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6); }

/* SEO Article */
.seo-article { max-width: 800px; margin-top: 40px; }
.premium-article { margin-top: 40px; }
.article-section { background: var(--bg-card); backdrop-filter: blur(12px); border: 1px solid var(--border-color); border-radius: 16px; padding: 32px; margin-bottom: 24px; }
.premium-article h2 { font-size: 24px; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; color: var(--text-primary); }
.premium-article h2 i { color: var(--accent-primary); background: rgba(59, 130, 246, 0.15); padding: 12px; border-radius: 12px; font-size: 20px; }
.premium-article p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; font-size: 15px; }
.premium-article ul { list-style-type: none; padding-left: 0; margin-bottom: 20px; }
.premium-article li { margin-bottom: 12px; display: flex; align-items: flex-start; gap: 12px; color: var(--text-secondary); line-height: 1.6; }
.premium-article li i { color: var(--accent-secondary); margin-top: 4px; }

/* Gamer Mode */
@keyframes rgb-rainbow { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(360deg); } }
.gamer-mode .kb-wrapper { background: #0f141e; border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.gamer-mode .key { background: #1a202c; border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 4px 6px rgba(0,0,0,0.4); }
.gamer-mode .key span { color: #00d4ff; text-shadow: 0 0 8px rgba(0, 212, 255, 0.6); animation: rgb-rainbow 10s linear infinite; }
.gamer-mode .key.active { background: #00d4ff !important; transform: scale(0.95); box-shadow: 0 0 20px #00d4ff !important; border-color: #00d4ff !important; animation: rgb-rainbow 2s linear infinite !important; }
.gamer-mode .key.active span { color: #0f141e !important; text-shadow: none !important; animation: none !important; }
.gamer-mode .key.tested { background: #131822; border-color: #00d4ff; box-shadow: inset 0 0 15px rgba(0, 212, 255, 0.1); animation: rgb-rainbow 10s linear infinite; }

/* Hero */
.tool-hero { text-align: center; margin-bottom: 40px; padding: 20px; position: relative; }
.tool-icon-wrapper { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; background: linear-gradient(135deg, #6366f1, #a855f7); color: #ffffff; border-radius: 20px; margin-bottom: 24px; box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4); font-size: 28px; }
.tool-hero .page-title { font-size: 3rem; font-weight: 800; margin-bottom: 15px; letter-spacing: -1px; line-height: 1.2; }
.tool-hero .gradient-text { background: linear-gradient(135deg, #6366f1, #ec4899); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.tool-hero .page-subtitle { color: var(--text-secondary); font-size: 1.2rem; max-width: 650px; margin: 0 auto; line-height: 1.6; }

/* ISO Enter Specifics */
.iso-enter-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  height: 80px;
  width: 69px;
  position: relative;
}
.key-enter-iso-top {
  width: 69px;
  height: 38px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
}
.key-enter-iso-bottom {
  width: 48px;
  height: 42px;
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
  box-shadow: 0 4px 0 #1A202C;
}
