/**
 * ICONS-SIDEBAR.CSS - Barra Lateral de Íconos
 * Ajedrez de Silicio - Barra de funciones avanzadas
 * 
 * Estilos para la columna izquierda con íconos de funciones principales
 */

/* ===== VARIABLES ===== */
:root {
    --icons-sidebar-w: 90px;  /* Ancho de la barra de íconos */
}

/* ===== BARRA DE ÍCONOS ===== */
.icons-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: var(--icons-sidebar-w);
    background: linear-gradient(180deg, var(--theme-bg-primary) 0%, var(--theme-bg-secondary) 100%);
    border-right: 1px solid var(--theme-border);
    padding: 20px 0;
    gap: 16px;
    box-sizing: border-box;
    position: relative;
    z-index: 100;
    box-shadow: 2px 0 10px var(--theme-shadow);
}

/* ===== LOGO EN LA BARRA ===== */
.icons-sidebar .logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--theme-border);
}

.icons-sidebar .logo-container a {
    display: inline-block;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.icons-sidebar .logo-container img {
    height: 70px;
    width: auto;
    transition: all var(--transition-normal);
    filter: drop-shadow(0 0 10px var(--theme-shadow-glow));
    cursor: pointer;
}

.icons-sidebar .logo-container a:hover img {
    transform: scale(1.08);
    filter: drop-shadow(0 0 15px var(--theme-shadow-glow));
}

/* ===== CONTENEDOR DE BOTONES DE ÍCONOS ===== */
.icons-sidebar .icon-buttons-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex: 1;
}

/* ===== BOTONES DE ÍCONOS ===== */
.icon-button {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-button-bg);
    border: 2px solid var(--theme-border);
    border-radius: 12px;
    color: var(--theme-accent-primary);
    font-size: 28px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 
        0 4px 12px var(--theme-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden; /* Ocultar contenido que se desborde del botón */
    padding: 0;
    line-height: 1;
    text-align: center;
}

/* Efecto de brillo al hover (::before) */
.icon-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--theme-shadow-glow), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

/* Mostrar el ícono usando el atributo data-icon (::after) */
.icon-button::after {
    content: attr(data-icon);
    display: block;
    font-size: 28px;
    line-height: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    transition: all 0.2s ease;
}

/* Ocultar ::after cuando hay SVG - solo en estado normal */
.icon-button[data-icon="svg"]:not(.active)::after {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Estado deshabilitado por otro entrenamiento activo */
.icon-button.disabled-by-other {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.2);
}

.icon-button.disabled-by-other:hover {
    transform: none;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.icon-button.disabled-by-other::before {
    display: none; /* Desactivar efecto de brillo al hover */
}

.icon-button.disabled-by-other .icon-svg {
    opacity: 0.65;
    filter: grayscale(0.2);
}

/* Estilos para SVG dentro de botones de íconos */
.icon-button .icon-svg {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--theme-accent-primary);
    filter: drop-shadow(0 2px 6px var(--theme-shadow-glow)) drop-shadow(0 0 8px var(--theme-shadow-glow));
}

/* Ajuste específico para Light Matrix: solo sombras negras, sin glow celeste */
[data-theme="light-matrix"] .icon-button .icon-svg {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.12)) 
            drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

/* Marco dorado para el peón del cerebro */
#memoryTrainingBtn .icon-svg .pawn-group,
#memoryTrainingBtn-mobile .icon-svg .pawn-group {
    stroke: var(--theme-accent-primary);
    stroke-width: 3;
    filter: drop-shadow(0 0 4px var(--theme-shadow-glow));
}

#memoryTrainingBtn .icon-svg .pawn-head,
#memoryTrainingBtn .icon-svg .pawn-neck,
#memoryTrainingBtn .icon-svg .pawn-body,
#memoryTrainingBtn .icon-svg .pawn-base-top,
#memoryTrainingBtn .icon-svg .pawn-base-bottom,
#memoryTrainingBtn-mobile .icon-svg .pawn-head,
#memoryTrainingBtn-mobile .icon-svg .pawn-neck,
#memoryTrainingBtn-mobile .icon-svg .pawn-body,
#memoryTrainingBtn-mobile .icon-svg .pawn-base-top,
#memoryTrainingBtn-mobile .icon-svg .pawn-base-bottom {
    stroke: var(--theme-accent-primary);
    stroke-width: 3;
    filter: drop-shadow(0 0 3px var(--theme-shadow-glow));
}

/* Ajuste específico para Light Matrix: solo sombras negras en elementos base */
[data-theme="light-matrix"] #memoryTrainingBtn .icon-svg .pawn-group,
[data-theme="light-matrix"] #memoryTrainingBtn-mobile .icon-svg .pawn-group,
[data-theme="light-matrix"] #memoryTrainingBtn .icon-svg .pawn-head,
[data-theme="light-matrix"] #memoryTrainingBtn .icon-svg .pawn-neck,
[data-theme="light-matrix"] #memoryTrainingBtn .icon-svg .pawn-body,
[data-theme="light-matrix"] #memoryTrainingBtn .icon-svg .pawn-base-top,
[data-theme="light-matrix"] #memoryTrainingBtn .icon-svg .pawn-base-bottom,
[data-theme="light-matrix"] #memoryTrainingBtn-mobile .icon-svg .pawn-head,
[data-theme="light-matrix"] #memoryTrainingBtn-mobile .icon-svg .pawn-neck,
[data-theme="light-matrix"] #memoryTrainingBtn-mobile .icon-svg .pawn-body,
[data-theme="light-matrix"] #memoryTrainingBtn-mobile .icon-svg .pawn-base-top,
[data-theme="light-matrix"] #memoryTrainingBtn-mobile .icon-svg .pawn-base-bottom {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

/* Reducir tamaño del reloj para que no esté tan al ras */
#playStockfishBtn .icon-svg,
#playStockfishBtn-mobile .icon-svg {
    width: 85%;
    height: 85%;
}

/* Reducir tamaño del ojo para que se vea más estético y holgado */
#blindTrainingBtn .icon-svg,
#blindTrainingBtn-mobile .icon-svg {
    width: 80%;
    height: 80%;
}

/* Reducir tamaño del cerebro/peón para que se vea más estético y holgado */
#memoryTrainingBtn .icon-svg,
#memoryTrainingBtn-mobile .icon-svg {
    width: 85%;
    height: 85%;
}

/* Reducir tamaño del reloj con peón para que se vea más estético y holgado */
#positionMemoryBtn .icon-svg,
#positionMemoryBtn-mobile .icon-svg {
    width: 80%;
    height: 80%;
}

/* Reducir tamaño del rayo para que se vea más estético y holgado */
#reflexTrainingBtn .icon-svg,
#reflexTrainingBtn-mobile .icon-svg {
    width: 85%;
    height: 85%;
}

/* Efectos hover para SVG - Sutil y elegante */
.icon-button:hover .icon-svg {
    transform: translate(-50%, -50%) scale(1.05);
    filter: drop-shadow(0 3px 8px var(--theme-shadow-glow)) 
            drop-shadow(0 0 12px var(--theme-shadow-glow));
}

/* Ajuste específico para Light Matrix: solo sombras negras en hover, sin glow celeste */
[data-theme="light-matrix"] .icon-button:hover .icon-svg {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2)) 
            drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15))
            drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Ajuste específico para Falling Code Matrix: íconos con borde negro y sombra fuerte para contraste */
html[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg,
body[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg {
    filter: drop-shadow(0 0 0 3px rgba(0, 0, 0, 1))
            drop-shadow(0 0 0 4px rgba(0, 0, 0, 0.9))
            drop-shadow(0 0 8px rgba(0, 0, 0, 1))
            drop-shadow(0 0 12px rgba(0, 0, 0, 0.8))
            drop-shadow(0 0 16px rgba(0, 255, 65, 0.6))
            drop-shadow(0 4px 8px rgba(0, 0, 0, 1));
    opacity: 1 !important;
}

html[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg path,
html[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg circle,
html[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg rect,
html[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg line,
html[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg polygon,
html[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg g,
body[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg path,
body[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg circle,
body[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg rect,
body[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg line,
body[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg polygon,
body[data-theme="falling-code-matrix"] .icon-button:hover .icon-svg g {
    stroke: #000000 !important;
    stroke-width: 2px !important;
    paint-order: stroke fill !important;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 1)) 
            drop-shadow(0 0 8px rgba(0, 0, 0, 0.8));
}

html[data-theme="falling-code-matrix"] .icon-button .icon-svg,
body[data-theme="falling-code-matrix"] .icon-button .icon-svg {
    filter: drop-shadow(0 2px 6px rgba(0, 255, 65, 0.8)) 
            drop-shadow(0 0 8px rgba(0, 255, 65, 0.6))
            drop-shadow(0 0 0 2px rgba(0, 0, 0, 0.8));
    opacity: 1 !important;
}

/* Aplicar también a icon-buttons-mobile */
html[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg,
body[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg {
    filter: drop-shadow(0 0 0 3px rgba(0, 0, 0, 1))
            drop-shadow(0 0 0 4px rgba(0, 0, 0, 0.9))
            drop-shadow(0 0 8px rgba(0, 0, 0, 1))
            drop-shadow(0 0 12px rgba(0, 0, 0, 0.8))
            drop-shadow(0 0 16px rgba(0, 255, 65, 0.6))
            drop-shadow(0 4px 8px rgba(0, 0, 0, 1));
    opacity: 1 !important;
}

html[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg path,
html[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg circle,
html[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg rect,
html[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg line,
html[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg polygon,
html[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg g,
body[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg path,
body[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg circle,
body[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg rect,
body[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg line,
body[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg polygon,
body[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg g {
    stroke: #000000 !important;
    stroke-width: 2px !important;
    paint-order: stroke fill !important;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 1)) 
            drop-shadow(0 0 8px rgba(0, 0, 0, 0.8));
}

html[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button .icon-svg,
body[data-theme="falling-code-matrix"] .icon-buttons-mobile .icon-button .icon-svg {
    filter: drop-shadow(0 2px 6px rgba(0, 255, 65, 0.8)) 
            drop-shadow(0 0 8px rgba(0, 255, 65, 0.6))
            drop-shadow(0 0 0 2px rgba(0, 0, 0, 0.8));
    opacity: 1 !important;
}

/* Ajuste específico para Rose Matrix: íconos con contorno oscuro/blanco y sombra fuerte para contraste */
html[data-theme="rose-matrix"] .icon-button:hover .icon-svg,
body[data-theme="rose-matrix"] .icon-button:hover .icon-svg {
    filter: drop-shadow(0 0 0 3px rgba(0, 0, 0, 1))
            drop-shadow(0 0 0 4px rgba(0, 0, 0, 0.9))
            drop-shadow(0 0 8px rgba(0, 0, 0, 1))
            drop-shadow(0 0 12px rgba(0, 0, 0, 0.8))
            drop-shadow(0 0 16px rgba(255, 20, 147, 0.6))
            drop-shadow(0 4px 8px rgba(0, 0, 0, 1));
    opacity: 1 !important;
}

html[data-theme="rose-matrix"] .icon-button:hover .icon-svg path,
html[data-theme="rose-matrix"] .icon-button:hover .icon-svg circle,
html[data-theme="rose-matrix"] .icon-button:hover .icon-svg rect,
html[data-theme="rose-matrix"] .icon-button:hover .icon-svg line,
html[data-theme="rose-matrix"] .icon-button:hover .icon-svg polygon,
html[data-theme="rose-matrix"] .icon-button:hover .icon-svg g,
body[data-theme="rose-matrix"] .icon-button:hover .icon-svg path,
body[data-theme="rose-matrix"] .icon-button:hover .icon-svg circle,
body[data-theme="rose-matrix"] .icon-button:hover .icon-svg rect,
body[data-theme="rose-matrix"] .icon-button:hover .icon-svg line,
body[data-theme="rose-matrix"] .icon-button:hover .icon-svg polygon,
body[data-theme="rose-matrix"] .icon-button:hover .icon-svg g {
    stroke: #000000 !important;
    stroke-width: 2px !important;
    paint-order: stroke fill !important;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 1)) 
            drop-shadow(0 0 8px rgba(0, 0, 0, 0.8));
}

html[data-theme="rose-matrix"] .icon-button .icon-svg,
body[data-theme="rose-matrix"] .icon-button .icon-svg {
    filter: drop-shadow(0 2px 6px rgba(255, 20, 147, 0.8)) 
            drop-shadow(0 0 8px rgba(255, 20, 147, 0.6))
            drop-shadow(0 0 0 2px rgba(0, 0, 0, 0.8));
    opacity: 1 !important;
}

/* Aplicar también a icon-buttons-mobile */
html[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg,
body[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg {
    filter: drop-shadow(0 0 0 3px rgba(0, 0, 0, 1))
            drop-shadow(0 0 0 4px rgba(0, 0, 0, 0.9))
            drop-shadow(0 0 8px rgba(0, 0, 0, 1))
            drop-shadow(0 0 12px rgba(0, 0, 0, 0.8))
            drop-shadow(0 0 16px rgba(255, 20, 147, 0.6))
            drop-shadow(0 4px 8px rgba(0, 0, 0, 1));
    opacity: 1 !important;
}

html[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg path,
html[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg circle,
html[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg rect,
html[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg line,
html[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg polygon,
html[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg g,
body[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg path,
body[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg circle,
body[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg rect,
body[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg line,
body[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg polygon,
body[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button:hover .icon-svg g {
    stroke: #000000 !important;
    stroke-width: 2px !important;
    paint-order: stroke fill !important;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 1)) 
            drop-shadow(0 0 8px rgba(0, 0, 0, 0.8));
}

html[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button .icon-svg,
body[data-theme="rose-matrix"] .icon-buttons-mobile .icon-button .icon-svg {
    filter: drop-shadow(0 2px 6px rgba(255, 20, 147, 0.8)) 
            drop-shadow(0 0 8px rgba(255, 20, 147, 0.6))
            drop-shadow(0 0 0 2px rgba(0, 0, 0, 0.8));
    opacity: 1 !important;
}

/* Animación muy sutil del peón en hover */
.icon-button:hover .icon-svg .pawn-group {
    filter: drop-shadow(0 0 6px var(--theme-shadow-glow));
}

/* Ajuste específico para Light Matrix: solo sombras negras en elementos internos */
[data-theme="light-matrix"] .icon-button:hover .icon-svg .pawn-group,
[data-theme="light-matrix"] .icon-button:hover .icon-svg .circuit-line,
[data-theme="light-matrix"] .icon-button:hover .icon-svg .circuit-node,
[data-theme="light-matrix"] .icon-button:hover .icon-svg .clock-hand,
[data-theme="light-matrix"] .icon-button:hover .icon-svg .clock-face,
[data-theme="light-matrix"] .icon-button:hover .icon-svg .clock-center,
[data-theme="light-matrix"] .icon-button:hover .icon-svg .clock-base,
[data-theme="light-matrix"] .icon-button:hover .icon-svg .clock-button,
[data-theme="light-matrix"] .icon-button:hover .icon-svg .eye-outline,
[data-theme="light-matrix"] .icon-button:hover .icon-svg .eye-pupil,
[data-theme="light-matrix"] .icon-button:hover .icon-svg .eye-slash,
[data-theme="light-matrix"] .icon-button:hover .icon-svg .brain-group,
[data-theme="light-matrix"] .icon-button:hover .icon-svg .brain-path {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Animación sutil de circuitos en hover */
.icon-button:hover .icon-svg .circuit-line {
    filter: drop-shadow(0 0 3px var(--theme-shadow-glow));
    opacity: 0.9;
}

.icon-button:hover .icon-svg .circuit-node {
    filter: drop-shadow(0 0 4px var(--theme-shadow-glow));
    opacity: 0.95;
}

/* Efectos hover para el reloj */
.icon-button:hover .icon-svg .clock-hand {
    filter: drop-shadow(0 0 3px var(--theme-shadow-glow));
    animation: clock-hand-shimmer 2s ease-in-out infinite;
}

.icon-button:hover .icon-svg .clock-face {
    fill: black !important;
    filter: drop-shadow(0 0 4px var(--theme-shadow-glow));
}

.icon-button:hover .icon-svg .clock-center {
    filter: drop-shadow(0 0 5px var(--theme-shadow-glow));
    animation: clock-center-pulse 1.5s ease-in-out infinite;
}

.icon-button:hover .icon-svg .clock-base {
    filter: drop-shadow(0 0 2px var(--theme-shadow-glow));
}

.icon-button:hover .icon-svg .clock-button {
    filter: drop-shadow(0 0 2px var(--theme-shadow-glow));
}

/* Efectos hover para el ojo */
.icon-button:hover .icon-svg .eye-outline {
    filter: drop-shadow(0 0 4px var(--theme-shadow-glow));
    animation: eye-outline-glow 2s ease-in-out infinite;
}

.icon-button:hover .icon-svg .eye-pupil {
    filter: drop-shadow(0 0 5px var(--theme-shadow-glow));
    animation: eye-pupil-pulse 1.5s ease-in-out infinite;
}

.icon-button:hover .icon-svg .eye-slash {
    filter: drop-shadow(0 0 3px var(--theme-shadow-glow));
    stroke-width: 6;
}

/* Efectos hover para cerebro y peón */
.icon-button:hover .icon-svg .brain-group {
    filter: drop-shadow(0 0 4px var(--theme-shadow-glow));
    animation: brain-glow 2s ease-in-out infinite;
}

.icon-button:hover .icon-svg .brain-path {
    filter: drop-shadow(0 0 2px var(--theme-shadow-glow));
}

.icon-button:hover .icon-svg .pawn-group {
    filter: drop-shadow(0 0 5px var(--theme-shadow-glow));
}

.icon-button:hover .icon-svg .pawn-head,
.icon-button:hover .icon-svg .pawn-neck,
.icon-button:hover .icon-svg .pawn-body,
.icon-button:hover .icon-svg .pawn-base-top,
.icon-button:hover .icon-svg .pawn-base-bottom {
    filter: drop-shadow(0 0 3px var(--theme-shadow-glow));
    stroke: var(--theme-accent-primary);
    stroke-width: 1.5;
}

/* Efectos hover para el reloj con peón (Recordar Posición) */
.icon-button:hover .icon-svg .clock-face-outer {
    filter: drop-shadow(0 0 4px var(--theme-shadow-glow));
}

.icon-button:hover .icon-svg .clock-face-inner {
    fill: black !important;
    filter: drop-shadow(0 0 3px var(--theme-shadow-glow));
}

.icon-button:hover .icon-svg .clock-hands-group {
    filter: drop-shadow(0 0 3px var(--theme-shadow-glow));
    animation: clock-hands-shimmer 2s ease-in-out infinite;
}

.icon-button:hover .icon-svg .clock-hand-hour,
.icon-button:hover .icon-svg .clock-hand-minute {
    filter: drop-shadow(0 0 3px var(--theme-shadow-glow));
}

.icon-button:hover .icon-svg .clock-center,
.icon-button:hover .icon-svg .clock-center-inner {
    filter: drop-shadow(0 0 4px var(--theme-shadow-glow));
    animation: clock-center-pulse 1.5s ease-in-out infinite;
}

.icon-button:hover .icon-svg .clock-markers circle {
    filter: drop-shadow(0 0 2px var(--theme-shadow-glow));
}

.icon-button:hover .icon-svg .clock-base-group {
    filter: drop-shadow(0 0 2px var(--theme-shadow-glow));
}

/* Efectos hover para el rayo (Entrenar Reflejos) */
.icon-button:hover .icon-svg .lightning-bolt {
    filter: drop-shadow(0 0 5px var(--theme-shadow-glow)) drop-shadow(0 0 10px var(--theme-shadow-glow));
    animation: lightning-shimmer 1.5s ease-in-out infinite;
}

/* Ocultar SVG cuando el botón está activo y tiene data-icon-stop="stop" */
.icon-button.active[data-icon-stop="stop"] .icon-svg {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Animación cuando está activo - Rojo elegante (solo para botones que no usan stop) */
.icon-button.active:not([data-icon-stop="stop"]) .icon-svg {
    color: #ff3333 !important;
    filter: drop-shadow(0 0 10px rgba(255, 51, 51, 0.9)) 
            drop-shadow(0 0 20px rgba(255, 51, 51, 0.6))
            drop-shadow(0 0 30px rgba(255, 51, 51, 0.3)) !important;
    animation: svg-active-pulse 2s ease-in-out infinite !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 3 !important;
}

.icon-button.active .icon-svg .pawn-group {
    animation: pawn-active-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 51, 51, 1));
}

.icon-button.active .icon-svg .circuit-line {
    stroke: #ff3333 !important;
    stroke-dasharray: 4, 2;
    animation: circuit-pulse-active 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(255, 51, 51, 1));
}

.icon-button.active .icon-svg .circuit-node {
    fill: #ff3333 !important;
    animation: node-pulse-active 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 51, 51, 1));
}

.icon-button.active .icon-svg .pawn-head,
.icon-button.active .icon-svg .pawn-neck,
.icon-button.active .icon-svg .pawn-body,
.icon-button.active .icon-svg .pawn-base {
    fill: #ff3333 !important;
}

/* Efectos cuando el reloj está activo (solo para botones que no usan stop) */
.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-hand {
    stroke: #ff3333 !important;
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 4px rgba(255, 51, 51, 0.8));
    animation: clock-hand-active 1.5s ease-in-out infinite;
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-face {
    fill: black !important;
    filter: drop-shadow(0 0 5px rgba(255, 51, 51, 0.6));
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-center {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 6px rgba(255, 51, 51, 1));
    animation: clock-center-active 1.5s ease-in-out infinite;
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-base,
.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-button {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 3px rgba(255, 51, 51, 0.7));
}

/* Efectos cuando el ojo está activo (solo para botones que no usan stop) */
.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .eye-outline {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 5px rgba(255, 51, 51, 0.8));
    animation: eye-outline-active 2s ease-in-out infinite;
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .eye-pupil {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 6px rgba(255, 51, 51, 1));
    animation: eye-pupil-active 1.5s ease-in-out infinite;
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .eye-slash {
    stroke: #ff3333 !important;
    filter: drop-shadow(0 0 4px rgba(255, 51, 51, 0.9));
    stroke-width: 6;
}

/* Efectos cuando cerebro y peón están activos (solo para botones que no usan stop) */
.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .brain-group {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 5px rgba(255, 51, 51, 0.8));
    animation: brain-active 2s ease-in-out infinite;
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .brain-path {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 3px rgba(255, 51, 51, 0.7));
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .pawn-group {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 6px rgba(255, 51, 51, 1));
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .pawn-head,
.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .pawn-neck,
.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .pawn-body,
.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .pawn-base-top,
.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .pawn-base-bottom {
    fill: #ff3333 !important;
    stroke: #ff3333 !important;
    filter: drop-shadow(0 0 4px rgba(255, 51, 51, 0.8));
}

/* Marco dorado más intenso para el peón del cerebro en hover */
#memoryTrainingBtn:hover .icon-svg .pawn-group,
#memoryTrainingBtn-mobile:hover .icon-svg .pawn-group {
    stroke: var(--theme-accent-primary);
    stroke-width: 3.5;
    filter: drop-shadow(0 0 6px var(--theme-shadow-glow));
}

#memoryTrainingBtn:hover .icon-svg .pawn-head,
#memoryTrainingBtn:hover .icon-svg .pawn-neck,
#memoryTrainingBtn:hover .icon-svg .pawn-body,
#memoryTrainingBtn:hover .icon-svg .pawn-base-top,
#memoryTrainingBtn:hover .icon-svg .pawn-base-bottom,
#memoryTrainingBtn-mobile:hover .icon-svg .pawn-head,
#memoryTrainingBtn-mobile:hover .icon-svg .pawn-neck,
#memoryTrainingBtn-mobile:hover .icon-svg .pawn-body,
#memoryTrainingBtn-mobile:hover .icon-svg .pawn-base-top,
#memoryTrainingBtn-mobile:hover .icon-svg .pawn-base-bottom {
    stroke: var(--theme-accent-primary);
    stroke-width: 3.5;
    filter: drop-shadow(0 0 5px var(--theme-shadow-glow));
}

/* Efectos cuando el reloj con peón está activo (solo para botones que no usan stop) */
.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-face-outer {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 5px rgba(255, 51, 51, 0.8));
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-face-inner {
    fill: black !important;
    filter: drop-shadow(0 0 4px rgba(255, 51, 51, 0.5));
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-hands-group {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 4px rgba(255, 51, 51, 0.9));
    animation: clock-hands-active 1.5s ease-in-out infinite;
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-hand-hour,
.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-hand-minute {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 4px rgba(255, 51, 51, 0.9));
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-center,
.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-center-inner {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 6px rgba(255, 51, 51, 1));
    animation: clock-center-active 1.5s ease-in-out infinite;
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-markers circle {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 3px rgba(255, 51, 51, 0.8));
}

.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .clock-base-group {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 3px rgba(255, 51, 51, 0.7));
}

/* Efectos cuando el rayo está activo (solo para botones que no usan stop) */
.icon-button.active:not([data-icon-stop="stop"]) .icon-svg .lightning-bolt {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 6px rgba(255, 51, 51, 1)) drop-shadow(0 0 12px rgba(255, 51, 51, 0.6));
    animation: lightning-active 1.5s ease-in-out infinite;
}

/* Animaciones elegantes y sofisticadas */
@keyframes pawn-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

@keyframes pawn-active-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 12px rgba(255, 51, 51, 1));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 16px rgba(255, 51, 51, 1)) drop-shadow(0 0 24px rgba(255, 51, 51, 0.8));
    }
}

@keyframes circuit-pulse {
    0%, 100% {
        opacity: 0.7;
        stroke-dashoffset: 0;
    }
    50% {
        opacity: 1;
        stroke-dashoffset: -8;
    }
}

@keyframes node-pulse {
    0%, 100% {
        opacity: 0.9;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes circuit-pulse-active {
    0%, 100% {
        opacity: 0.9;
        stroke-dashoffset: 0;
    }
    50% {
        opacity: 1;
        stroke-dashoffset: -10;
    }
}

@keyframes node-pulse-active {
    0%, 100% {
        opacity: 0.95;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.35);
    }
}

@keyframes svg-active-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 51, 51, 0.9)) 
                drop-shadow(0 0 20px rgba(255, 51, 51, 0.6))
                drop-shadow(0 0 30px rgba(255, 51, 51, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 14px rgba(255, 51, 51, 1)) 
                drop-shadow(0 0 28px rgba(255, 51, 51, 0.8))
                drop-shadow(0 0 40px rgba(255, 51, 51, 0.5));
    }
}

/* Animaciones para el reloj */
@keyframes clock-hand-shimmer {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 3px var(--theme-shadow-glow));
    }
    50% {
        opacity: 0.9;
        filter: drop-shadow(0 0 5px var(--theme-shadow-glow));
    }
}

@keyframes clock-center-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.9;
    }
}

@keyframes clock-hand-active {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 4px rgba(255, 51, 51, 0.8));
    }
    50% {
        opacity: 0.9;
        filter: drop-shadow(0 0 6px rgba(255, 51, 51, 1));
    }
}

@keyframes clock-center-active {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.9;
    }
}

/* Animaciones para el reloj con peón (Recordar Posición) */
@keyframes clock-hands-shimmer {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.7));
    }
    50% {
        opacity: 0.9;
        filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.9));
    }
}

@keyframes clock-hands-active {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 4px rgba(255, 51, 51, 0.9));
    }
    50% {
        opacity: 0.9;
        filter: drop-shadow(0 0 6px rgba(255, 51, 51, 1));
    }
}

/* Animaciones para el rayo (Entrenar Reflejos) */
@keyframes lightning-shimmer {
    0%, 100% {
        filter: drop-shadow(0 0 5px var(--theme-shadow-glow)) drop-shadow(0 0 10px var(--theme-shadow-glow));
        opacity: 1;
    }
    50% {
        filter: drop-shadow(0 0 8px var(--theme-shadow-glow)) drop-shadow(0 0 15px var(--theme-shadow-glow));
        opacity: 0.95;
    }
}

@keyframes lightning-active {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(255, 51, 51, 1)) drop-shadow(0 0 12px rgba(255, 51, 51, 0.6));
        opacity: 1;
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(255, 51, 51, 1)) drop-shadow(0 0 20px rgba(255, 51, 51, 0.8));
        opacity: 0.95;
    }
}

/* Animaciones para el ojo */
@keyframes eye-outline-glow {
    0%, 100% {
        filter: drop-shadow(0 0 4px var(--theme-shadow-glow));
        opacity: 1;
    }
    50% {
        filter: drop-shadow(0 0 6px var(--theme-shadow-glow));
        opacity: 0.95;
    }
}

@keyframes eye-pupil-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.9;
    }
}

@keyframes eye-outline-active {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(255, 51, 51, 0.8));
        opacity: 1;
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(255, 51, 51, 1));
        opacity: 0.95;
    }
}

@keyframes eye-pupil-active {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.9;
    }
}

/* Animaciones para cerebro y peón */
@keyframes brain-glow {
    0%, 100% {
        filter: drop-shadow(0 0 4px var(--theme-shadow-glow));
        opacity: 1;
    }
    50% {
        filter: drop-shadow(0 0 6px var(--theme-shadow-glow));
        opacity: 0.95;
    }
}

@keyframes brain-active {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(255, 51, 51, 0.8));
        opacity: 1;
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(255, 51, 51, 1));
        opacity: 0.95;
    }
}

/* Cuando el botón está activo, mostrar el ícono de detener */
/* PRIMERO: Caso especial para botones con data-icon-stop="stop" - debe ir ANTES */
.icon-button.active[data-icon-stop="stop"]::after {
    content: '' !important;
    width: 20px !important;
    height: 20px !important;
    background: var(--theme-accent-primary) !important; /* Color de acento para destacar sobre fondo rojo */
    border-radius: 3px !important;
    display: block !important;
    margin: 0 auto !important;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    box-shadow: 
        0 0 8px var(--theme-shadow-glow),
        0 0 16px var(--theme-shadow-glow),
        0 0 24px var(--theme-shadow-glow),
        inset 0 1px 2px rgba(255, 255, 255, 0.3) !important;
    animation: pulse-gold-stop 2s ease-in-out infinite !important;
    filter: none !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    z-index: 2 !important;
}

/* SEGUNDO: Para botones activos que NO son "stop" y NO son SVG, mostrar emoji */
.icon-button.active:not([data-icon-stop="stop"]):not([data-icon="svg"])::after {
    content: attr(data-icon-stop) !important;
    color: #ff3333 !important;
    filter: drop-shadow(0 0 6px rgba(255, 51, 51, 0.8)) drop-shadow(0 0 12px rgba(255, 51, 51, 0.4)) !important;
    animation: pulse-red 2s ease-in-out infinite !important;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border-radius: 0 !important;
    margin: 0 !important;
    font-size: 28px !important;
    line-height: 1 !important;
}

/* Animación de pulso para el ícono de detener (emoji) */
@keyframes pulse-red {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(255, 51, 51, 0.8)) drop-shadow(0 0 12px rgba(255, 51, 51, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(255, 51, 51, 1)) drop-shadow(0 0 20px rgba(255, 51, 51, 0.6));
    }
}

/* Animación de pulso para el ícono de STOP (cuadrado rojo - para botones sin fondo rojo) */
@keyframes pulse-red-stop {
    0%, 100% {
        box-shadow: 
            0 0 8px rgba(255, 51, 51, 0.8),
            0 0 16px rgba(255, 51, 51, 0.4),
            inset 0 1px 2px rgba(255, 255, 255, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 0 12px rgba(255, 51, 51, 1),
            0 0 24px rgba(255, 51, 51, 0.6),
            inset 0 1px 2px rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
    }
}

/* Animación de pulso para el ícono de STOP dorado (cuando el botón tiene fondo rojo) */
@keyframes pulse-gold-stop {
    0%, 100% {
        box-shadow: 
            0 0 10px var(--theme-shadow-glow),
            0 0 20px var(--theme-shadow-glow),
            0 0 30px var(--theme-shadow-glow),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 0 14px var(--theme-shadow-glow),
            0 0 28px var(--theme-shadow-glow),
            0 0 40px var(--theme-shadow-glow),
            inset 0 1px 2px rgba(255, 255, 255, 0.4);
        transform: scale(1.05);
    }
}

/* Borde rojo cuando está activo */
.icon-button.active {
    border-color: var(--color-error) !important;
    box-shadow: 
        0 4px 12px var(--theme-shadow),
        0 0 0 2px var(--color-error),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Los tooltips se manejan completamente con JavaScript usando el tooltip flotante global */

.icon-button:hover::before {
    left: 100%;
}

.icon-button:hover {
    background: var(--theme-button-hover);
    border-color: var(--theme-accent-primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 20px var(--theme-shadow),
        0 0 0 2px var(--theme-shadow-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: var(--theme-button-text-hover);
}

.icon-button:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 4px 12px var(--theme-shadow),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Estado activo (ej: Stockfish activo) */
.icon-button.active {
    background: var(--theme-button-hover);
    border-color: var(--theme-accent-primary);
    color: var(--theme-button-text-hover);
    box-shadow: 
        0 0 20px var(--theme-shadow-glow),
        0 4px 12px var(--theme-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Punto amarillo de activación - usar ::before en lugar de ::after para no interferir */
/* Solo mostrar si NO es un botón con SVG */
.icon-button.active:not([data-icon-stop="stop"]):not([data-icon="svg"])::before {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--theme-accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--theme-shadow-glow);
    animation: pulse-dot 2s ease infinite;
    z-index: 3;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}


/* ===== RESPONSIVIDAD ===== */
/* Pantallas muy grandes */
@media (min-width: 1920px) {
    :root {
        --icons-sidebar-w: 100px;
    }
    
    .icon-button {
        width: 72px;
        height: 72px;
        font-size: 32px;
    }
}

/* Pantallas medianas */
@media (max-width: 1400px) {
    :root {
        --icons-sidebar-w: 80px;
    }
    
    .icon-button {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
    
    .icons-sidebar .logo-container img {
        height: 60px;
    }
}

/* Ocultar barra de íconos móvil en desktop */
.icon-buttons-mobile {
    display: none;
}

/* Estilos para móviles */
@media (max-width: 768px) {
    /* Ocultar sidebar lateral en móviles */
    .icons-sidebar {
        display: none;
    }
    
    /* Mostrar barra de íconos horizontal para móviles */
    .icon-buttons-mobile {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 8px 0;
        margin-top: 8px;
        margin-bottom: 8px;
        order: 2; /* Después de .pgn-buttons que tiene order: 1 */
    }
    
    /* Ajustar tamaño de íconos para móviles */
    .icon-buttons-mobile .icon-button {
        width: 48px;
        height: 48px;
        font-size: 22px;
        min-width: 48px;
        flex-shrink: 0;
    }
    
    /* Ajustar tamaño del ícono de STOP en móviles */
    .icon-buttons-mobile .icon-button.active[data-icon-stop="stop"]::after {
        width: 16px !important;
        height: 16px !important;
        /* Mantener el color de acento en móviles también */
        background: var(--theme-accent-primary) !important;
        box-shadow: 
            0 0 6px var(--theme-shadow-glow),
            0 0 12px var(--theme-shadow-glow),
            0 0 18px var(--theme-shadow-glow),
            inset 0 1px 2px rgba(255, 255, 255, 0.3) !important;
        animation: pulse-gold-stop 2s ease-in-out infinite !important;
    }
    
    /* Ajustar SVG en móviles */
    .icon-buttons-mobile .icon-button .icon-svg {
        width: 36px;
        height: 36px;
    }
    
    /* Reducir tamaño del reloj en móviles también */
    .icon-buttons-mobile #playStockfishBtn-mobile .icon-svg {
        width: 31px;
        height: 31px;
    }
    
    /* Reducir tamaño del ojo en móviles también */
    .icon-buttons-mobile #blindTrainingBtn-mobile .icon-svg {
        width: 29px;
        height: 29px;
    }
    
    /* Reducir tamaño del cerebro/peón en móviles también */
    .icon-buttons-mobile #memoryTrainingBtn-mobile .icon-svg {
        width: 31px;
        height: 31px;
    }
    
    /* Reducir tamaño del reloj con peón en móviles también */
    .icon-buttons-mobile #positionMemoryBtn-mobile .icon-svg {
        width: 29px;
        height: 29px;
    }
    
    /* Reducir tamaño del rayo en móviles también */
    .icon-buttons-mobile #reflexTrainingBtn-mobile .icon-svg {
        width: 31px;
        height: 31px;
    }
    
    /* Ajustar animaciones de circuitos en móviles */
    .icon-buttons-mobile .icon-button:hover .icon-svg {
        transform: translate(-50%, -50%) scale(1.08);
    }
}

/* ===== BOTÓN DE AJUSTES EN SIDEBAR (DESKTOP) ===== */
/* Estilos específicos para el botón de ajustes en la barra lateral */
#contextMenuTriggerBtn-desktop {
    /* Mantener consistencia con otros botones */
    position: relative;
    z-index: 30002 !important; /* Más alto que el menú para estar siempre accesible */
}

/* Tamaño del SVG de ajustes en sidebar - más grande */
#contextMenuTriggerBtn-desktop .icon-svg {
    width: 36px;
    height: 36px;
}

/* Efectos hover para el botón de ajustes */
#contextMenuTriggerBtn-desktop:hover .icon-svg {
    transform: translate(-50%, -50%) scale(1.05) rotate(15deg);
    filter: drop-shadow(0 3px 8px var(--theme-shadow-glow)) 
            drop-shadow(0 0 12px var(--theme-shadow-glow));
}

/* Estado activo del botón de ajustes */
#contextMenuTriggerBtn-desktop.active {
    background: var(--theme-button-hover);
    border-color: var(--theme-accent-primary);
    box-shadow: 
        0 4px 12px var(--theme-shadow),
        0 0 0 2px var(--theme-shadow-glow);
}

#contextMenuTriggerBtn-desktop.active .icon-svg {
    filter: drop-shadow(0 0 8px var(--theme-shadow-glow));
    animation: settingsIconRotate 3s linear infinite;
}

@keyframes settingsIconRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Estilos para elementos SVG del botón de ajustes */
#contextMenuTriggerBtn-desktop .icon-svg .settings-gear {
    fill: currentColor;
}

#contextMenuTriggerBtn-desktop .icon-svg .settings-knight {
    fill: currentColor;
}

/* Ocultar botón de ajustes en sidebar en móviles */
@media (max-width: 768px) {
    #contextMenuTriggerBtn-desktop {
        display: none !important;
    }
}