:root {
    --bts-purple: #a020f0;
    --bts-glow: #d800ff;
    --bts-light: #e0b0ff;
    --bts-dark: #07000d;
    --gold: #ffd700;
    --pink: #ff1493;
    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
}

body, html {
    margin: 0; padding: 0; width: 100%; height: 100%;
    overflow: hidden; font-family: 'Poppins', sans-serif;
    background-color: var(--bts-dark);
}

/* FONDO CÓSMICO */
.galaxy-bg {
    position: absolute; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a0230 0%, #040008 100%);
    z-index: 1; overflow: hidden;
}
.galaxy-bg::before {
    content: ''; position: absolute; width: 200%; height: 200%; top: -50%; left: -50%;
    background: radial-gradient(circle at 30% 40%, rgba(160, 32, 240, 0.15) 0%, transparent 45%),
                radial-gradient(circle at 70% 60%, rgba(255, 20, 147, 0.12) 0%, transparent 50%);
    animation: nebula 40s infinite linear; filter: blur(60px);
}
@keyframes nebula { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.star { position: absolute; background: white; border-radius: 50%; animation: twinkle var(--d) infinite ease-in-out; }
@keyframes twinkle { 0%, 100% { opacity: 0.2; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }

/* LOGIN */
#login-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(4, 0, 8, 0.98); z-index: 1100; display: flex; justify-content: center; align-items: center;
}
.login-card {
    background: rgba(20, 1, 35, 0.8); padding: 40px; border-radius: 30px; border: 2px solid var(--bts-glow);
    text-align: center; width: 90%; max-width: 400px; box-shadow: 0 0 40px rgba(160, 32, 240, 0.4); backdrop-filter: blur(10px);
}
.login-card h1 { color: #fff; margin: 0 0 10px 0; letter-spacing: 2px; }
.login-card input {
    width: 100%; padding: 14px; border-radius: 12px; border: 2px solid var(--bts-purple);
    background: rgba(0,0,0,0.4); color: #fff; font-size: 18px; text-align: center; margin: 20px 0; outline: none; box-sizing: border-box;
}
.login-card button {
    background: linear-gradient(45deg, var(--bts-purple), var(--pink)); color: white; border: none;
    padding: 14px; border-radius: 25px; font-weight: bold; cursor: pointer; width: 100%; transition: 0.2s;
}

/* LAYOUT JUEGO COMPLETO */
#game-ui { position: relative; z-index: 2; height: 100%; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 1s; }
#game-ui.active { opacity: 1; pointer-events: auto; }
.game-stage { display: flex; align-items: stretch; gap: 35px; max-width: 900px; width: 100%; padding: 20px; box-sizing: border-box; }

.slot-container { display: flex; flex-direction: column; gap: 20px; width: 420px; }

/* TRAGAMONEDAS */
.slot-machine {
    background: #0d0017; border: 5px solid var(--bts-purple); border-radius: 35px; padding: 25px;
    box-shadow: 0 0 35px rgba(160, 32, 240, 0.6); text-align: center;
}
.machine-header { font-size: 30px; font-weight: 700; color: #fff; margin-bottom: 20px; letter-spacing: 2px; text-shadow: 0 0 10px var(--bts-glow); }
.slot-window { height: 300px; background: #06000a; border: 6px solid var(--gold); border-radius: 20px; display: flex; overflow: hidden; position: relative; }
.winning-line-marker { position: absolute; top: 50%; left: 0; width: 100%; height: 100px; transform: translateY(-50%); border-top: 2px dashed var(--pink); border-bottom: 2px dashed var(--pink); background: rgba(255, 20, 147, 0.05); z-index: 5; }
.reel-container { flex: 1; border-right: 1px solid rgba(160, 32, 240, 0.15); position: relative; height: 100%; }
.reel-container:last-child { border-right: none; }
.reel-strip { position: absolute; width: 100%; top: 0; display: flex; flex-direction: column; }
.slot-cell { height: 100px; display: flex; justify-content: center; align-items: center; font-size: 48px; }
.slot-cell img, .slot-cell .slot-icon {
    height: 72px;
    width: auto;
    object-fit: contain;
    display: block;
}
.reel-blur { filter: blur(4px); }

/* ANIMACIONES COOKY Y PALANCA */
.character-area { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 20px; }
.cooky-avatar { font-size: 80px; cursor: pointer; transform-origin: bottom center; animation: cookyIdle 3s infinite ease-in-out; filter: drop-shadow(0 0 10px var(--pink)); }
@keyframes cookyIdle { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05) translateY(-3px); } }
.cooky-spin-action { animation: cookyJump 0.6s ease forwards; }
@keyframes cookyJump { 0%, 100% { transform: scale(1) translateY(0); } 50% { transform: scale(0.85, 1.2) translateY(-40px); } }

.lever-track { width: 8px; height: 70px; background: #222; border-radius: 4px; border: 1px solid var(--bts-light); position: relative; }
.lever-handle { width: 22px; height: 22px; background: radial-gradient(circle, var(--pink), #600); border-radius: 50%; position: absolute; top: -10px; left: -7px; transition: 0.2s; }
.lever-pulled { top: 50px !important; }
.spin-label { color: var(--bts-light); font-size: 12px; font-weight: 600; text-transform: uppercase; text-align: left; }

/* NUEVA SECCIÓN: GUÍA DE COMBINACIONES */
.guide-panel {
    background: rgba(160, 32, 240, 0.12); border: 2px dashed rgba(160, 32, 240, 0.4);
    border-radius: 20px; padding: 15px 20px; color: white; box-sizing: border-box;
}
.guide-panel h3 { margin: 0 0 10px 0; font-size: 13px; letter-spacing: 1px; color: var(--bts-light); text-align: center; }
.guide-panel ul { margin: 0; padding: 0; list-style: none; }
.guide-panel li { font-size: 12px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.guide-panel li:last-child { margin-bottom: 0; }
.guide-panel span { color: var(--gold); font-weight: bold; display: flex; align-items: center; gap: 6px; }
.guide-panel .guide-icon { width: 24px; height: 24px; object-fit: contain; }

/* REPRODUCTOR DERECHO */
.right-modules { flex: 1; display: flex; flex-direction: column; }
.playlist-panel {
    background: var(--glass); border: 2px solid var(--glass-border); backdrop-filter: blur(15px);
    border-radius: 30px; padding: 20px; color: white; display: flex; flex-direction: column; height: 100%; box-sizing: border-box;
}
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.panel-header h2 { font-size: 18px; margin: 0; color: var(--bts-light); }

.control-toggle-btn { background: rgba(255,255,255,0.1); border: 1px solid var(--bts-light); color: white; padding: 5px 12px; border-radius: 12px; font-size: 11px; font-weight: bold; cursor: pointer; }
.control-toggle-btn:hover { background: var(--bts-purple); }

#song-list { flex: 1; overflow-y: auto; }
.song-item { padding: 12px; margin-bottom: 8px; background: rgba(0,0,0,0.3); border-radius: 12px; cursor: pointer; font-size: 13px; transition: 0.2s; }
.song-item:hover { background: rgba(160,32,240,0.2); }
.song-item.active { background: linear-gradient(90deg, var(--bts-purple), var(--pink)); font-weight: bold; }

.album-trigger-btn {
    margin-top: 15px; background: linear-gradient(45deg, #120024, var(--bts-purple));
    border: 2px solid var(--bts-light); color: white; padding: 14px; border-radius: 20px;
    font-weight: bold; cursor: pointer; transition: 0.3s; width: 100%; box-shadow: 0 4px 15px rgba(160,32,240,0.3);
}
.album-trigger-btn:hover { transform: scale(1.02); background: var(--bts-purple); }

/* VENTANAS EMERGENTES */
.popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(5, 0, 10, 0.92); z-index: 1050; display: none; justify-content: center; align-items: center; backdrop-filter: blur(12px); }
.popup-content { background: #fff; padding: 35px; border-radius: 30px; border: 5px solid var(--bts-purple); text-align: center; max-width: 440px; width: 85%; box-shadow: 0 20px 40px rgba(160,32,240,0.4); }
.popup-icon { font-size: 70px; margin-bottom: 10px; }
.popup-title { color: var(--bts-purple); font-size: 26px; font-weight: 700; margin-bottom: 10px; }
.love-letter-box { font-family: 'Georgia', serif; font-style: italic; line-height: 1.6; color: #3a005c; text-align: left; background: #fffaf2; padding: 20px; border-radius: 15px; border-left: 4px solid var(--pink); white-space: pre-line; font-size: 14px; }
.photocard-render { width: 100%; max-width: 220px; height: 320px; border-radius: 15px; border: 5px solid #fff; object-fit: cover; box-shadow: 0 10px 20px rgba(0,0,0,0.3); }

/* SISTEMA DINÁMICO DE ÁLBUM */
.album-content { background: white; padding: 35px; border-radius: 35px; border: 5px solid var(--bts-purple); max-width: 650px; width: 90%; max-height: 85vh; overflow-y: auto; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.album-content h2 { color: var(--bts-dark); margin: 0; font-size: 24px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 130px)); gap: 15px; justify-content: center; margin-top: 25px; }

.album-card { background: #f8f5fa; border: 2px solid #e0d5eb; border-radius: 16px; padding: 10px; text-align: center; position: relative; height: 210px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; box-sizing: border-box; transition: 0.3s; }
.album-card h4 { font-size: 11px; margin: 5px 0 0 0; color: #444; font-weight: 600; }

.card-status-badge { font-size: 9px; font-weight: bold; padding: 3px 6px; border-radius: 8px; width: 90%; text-align: center; box-sizing: border-box; }
.item-locked .card-status-badge { background: #e0e0e0; color: #777; }
.item-unlocked .card-status-badge { background: #e8fcdb; color: #3b7a12; }

.album-card-icon { font-size: 45px; margin: auto 0; color: #bbb; }
.album-preview-img { width: 100%; height: 130px; object-fit: cover; border-radius: 10px; display: none; margin: auto 0; }

/* FILTROS DE ESTADO */
.item-locked { filter: grayscale(1); opacity: 0.4; }
.item-unlocked { filter: grayscale(0) !important; opacity: 1 !important; border-color: var(--pink) !important; box-shadow: 0 5px 12px rgba(255, 20, 147, 0.2); }
.item-unlocked .album-preview-img { display: block; }
.item-unlocked .album-card-icon { display: none; }

.close-popup { margin-top: 25px; padding: 12px 40px; border-radius: 20px; border: none; background: linear-gradient(45deg, var(--bts-purple), var(--pink)); color: white; font-size: 14px; font-weight: bold; cursor: pointer; }
