:root {
    --primary: #8c0cde;
    --bg-dark: #0a0a0a;
    --card-bg: #161616;
    --text: #ffffff;
}

body {
    margin: 0;
    padding: 20px;
    background-color: #0a0a0a; /* Color base */
    color: var(--text);
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    transition: background-color 1.2s ease; /* Esto hace la magia del color */
}

.main-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid #222;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.logo { font-size: 3rem; margin-bottom: 10px; }
h1 { font-size: 1.5rem; margin-bottom: 2rem; color: var(--primary); }

#media-container img {
    width: 100%;
    max-width: 200px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px var(--primary);
}

/* Slider con degradado Pixelados */
.slider-container { margin: 30px 0; }

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 10px;
    background: linear-gradient(90deg, #44107a 0%, #8c0cde 50%, #ff00ff 100%);
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 25px;
    height: 25px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary);
}

.labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.8rem;
    opacity: 0.7;
}

#save-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 15px 25px;
    width: 100%;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

#save-btn:active { transform: scale(0.95); }

/* Historial Estilo Dashboard */
.history-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: left;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    padding: 12px 15px;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.fade-in {
    opacity: 1 !important;
    transition: opacity 1.5s ease-in-out;
}

#reveal-area {
    opacity: 0; /* Empieza invisible */
    display: none; /* Y fuera del flujo */
}

/* Efecto para ocultar suavemente los controles */
.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
    pointer-events: none; /* Evita que se pueda clickear mientras desaparece */
}

/* Estilos del Loader */
#loader {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease;
}
.loader-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
}

.loader-logo {
    width: 60px;
    filter: drop-shadow(0 0 10px var(--primary));
    z-index: 2;
}

.spinner {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(140, 12, 222, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Clase para ocultarlo */
.hidden {
    opacity: 0;
    pointer-events: none;
}
.mood-tag { font-weight: bold; color: var(--primary); }