/* ==================== */
/* BOTONES DE CONTROL DE TEMA Y ANIMACIÓN */
/* ==================== */
.theme-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    position: absolute;
    right: 0;
    margin-top: 1.3rem;
}

.theme-toggle-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    cursor: pointer;
    color: #4A4A4A;
    font-size: 1.25rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9AA2 0%, #FFB7B2 100%);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 0;
}

.theme-toggle-btn i {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 154, 162, 0.3);
    border-color: #FFB7B2;
}

.theme-toggle-btn:hover::before {
    width: 100%;
    height: 100%;
}

.theme-toggle-btn:hover i {
    color: #fff;
    transform: rotate(10deg) scale(1.1);
}

.theme-toggle-btn:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 3px 10px rgba(255, 154, 162, 0.2);
}

#animationToggle:hover i {
    animation: magicWand 0.6s ease-in-out;
}

@keyframes magicWand {

    0%,
    100% {
        transform: rotate(0deg) scale(1.1);
    }

    25% {
        transform: rotate(-15deg) scale(1.15);
    }

    75% {
        transform: rotate(15deg) scale(1.15);
    }
}

#themePaletteToggle:hover i {
    animation: spinPalette 0.8s ease-in-out;
}

@keyframes spinPalette {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(180deg);
    }
}

.settings-dropdown {
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    padding: 10px;
    border-radius: 30px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    align-items: center;
}

.settings-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

#settingsToggle i {
    transition: transform 0.5s ease;
}

#settingsToggle.active i {
    transform: rotate(180deg);
}

.theme-selector-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.theme-options {
    display: none;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.05);
    padding: 8px;
    border-radius: 20px;
    animation: slideDown 0.3s ease;
}

.theme-options.active {
    display: flex;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.theme-option:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.theme-option.active {
    border-color: #FF9AA2;
    transform: scale(1.1);
    box-shadow: 0 0 0 2px rgba(255, 154, 162, 0.4);
}

/* ==================== */
/* COLOR CUSTOMIZER */
/* ==================== */

.color-customizer-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.color-customizer-btn:hover {
    transform: scale(1.3) !important;
}

.color-customizer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2000;
}

.color-customizer-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Panel con transparencia alta */
.color-customizer-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    display: none;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    min-width: 300px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 2001;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.color-customizer-panel.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.color-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
}

.color-panel-header h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #222;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.color-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(245, 245, 245, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.color-close-btn:hover {
    background: #FF9AA2;
    color: white;
    transform: rotate(90deg);
}

.color-picker-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.color-picker-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.color-picker-group input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 2px;
    border: 2px solid rgba(150, 150, 150, 0.5);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin: 0;
}

.color-picker-group input[type="color"]:hover {
    border-color: #FF9AA2;
    box-shadow: 0 0 0 3px rgba(255, 154, 162, 0.3);
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-input-wrapper input[type="color"] {
    width: 60px;
    height: 40px;
    flex-shrink: 0;
}

.color-input-wrapper input[type="range"] {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.1), #333);
    border-radius: 4px;
    margin: 0;
    padding: 0;
}

.color-input-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #fff;
    border: 2px solid #FF9AA2;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.color-input-wrapper input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #fff;
    border: 2px solid #FF9AA2;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.opacity-value {
    font-size: 0.8rem;
    color: #333;
    min-width: 40px;
    text-align: right;
    font-weight: 600;
}

.color-reset-btn-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background: rgba(245, 245, 245, 0.7);
    border: 2px solid rgba(150, 150, 150, 0.4);
    border-radius: 10px;
    cursor: pointer;
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.color-reset-btn-full:hover {
    background: #FF9AA2;
    color: white;
    border-color: #FF9AA2;
}

.color-customizer-panel::-webkit-scrollbar {
    width: 6px;
}

.color-customizer-panel::-webkit-scrollbar-track {
    background: rgba(200, 200, 200, 0.3);
    border-radius: 3px;
}

.color-customizer-panel::-webkit-scrollbar-thumb {
    background: rgba(150, 150, 150, 0.5);
    border-radius: 3px;
}

.color-customizer-panel::-webkit-scrollbar-thumb:hover {
    background: #FF9AA2;
}

@media (max-width: 900px) {
    .theme-controls {
        position: absolute;
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        margin: 0;
        z-index: 1001;
        width: max-content;
    }

    .settings-dropdown {
        top: 110%;
    }
}

@media (max-width: 600px) {
    .color-customizer-panel {
        min-width: auto;
        width: 95vw;
        max-height: 80vh;
        padding: 16px;
    }

    .color-picker-group label {
        font-size: 0.8rem;
    }

    .color-picker-group input[type="color"] {
        height: 36px;
    }

    .color-panel-header h4 {
        font-size: 1rem;
    }
}