:root {
    --bg-color: #121212;
    --card-bg: #242424;
    --text-main: #ffffff;
    --text-muted: #888888;
    --border-color: #333333;
    
    /* Rarity colors */
    --mythic-bg: linear-gradient(180deg, #c4a052 0%, #3a3224 100%);
    --mythic-border: #8fd14f;
    --mythic-badge: #c4a052;
    
    --special-bg-1: linear-gradient(180deg, #8a2be2 0%, #2a1b38 100%);
    --special-bg-2: linear-gradient(180deg, #b8860b 0%, #382c18 100%);
    --special-bg-3: linear-gradient(180deg, #cd5c5c 0%, #3a2222 100%);
    --special-badge: #00ffcc;
    --special-badge-text: #000000;

    --rare-bg: linear-gradient(180deg, #0088cc 0%, #112233 100%);
    --rare-badge: #0088cc;
    
    /* Card Gradients */
    --bg-john-wick: linear-gradient(180deg, #d4a359 0%, #3a3224 100%);
    --bg-batman: linear-gradient(180deg, #c4a052 0%, #3a3224 100%);
    --bg-cube-batman: linear-gradient(180deg, #6c23a0 0%, #251633 100%);
    --bg-gold-batman: linear-gradient(180deg, #b38b22 0%, #2b2310 100%);
    --bg-gummy-batman: linear-gradient(180deg, #d35252 0%, #331616 100%);
    --bg-galaxy-batman: linear-gradient(180deg, #3d2b7a 0%, #1a1433 100%);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Views Management */
.view {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.5s ease-out;
    min-height: 100vh;
    box-sizing: border-box;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- VISTA 1: SELECCIÓN DE USUARIO --- */
#user-selection-view {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    /* Un fondo radial premium para la pantalla de selección */
    background-color: #0b0b10;
background-image: 
    radial-gradient(circle at top right, rgba(255, 50, 100, 0.08) 0%, transparent 40%),
    radial-gradient(circle at bottom left, rgba(50, 100, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at top, #1a1b26 0%, transparent 100%);
}
#user-selection-view.active {
    display: flex;
}

.view-title {
    font-size: 3.5rem;
    margin-bottom: 4rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.users-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 4rem;
    justify-content: center;
    align-items: center;
    padding-bottom: 4rem;
}

.user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 200px;
    border-radius: 20px;
}

.user-profile:hover {
    transform: translateY(-10px) scale(1.1);
}

.user-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    margin-bottom: 1.2rem;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

/* Efecto de brillo al pasar el mouse por el avatar */


.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    transition: opacity 0.3s ease;
}

.user-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}


/* --- VISTA 2: COLECCIÓN DE SPRITES --- */
.collection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
    background: rgba(20, 20, 20, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 30px;
    padding: 1rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
}

.current-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0,0,0,0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.current-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background-color: #222;
    border: 2px solid;
}

.current-user-name {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Grid & Cards */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    background-color: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card.owned {
    border-color: #4ade80;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.2);
}

.card.owned:hover {
    border-color: #4ade80;
    box-shadow: 0 15px 30px rgba(74, 222, 128, 0.2);
}

.card-image-wrapper {
    height: 200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sprite-image {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5));
}

.mock-sprite {
    width: 110px;
    height: 110px;
    background-color: rgba(0,0,0,0.2);
    border-radius: 24px;
    box-shadow: 0 15px 25px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.bg-1 { background: var(--bg-john-wick); }
.bg-2 { background: var(--bg-batman); }
.bg-3 { background: var(--bg-cube-batman); }
.bg-4 { background: var(--bg-gold-batman); }
.bg-5 { background: var(--bg-gummy-batman); }
.bg-6 { background: var(--bg-galaxy-batman); }

.card-content {
    padding: 1.2rem;
    background-color: rgba(0,0,0,0.2);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.character-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.badge {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-mythic { background-color: #b58d3d; color: white; }
.badge-special { background-color: #00ffcc; color: #000000; }
.badge-rare { background-color: #00aaff; color: white; }
.badge-percent { background-color: #383838; color: #d0d0d0; }

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    user-select: none;
    transition: color 0.2s;
    font-weight: 600;
}

.custom-checkbox.active {
    color: var(--text-main);
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: #1a1a1a;
    border: 1px solid #555;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-checkbox:hover input ~ .checkmark {
    background-color: #2a2a2a;
    border-color: #777;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #4ade80;
    border-color: #4ade80;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
    animation: checkAnim 0.2s ease-out;
}

@keyframes checkAnim {
    0% { transform: scale(0) rotate(45deg); }
    100% { transform: scale(1) rotate(45deg); }
}

.custom-checkbox .checkmark:after {
    width: 5px;
    height: 10px;
    border: solid #111;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* --- FILTERS & HEADER ACTIONS --- */

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.save-btn {
    background-color: #ffd000;
    color: #000;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    box-shadow: 0 4px 10px rgba(255, 208, 0, 0.2);
    font-family: 'Inter', sans-serif;
}

.save-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.save-btn:active {
    transform: translateY(0);
}

.controls-bar {
    max-width: 1400px;
    margin: 0 auto 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: rgba(20, 20, 20, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 30px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.main-filters {
    display: flex;
    gap: 0.5rem;
    background: rgba(0,0,0,0.3);
    padding: 0.4rem;
    border-radius: 30px;
}

.filter-tab {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-tab:hover {
    color: var(--text-main);
}

.filter-tab.active {
    background: var(--text-main);
    color: #000;
}

.secondary-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.search-box input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    outline: none;
    width: 200px;
    transition: all 0.2s;
    font-family: inherit;
    text-transform: uppercase;
}

.search-box input:focus {
    border-color: rgba(255,255,255,0.3);
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-group {
    display: flex;
    gap: 0.5rem;
}

.custom-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    text-transform: uppercase;
    transition: all 0.2s;
}

.custom-select:hover {
    border-color: rgba(255,255,255,0.3);
}

.custom-select option {
    background: var(--card-bg);
    color: var(--text-main);
}

/* --- EXPORT CONTAINER --- */
.export-container {
    position: absolute;
    left: -9999px; /* Oculto del viewport */
    top: 0;
    width: 1600px; /* Tamaño fijo para buena resolución */
    background-color: #0b0b10;
background-image: 
    radial-gradient(circle at top right, rgba(255, 50, 100, 0.08) 0%, transparent 40%),
    radial-gradient(circle at bottom left, rgba(50, 100, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at top, #1a1b26 0%, transparent 100%);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    pointer-events: none;
}

.export-header {
    text-align: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.export-layout {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.export-half {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.export-row {
    display: grid;
    grid-template-columns: repeat(8, 80px);
    gap: 15px;
}

.export-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 8px;
    height: 120px;
    border: 1px solid transparent;
}

.export-empty-slot {
    width: 80px;
    height: 120px;
    background: transparent;
    border: none;
}

.export-card.has-sprite {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.export-card.has-sprite.owned {
    border-color: #4ade80;
}

.export-card img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.5));
}

.export-check {
    width: 20px;
    height: 20px;
    background-color: #1a1a1a;
    border: 1px solid #555;
    border-radius: 4px;
    display: none; /* Hide by default, show if has-sprite */
    align-items: center;
    justify-content: center;
}

.export-card.has-sprite .export-check {
    display: flex;
}

.export-card.owned .export-check {
    background-color: #4ade80;
    border-color: #4ade80;
}

.export-card.owned .export-check::after {
    content: "";
    display: block;
    width: 3px;
    height: 7px;
    border: solid #111;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* Ocultar elementos temporalmente al tomar la captura */


body.exporting .export-container {
    opacity: 1;
}

/* Fortnite.GG Style Banner Background */
.sprites-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 600px;
    object-fit: cover;
    object-position: center 20%;
    z-index: 0;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 250px, transparent 450px);
    mask-image: linear-gradient(to bottom, black 0%, black 250px, transparent 450px);
}

/* Ensure content stays above the banner image */
.collection-header, .controls-bar, .grid-container {
    position: relative;
    z-index: 1;
}

.user-card-inner {
    width: 100%;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(20, 20, 25, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    transition: all 0.3s ease;
}
.user-profile:hover .user-card-inner {
    transform: translateY(-10px) scale(1.05);
    background: rgba(30, 30, 35, 0.9);
}

/* ========================================================
   THEME GEORGETTE (Pastel & Cozy)
   ======================================================== */
body.theme-georgette {
    background-color: #f3f0ff; /* Lavender blush / very soft pink */
    background-image: radial-gradient(circle at top left, #f3e8ff 0%, #f3f0ff 50%, #f3f0ff 100%);
    color: #4c1d95; /* Dark rosy brown for readability */
}

/* Override #collection-view background logic */
body.theme-georgette #collection-view {
    background: transparent !important; 
}
body.theme-georgette .sprites-bg {
    display: none !important; /* Hide giant banners if they clash with minimalism */
}

/* Header */
body.theme-georgette .collection-header {
    background: rgba(255, 240, 245, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(216, 180, 254, 0.3);
    padding: 1rem 2rem;
}
body.theme-georgette .back-btn {
    background-color: #d8b4fe; /* Light pink */
    color: #4c1d95;
    border-radius: 30px;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(216, 180, 254, 0.4);
    border: none;
}
body.theme-georgette .back-btn:hover {
    background-color: #ff99aa;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(216, 180, 254, 0.6);
}
body.theme-georgette .current-user-info span {
    color: #4c1d95 !important;
}
body.theme-georgette .save-btn {
    background: #d8b4fe;
    color: #4c1d95;
    border-radius: 30px;
    border: none;
    font-size: 0.8rem;
    padding: 0.6rem 1.5rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(216, 180, 254, 0.4);
}

/* Controls Bar (Filters) */
body.theme-georgette .controls-bar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    margin: 2rem auto;
    max-width: 800px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(216, 180, 254, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.8);
}
body.theme-georgette .filter-tab {
    background: transparent;
    color: #a88;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1.2rem;
}
body.theme-georgette .filter-tab.active {
    background: #ff99aa;
    color: white;
    box-shadow: 0 4px 10px rgba(255, 153, 170, 0.4);
}
body.theme-georgette .search-box input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #d8b4fe;
    color: #4c1d95;
    border-radius: 20px;
    padding: 0.6rem 1.2rem;
}
body.theme-georgette .search-box input::placeholder {
    color: #d1b3b9;
}
body.theme-georgette .custom-select {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #d8b4fe;
    color: #4c1d95;
    border-radius: 20px;
}
body.theme-georgette .custom-select option {
    background-color: #f3f0ff;
    color: #4c1d95;
    font-weight: 600;
}

/* Cards */
body.theme-georgette .card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 10px 30px rgba(216, 180, 254, 0.2);
    overflow: hidden;
}
body.theme-georgette .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(216, 180, 254, 0.35);
}
body.theme-georgette .card-image-wrapper {
    padding: 2.5rem 1rem 1.5rem 1rem !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: transparent !important;
}
/* Magic Glow based on rarity classes */
body.theme-georgette .card-image-wrapper img {
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.15)) !important;
    position: relative !important;
    z-index: 2 !important;
    height: auto !important;
}
body.theme-georgette .card-image-wrapper.bg-mythic img { filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.8)); }
body.theme-georgette .card-image-wrapper.bg-special img { filter: drop-shadow(0 0 25px rgba(255, 105, 180, 0.8)); }

body.theme-georgette .character-name {
    color: #4c1d95;
}
body.theme-georgette .badge {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #d8b4fe;
}

/* Missing State */
body.theme-georgette .card.missing .card-image-wrapper img {
    filter: brightness(0) invert(0.8) sepia(1) hue-rotate(300deg) saturate(0.5);
    opacity: 0.6;
}

/* Checkboxes */
body.theme-georgette .custom-checkbox {
    color: #a88;
}
body.theme-georgette .custom-checkbox.active {
    color: #7e22ce;
}
body.theme-georgette .checkmark {
    border-color: #d8b4fe;
    background: transparent;
}
body.theme-georgette .custom-checkbox input:checked ~ .checkmark {
    background-color: #ff99aa;
    border-color: #ff99aa;
}


/* ========================================================
   GEORGETTE DECORATIONS (Snoopy style)
   ======================================================== */


/* Elevamos el contenido principal para que las decoraciones queden detrás */
body.theme-georgette .collection-header,
body.theme-georgette .controls-bar,
body.theme-georgette .grid-container {
    position: relative;
    z-index: 10;
}

/* Posicionamiento de cada SVG */
.cloud-deco, .sun-deco, .paw-deco, .doghouse-deco, .flower-deco {
    position: absolute;
}

.cloud-1 { top: 5%; left: 5%; width: 150px; }
.cloud-2 { top: 15%; right: 10%; width: 200px; }
.cloud-3 { top: 35%; left: -20px; width: 120px; }

.sun-deco { top: 3%; right: 25%; width: 80px; opacity: 0.6; }

.paw-1 { bottom: 10%; left: 10%; width: 40px; transform: rotate(15deg); }
.paw-2 { bottom: 15%; left: 15%; width: 40px; transform: rotate(30deg); }
.paw-3 { bottom: 20%; left: 22%; width: 40px; transform: rotate(45deg); }

.doghouse-deco { bottom: -5px; right: 5%; width: 160px; opacity: 0.9; }

.flower-1 { top: 25%; left: 15%; width: 30px; transform: rotate(15deg); }
.flower-2 { bottom: 30%; right: 15%; width: 25px; transform: rotate(-20deg); }

/* Ajustes Responsive para decoraciones */
@media (max-width: 768px) {
    .cloud-2, .paw-3, .flower-1, .flower-2 { display: none; }
    .doghouse-deco { width: 100px; right: 2%; opacity: 0.5; bottom: -2px; }
    .cloud-1 { width: 100px; }
}

/* Refinamiento del Tema Pastel General */
body.theme-georgette {
    background-image: none !important;
    background-color: #f3f0ff !important; /* Cool lavender */ /* Aún más empolvado */
}
body.theme-georgette .card {
    border: 2px solid #e9d5ff !important; /* Borde cartoon */
    background: #ffffff !important;
    box-shadow: 0 10px 20px rgba(233, 213, 255, 0.4) !important;
}
body.theme-georgette .card-image-wrapper img {
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.15)) !important;
    position: relative !important;
    z-index: 2 !important;
    height: auto !important;
}



/* ========================================================
   SNOOPY IMAGES POSITIONS (REFINED)
   ======================================================== */
.snoopy-img {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1));
}

.snoopy-1 { top: 5%; left: 2%; width: 150px; } /* Top left big */
.snoopy-2 { top: 40%; left: 4%; width: 120px; } /* Middle left laying */
.snoopy-3 { bottom: 15%; left: 3%; width: 100px; } /* Bottom left heart */
.snoopy-4 { top: 35%; right: 2%; width: 100px; } /* Middle right joe cool */
.snoopy-5 { bottom: 5%; right: 2%; width: 160px; } /* Bottom right charlie */

@media (max-width: 1200px) {
    .snoopy-img { display: none; }
}

/* ========================================================
   GEORGETTE HEADER & FILTERS EXACT MATCH
   ======================================================== */
body.theme-georgette .collection-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2rem 4rem !important;
    justify-content: space-between !important;
}

body.theme-georgette .back-btn {
    background-color: #d8b4fe !important;
    color: #4c1d95 !important;
    border-radius: 30px !important;
    padding: 0.6rem 1.5rem !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: none !important;
}

body.theme-georgette .current-user-info {
    background-color: #e9d5ff !important; /* Grey pill */
    padding: 0.4rem 1.5rem !important;
    border-radius: 30px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}
body.theme-georgette .current-user-info span {
    color: #4c1d95 !important;
    font-weight: 700 !important;
}
body.theme-georgette .current-user-avatar {
    width: 30px !important;
    height: 30px !important;
    border: none !important;
    box-shadow: none !important;
}

body.theme-georgette .save-btn {
    background: #d8b4fe !important;
    color: #4c1d95 !important;
    border-radius: 30px !important;
    border: none !important;
    font-weight: 700 !important;
    padding: 0.6rem 1.5rem !important;
    box-shadow: none !important;
    margin-left: 1rem !important;
}

/* Panel de Filtros */
body.theme-georgette .controls-bar {
    background: #ffffff !important; /* Blanco puro */
    border-radius: 24px !important;
    margin: 1rem auto 3rem auto !important;
    max-width: 700px !important;
    padding: 2rem !important;
    box-shadow: 0 10px 20px rgba(216, 180, 254, 0.1) !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.5rem !important;
}

body.theme-georgette .main-filters {
    background: #e9d5ff !important; /* Grey background for tabs wrapper */
    border-radius: 20px !important;
    padding: 4px !important;
    display: inline-flex !important;
    gap: 4px !important;
}

body.theme-georgette .filter-tab {
    background: transparent !important;
    color: #a855f7 !important; /* Lighter text for unselected */
    border: none !important;
    border-radius: 16px !important;
    padding: 0.5rem 1.5rem !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    transition: all 0.3s ease !important;
}

body.theme-georgette .filter-tab.active {
    background: #9333ea !important; /* Bright pink */
    color: white !important;
    box-shadow: 0 4px 10px rgba(147, 51, 234, 0.4) !important;
}

body.theme-georgette .secondary-controls {
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    width: 100% !important;
}

body.theme-georgette .search-box input,
body.theme-georgette .custom-select {
    background: transparent !important;
    border: 1px solid #d8b4fe !important;
    color: #6b21a8 !important;
    border-radius: 20px !important;
    padding: 0.6rem 1.2rem !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    box-shadow: none !important;
}
body.theme-georgette .search-box input::placeholder {
    color: #d8b4fe !important;
}

/* ========================================================
   GEORGETTE CARDS EXACT MATCH (Bevel & Gradient)
   ======================================================== */
body.theme-georgette .card {
    /* Degradado exacto de la referencia */
    background: linear-gradient(180deg, #f3f0ff 0%, #d8b4fe 100%) !important;
    /* Borde exterior rosa oscuro */
    border: 3px solid #a855f7 !important;
    border-radius: 14px !important;
    /* Borde interior blanco (bevel) */
    box-shadow: inset 0 0 0 4px #ffffff, 0 8px 15px rgba(168, 85, 247, 0.2) !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    transition: transform 0.2s ease !important;
}

body.theme-georgette .card:hover {
    transform: translateY(-4px) !important;
    box-shadow: inset 0 0 0 4px #ffffff, 0 12px 20px rgba(168, 85, 247, 0.4) !important;
}

body.theme-georgette .card-image-wrapper {
    padding: 2.5rem 1rem 1.5rem 1rem !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: transparent !important;
}

body.theme-georgette .card-image-wrapper img {
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.15)) !important;
    position: relative !important;
    z-index: 2 !important;
    height: auto !important;
}

/* Aura background pseudo-element */
body.theme-georgette .card-image-wrapper::before {
    content: '' !important;
    position: absolute !important;
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    z-index: 1 !important;
    filter: blur(25px) !important;
    opacity: 0.9 !important;
}
body.theme-georgette .card-image-wrapper.bg-mythic::before { background: #fef08a !important; }
body.theme-georgette .card-image-wrapper.bg-special::before { background: #e9d5ff !important; }

body.theme-georgette .card-content {
    padding: 0 1.2rem 1.2rem 1.2rem !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    background: transparent !important;
}

body.theme-georgette .character-name {
    color: #6b21a8 !important; /* Marrón */
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
}

body.theme-georgette .badges {
    display: flex !important;
    gap: 6px !important;
    margin-bottom: 1.2rem !important;
}

body.theme-georgette .badge.bg-mythic {
    background: #a855f7 !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
}

body.theme-georgette .badge.bg-special {
    background: #9333ea !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
}

body.theme-georgette .badge-percent {
    background: #ffffff !important;
    color: #333 !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
}

body.theme-georgette .checkbox-group {
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding-top: 0.8rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
}

body.theme-georgette .custom-checkbox {
    color: #555 !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

body.theme-georgette .checkmark {
    width: 16px !important;
    height: 16px !important;
    border-radius: 4px !important;
    border: 1px solid #a855f7 !important; /* Marrón clarito */
    background: #f3f0ff !important;
    position: relative !important;
}

body.theme-georgette .custom-checkbox input:checked ~ .checkmark {
    background-color: #c084fc !important; /* Rosa relleno */
    border-color: #a855f7 !important;
}

body.theme-georgette .custom-checkbox input:checked ~ .checkmark:after {
    content: '' !important;
    position: absolute !important;
    left: 4px !important;
    top: 1px !important;
    width: 4px !important;
    height: 8px !important;
    border: solid white !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) !important;
}



.paw-deco {
    position: absolute;
    z-index: 0;
}
.paw-1 { bottom: 10%; left: 10%; width: 35px; transform: rotate(15deg); }
.paw-2 { bottom: 15%; left: 15%; width: 35px; transform: rotate(30deg); }
.paw-3 { bottom: 20%; left: 22%; width: 35px; transform: rotate(45deg); }
.paw-4 { top: 20%; right: 15%; width: 35px; transform: rotate(-20deg); }
.paw-5 { top: 25%; right: 10%; width: 35px; transform: rotate(-5deg); }
.paw-6 { top: 30%; right: 5%; width: 35px; transform: rotate(10deg); }

/* ========================================================
   THEME AARON (Batman Dark Red)
   ======================================================== */
body.theme-aaron {
    background-color: #1a0505;
    background-image: radial-gradient(circle at top right, #3a0a15 0%, #1a0505 50%, #050505 100%);
    color: #ffd1d1;
}

body.theme-aaron #collection-view {
    background: transparent !important; 
}
body.theme-aaron .sprites-bg {
    display: none !important;
}

body.theme-aaron .collection-header {
    background: transparent;
    border-bottom: none;
}
body.theme-aaron .back-btn {
    background-color: #f87171;
    color: #1a0505;
    border: none;
    box-shadow: 0 4px 10px rgba(248, 113, 113, 0.4);
}
body.theme-aaron .back-btn:hover {
    background-color: #ff9999;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(248, 113, 113, 0.6);
}
body.theme-aaron .current-user-info {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
}
body.theme-aaron .current-user-info span {
    color: #f87171 !important;
}

body.theme-aaron .controls-bar {
    background: rgba(30, 5, 10, 0.7);
    border: 1px solid rgba(248, 113, 113, 0.3);
}
body.theme-aaron .filter-tab {
    color: #885555;
}
body.theme-aaron .filter-tab.active {
    background: #f87171;
    color: #1a0505;
}
body.theme-aaron .search-box input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #f87171;
    color: #ffd1d1;
}
body.theme-aaron .custom-select {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #f87171;
    color: #ffd1d1;
}
body.theme-aaron .custom-select option {
    background-color: #1a0505;
    color: #f87171;
}

body.theme-aaron .card {
    background: rgba(40, 10, 15, 0.8);
    border: 1px solid rgba(248, 113, 113, 0.2);
}
body.theme-aaron .card-image-wrapper {
    background: transparent !important;
}

body.theme-aaron .card:hover {
    border-color: rgba(248, 113, 113, 0.6);
    box-shadow: 0 15px 40px rgba(248, 113, 113, 0.2);
}

body.theme-aaron .card-image-wrapper img {
    filter: drop-shadow(0 0 15px rgba(248, 113, 113, 0.3));
}

body.theme-aaron .character-name {
    color: #ffd1d1;
}
body.theme-aaron .custom-checkbox {
    color: #aa7777;
}
body.theme-aaron .custom-checkbox.active {
    color: #f87171;
}
body.theme-aaron .checkmark {
    border-color: #f87171;
    background: rgba(0,0,0,0.5);
}
body.theme-aaron .custom-checkbox input:checked ~ .checkmark {
    background-color: #f87171;
}

/* ========================================================
   AARON DECORATIONS (Batman, Boxeo, Producción & Noche)
   ======================================================== */
#jugador6-decorations {
    display: none;
}

body.theme-aaron #jugador6-decorations {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    overflow: hidden !important;
    z-index: 0 !important;
}

.batman-img {
    position: absolute !important;
    z-index: 0 !important;
    opacity: 0.88 !important;
    pointer-events: none !important;
    filter: drop-shadow(0 6px 16px rgba(26, 5, 5, 0.6)) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.batman-img.svg-deco {
    filter: drop-shadow(0 4px 12px rgba(248, 113, 113, 0.45)) !important;
    animation: float 6s ease-in-out infinite !important;
}

body.theme-aaron .collection-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2rem 4rem !important;
    justify-content: space-between !important;
}
.batman-img {
    position: absolute;
    z-index: 0;
    opacity: 0.8;
    pointer-events: none;
}

/* ========================================================
   THEME JERICK (Regular Show Purple)
   ======================================================== */
body.theme-jerick {
    background-color: #2b113b;
    background-image: radial-gradient(circle at top left, #4a1f63 0%, #2b113b 50%, #170821 100%);
    color: #e0d1ff;
}
body.theme-jerick #collection-view { background: transparent !important; }
body.theme-jerick .sprites-bg { display: none !important; }

body.theme-jerick .collection-header {
    background: transparent;
    border-bottom: none;
}
body.theme-jerick .back-btn {
    background-color: #a87bb5;
    color: #2b113b;
    border: none;
    box-shadow: 0 4px 10px rgba(168, 123, 181, 0.4);
}
body.theme-jerick .back-btn:hover {
    background-color: #bf80ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(191, 128, 255, 0.6);
}
body.theme-jerick .current-user-info { background: rgba(168, 123, 181, 0.2); border: 1px solid rgba(168, 123, 181, 0.3); }
body.theme-jerick .current-user-info span { color: #e0d1ff !important; }

body.theme-jerick .controls-bar {
    background: rgba(43, 17, 59, 0.85);
    border: 1px solid rgba(168, 123, 181, 0.5);
    box-shadow: 0 10px 30px rgba(168, 123, 181, 0.2);
}
body.theme-jerick .main-filters {
    background: rgba(168, 123, 181, 0.15);
}
body.theme-jerick .filter-tab { color: #9c73cc; }
body.theme-jerick .main-filters {
    background: rgba(168, 123, 181, 0.15);
}
body.theme-jerick .filter-tab.active {
    background: #a87bb5;
    color: #170821;
    box-shadow: 0 4px 10px rgba(168, 123, 181, 0.4);
}
body.theme-jerick .search-box input, body.theme-jerick .custom-select {
    background: rgba(43, 17, 59, 0.8);
    border: 1px solid #a87bb5;
    color: #e0d1ff;
}
body.theme-jerick .custom-select option {
    background-color: #2b113b;
    color: #bf80ff;
}

body.theme-jerick .card {
    background: rgba(60, 25, 80, 0.8);
    border: 1px solid rgba(191, 128, 255, 0.2);
}
body.theme-jerick .card-image-wrapper { background: transparent !important; }
body.theme-jerick .card:hover {
    border-color: rgba(191, 128, 255, 0.6);
    box-shadow: 0 15px 40px rgba(191, 128, 255, 0.3);
}
body.theme-jerick .card-image-wrapper img {
    filter: drop-shadow(0 0 15px rgba(191, 128, 255, 0.4));
}
body.theme-jerick .character-name { color: #e0d1ff; }
body.theme-jerick .custom-checkbox { color: #9c73cc; }
body.theme-jerick .custom-checkbox.active { color: #bf80ff; }
body.theme-jerick .checkmark {
    border-color: #bf80ff;
    background: rgba(0,0,0,0.5);
}
body.theme-jerick .custom-checkbox input:checked ~ .checkmark { background-color: #bf80ff; }

/* ========================================================
   JERICK DECORATIONS (Regular Show, Cine & Diversión)
   ======================================================== */
#jugador3-decorations {
    display: none;
}

body.theme-jerick #jugador3-decorations {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.rs-img {
    position: absolute;
    z-index: 0;
    opacity: 0.88;
    pointer-events: none;
    filter: drop-shadow(0 6px 16px rgba(43, 17, 59, 0.5));
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.rs-img.svg-deco {
    filter: drop-shadow(0 4px 12px rgba(191, 128, 255, 0.45));
    animation: float 6s ease-in-out infinite;
}


/* Card inner gradient and double border for Jerick */
body.theme-jerick .card {
    background: linear-gradient(to bottom, rgba(43, 17, 59, 0.8), rgba(23, 8, 33, 0.9)) !important;
    border: 2px solid #a87bb5 !important;
    box-shadow: inset 0 0 0 4px rgba(23, 8, 33, 1), 0 10px 30px rgba(168, 123, 181, 0.2) !important;
    border-radius: 24px !important;
}
body.theme-jerick .card-content {
    background: transparent !important;
}
body.theme-jerick .checkbox-group {
    border-top: 1px solid rgba(168, 123, 181, 0.3) !important;
}

/* Badges */
body.theme-jerick .badge {
    background: rgba(168, 123, 181, 0.2) !important;
    color: #e0d1ff !important;
    border: 1px solid #a87bb5 !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
}
body.theme-jerick .badge-percent {
    background: #ffffff !important;
    color: #170821 !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
}

/* Badges for Aaron Theme */
body.theme-aaron .badge {
    background: rgba(248, 113, 113, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid #f87171 !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
}
body.theme-aaron .badge-percent {
    background: #ffffff !important;
    color: #1a0505 !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
}


/* ========================================================
   THEME LUAN (Pastel Pink/Purple)
   ======================================================== */
body.theme-luan {
    background-color: #fff0f5;
    background-image: radial-gradient(circle at top left, #ffffff 0%, #fff0f5 50%, #ffe6f2 100%);
    color: #4a154b;
}

body.theme-luan #collection-view { background: transparent !important; }
body.theme-luan .sprites-bg { display: none !important; }

body.theme-luan .collection-header {
    background: transparent;
    border-bottom: none;
}
body.theme-luan .back-btn {
    background-color: #ffb3d9;
    color: #4a154b;
    border: none;
    box-shadow: 0 4px 10px rgba(255, 179, 217, 0.4);
}
body.theme-luan .back-btn:hover {
    background-color: #ff99cc;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 153, 204, 0.5);
}
body.theme-luan .current-user-info {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #ffb3d9;
}
body.theme-luan .current-user-info span { color: #4a154b !important; }

body.theme-luan .controls-bar {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 179, 217, 0.5);
    box-shadow: 0 10px 30px rgba(255, 179, 217, 0.2);
}
body.theme-luan .main-filters { background: rgba(255, 255, 255, 0.6); }
body.theme-luan .filter-tab { color: #cc6699; }
body.theme-luan .filter-tab.active {
    background: #ffb3d9;
    color: #4a154b;
    box-shadow: 0 4px 10px rgba(255, 179, 217, 0.4);
}
body.theme-luan .search-box input, body.theme-luan .custom-select {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ffb3d9;
    color: #4a154b;
}
body.theme-luan .custom-select option { background-color: #ffffff; color: #4a154b; }

/* Cards */
body.theme-luan .card {
    background: linear-gradient(to bottom, #ffffff, #fff0f5) !important;
    border: 2px solid #ffb3d9 !important;
    box-shadow: inset 0 0 0 4px #ffffff, 0 10px 25px rgba(255, 179, 217, 0.3) !important;
    border-radius: 24px !important;
}
body.theme-luan .card-content { background: transparent !important; }
body.theme-luan .card-image-wrapper { background: transparent !important; }
body.theme-luan .card:hover {
    border-color: #ff99cc !important;
    box-shadow: inset 0 0 0 4px #ffffff, 0 15px 35px rgba(255, 153, 204, 0.5) !important;
}
body.theme-luan .card-image-wrapper img { filter: drop-shadow(0 0 15px rgba(255, 179, 217, 0.6)); }
body.theme-luan .checkbox-group { border-top: 1px solid rgba(255, 179, 217, 0.5) !important; }
body.theme-luan .character-name { color: #4a154b; }
body.theme-luan .custom-checkbox { color: #cc6699; }
body.theme-luan .custom-checkbox.active { color: #ff66a3; }
body.theme-luan .checkmark { border-color: #ffb3d9; background: rgba(255,255,255,0.8); }
body.theme-luan .custom-checkbox input:checked ~ .checkmark { background-color: #ffb3d9; }

/* Badges */
body.theme-luan .badge {
    background: #ffe6f2 !important;
    color: #cc0066 !important;
    border: 1px solid #ffb3d9 !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
}
body.theme-luan .badge-percent {
    background: #ffffff !important;
    color: #4a154b !important;
    border: 1px solid #ffb3d9 !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
}

/* ========================================================
   LUAN DECORATIONS (Cartoon, Estrellitas, Noise & Pop)
   ======================================================== */
#jugador4-decorations {
    display: none;
}

body.theme-luan #jugador4-decorations {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.luan-img {
    position: absolute;
    z-index: 0;
    opacity: 0.88;
    pointer-events: none;
    filter: drop-shadow(0 6px 14px rgba(255, 179, 217, 0.4));
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.luan-img.svg-deco {
    filter: drop-shadow(0 4px 12px rgba(255, 153, 204, 0.45));
    animation: float 6s ease-in-out infinite;
}

/* ========================================================
   THEME YUE (Jade Green)
   ======================================================== */
body.theme-yue {
    background-color: #eefbf6;
    background-image: radial-gradient(circle at top right, #ccf2e4 0%, #eefbf6 50%, #ffffff 100%);
    color: #00452C;
}

body.theme-yue #collection-view { background: transparent !important; }
body.theme-yue .sprites-bg { display: none !important; }

body.theme-yue .collection-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2rem 4rem !important;
    justify-content: space-between !important;
}
body.theme-yue .back-btn {
    background-color: #00E893 !important;
    color: #00452C !important;
    border-radius: 30px !important;
    padding: 0.6rem 1.5rem !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: none !important;
    transition: all 0.3s ease !important;
}
body.theme-yue .back-btn:hover {
    background-color: #00BB77 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4) !important;
}
body.theme-yue .current-user-info {
    background-color: #99e8cc !important;
    padding: 0.4rem 1.5rem !important;
    border-radius: 30px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}
body.theme-yue .current-user-info span {
    color: #00452C !important;
    font-weight: 700 !important;
}
body.theme-yue .current-user-avatar {
    width: 30px !important;
    height: 30px !important;
    border: none !important;
    box-shadow: none !important;
}
body.theme-yue .save-btn {
    background: #00E893 !important;
    color: #00452C !important;
    border-radius: 30px !important;
    border: none !important;
    font-weight: 700 !important;
    padding: 0.6rem 1.5rem !important;
    box-shadow: none !important;
    margin-left: 1rem !important;
    transition: all 0.3s ease !important;
}
body.theme-yue .save-btn:hover {
    background-color: #00BB77 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4) !important;
}
body.theme-yue .controls-bar {
    background: #ffffff !important;
    border-radius: 24px !important;
    margin: 1rem auto 3rem auto !important;
    max-width: 700px !important;
    padding: 2rem !important;
    box-shadow: 0 10px 20px rgba(134, 239, 172, 0.1) !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.5rem !important;
}
body.theme-yue .main-filters {
    background: #99e8cc !important;
    border-radius: 20px !important;
    padding: 4px !important;
    display: inline-flex !important;
    gap: 4px !important;
}
body.theme-yue .filter-tab {
    background: transparent !important;
    color: #00965F !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 0.5rem 1.5rem !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    transition: all 0.3s ease !important;
}
body.theme-yue .filter-tab.active {
    background: #00BB77 !important;
    color: #00452C !important;
    box-shadow: 0 4px 10px rgba(74, 222, 128, 0.4) !important;
}
body.theme-yue .secondary-controls {
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    width: 100% !important;
}
body.theme-yue .search-box input,
body.theme-yue .custom-select {
    background: transparent !important;
    border: 1px solid #00E893 !important;
    color: #00452C !important;
    border-radius: 20px !important;
    padding: 0.6rem 1.2rem !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    box-shadow: none !important;
}
body.theme-yue .search-box input::placeholder {
    color: #00E893 !important;
}
body.theme-yue .card {
    background: linear-gradient(180deg, #eefbf6 0%, #ccf2e4 100%) !important;
    border: 3px solid #00E893 !important;
    border-radius: 14px !important;
    box-shadow: inset 0 0 0 4px #ffffff, 0 8px 15px rgba(134, 239, 172, 0.2) !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    transition: transform 0.2s ease !important;
}
body.theme-yue .card:hover {
    transform: translateY(-4px) !important;
    box-shadow: inset 0 0 0 4px #ffffff, 0 12px 20px rgba(134, 239, 172, 0.4) !important;
}
body.theme-yue .card-image-wrapper {
    padding: 2.5rem 1rem 1.5rem 1rem !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: transparent !important;
}
body.theme-yue .card-image-wrapper img {
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.15)) !important;
    position: relative !important;
    z-index: 2 !important;
    height: auto !important;
}
body.theme-yue .card-image-wrapper::before {
    content: '' !important;
    position: absolute !important;
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    z-index: 1 !important;
    filter: blur(25px) !important;
    opacity: 0.9 !important;
}
body.theme-yue .card-image-wrapper.bg-mythic::before { background: #fef08a !important; }
body.theme-yue .card-image-wrapper.bg-special::before { background: #99e8cc !important; }
body.theme-yue .card-content {
    padding: 0 1.2rem 1.2rem 1.2rem !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    background: transparent !important;
}
body.theme-yue .character-name {
    color: #00452C !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
}
body.theme-yue .badges {
    display: flex !important;
    gap: 6px !important;
    margin-bottom: 1.2rem !important;
}
body.theme-yue .badge.bg-mythic {
    background: #00BB77 !important;
    color: #00452C !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
}
body.theme-yue .badge.bg-special {
    background: #6ee7b7 !important;
    color: #00452C !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
}
body.theme-yue .badge-percent {
    background: #ffffff !important;
    color: #00452C !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
}
body.theme-yue .checkbox-group {
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding-top: 0.8rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
}
body.theme-yue .custom-checkbox {
    color: #00965F !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
body.theme-yue .checkmark {
    width: 16px !important;
    height: 16px !important;
    border-radius: 4px !important;
    border: 1px solid #00E893 !important;
    background: #eefbf6 !important;
    position: relative !important;
}
body.theme-yue .custom-checkbox input:checked ~ .checkmark {
    background-color: #00BB77 !important;
    border-color: #00965F !important;
}
body.theme-yue .custom-checkbox input:checked ~ .checkmark:after {
    content: '' !important;
    position: absolute !important;
    left: 4px !important;
    top: 1px !important;
    width: 4px !important;
    height: 8px !important;
    border: solid white !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) !important;
}

/* ========================================================
   YUE DECORATIONS (Snoopy, Lirios y Tulipanes)
   ======================================================== */
#yue-decorations {
    display: none;
}

body.theme-yue #yue-decorations {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.yue-img {
    position: absolute;
    z-index: 0;
    opacity: 0.88;
    pointer-events: none;
    filter: drop-shadow(0 6px 14px rgba(0, 69, 44, 0.12));
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.yue-img.svg-deco {
    filter: drop-shadow(0 4px 10px rgba(0, 187, 119, 0.25));
}

/* Fix Yue badges to be uniform Jade Green */
body.theme-yue .badge.badge-mythic,
body.theme-yue .badge.badge-rare,
body.theme-yue .badge.badge-special,
body.theme-yue .badge.badge-epic,
body.theme-yue .badge.badge-legendary {
    background: #00BB77 !important;
    color: #00452C !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
}

/* For the glow/blur behind the images */
body.theme-yue .card-image-wrapper.badge-mythic::before,
body.theme-yue .card-image-wrapper.badge-rare::before,
body.theme-yue .card-image-wrapper.badge-special::before,
body.theme-yue .card-image-wrapper.badge-epic::before,
body.theme-yue .card-image-wrapper.badge-legendary::before,
body.theme-yue .card-image-wrapper.bg-mythic::before,
body.theme-yue .card-image-wrapper.bg-rare::before,
body.theme-yue .card-image-wrapper.bg-special::before,
body.theme-yue .card-image-wrapper.bg-epic::before,
body.theme-yue .card-image-wrapper.bg-legendary::before {
    background: #00E893 !important;
    opacity: 0.8 !important;
    filter: blur(25px) !important;
}







/* ========================================================
   TEMA DAVID (#001F3F, #002D55, #004B87, #6A9BD1, #F0F4F8)
   ======================================================== */
/* ========================================================
   DAVID DECORATIONS (Snoopy, Gym, Fútbol, Videojuegos)
   ======================================================== */
#david-decorations {
    display: none;
}

body.theme-david #david-decorations {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.david-img {
    position: absolute;
    z-index: 0;
    opacity: 0.88;
    pointer-events: none;
    filter: drop-shadow(0 6px 14px rgba(0, 45, 85, 0.18));
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.david-img.svg-deco {
    filter: drop-shadow(0 4px 10px rgba(0, 75, 135, 0.3));
    animation: float 6s ease-in-out infinite;
}

body.theme-david {
    background: radial-gradient(circle at top, #F0F4F8 0%, #d4e4f7 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh;
}

body.theme-david #collection-view { background: transparent !important; }
body.theme-david .sprites-bg { display: none !important; }

body.theme-david .collection-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2rem 4rem !important;
    justify-content: space-between !important;
}

body.theme-david .back-btn,
body.theme-david .save-btn {
    background-color: #004B87 !important;
    color: #F0F4F8 !important;
    border-radius: 30px !important;
    padding: 0.6rem 1.5rem !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 45, 85, 0.2) !important;
    transition: all 0.3s ease !important;
}
body.theme-david .back-btn:hover,
body.theme-david .save-btn:hover {
    background-color: #002D55 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 45, 85, 0.4) !important;
}

body.theme-david .current-user-info {
    background-color: #004B87 !important;
    padding: 0.4rem 1.5rem !important;
    border-radius: 30px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    box-shadow: 0 4px 15px rgba(0, 45, 85, 0.2) !important;
}
body.theme-david .current-user-info span {
    color: #F0F4F8 !important;
    font-weight: 700 !important;
}
body.theme-david .current-user-avatar {
    width: 30px !important;
    height: 30px !important;
    border: none !important;
    box-shadow: none !important;
}

body.theme-david .controls-bar {
    background: rgba(0, 31, 63, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 24px !important;
    margin: 1rem auto 3rem auto !important;
    max-width: 700px !important;
    padding: 2rem !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid #004B87 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.5rem !important;
}

body.theme-david .main-filters {
    background: #002D55 !important;
    border-radius: 20px !important;
    padding: 4px !important;
    display: inline-flex !important;
    gap: 4px !important;
}
body.theme-david .filter-tab {
    background: transparent !important;
    color: #6A9BD1 !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 0.5rem 1.5rem !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    transition: all 0.3s ease !important;
}
body.theme-david .filter-tab.active {
    background: #6A9BD1 !important;
    color: #001F3F !important;
    box-shadow: 0 4px 10px rgba(106, 155, 209, 0.4) !important;
}

body.theme-david .secondary-controls {
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    width: 100% !important;
}
body.theme-david .search-box input,
body.theme-david .custom-select {
    background: transparent !important;
    border: 2px solid #6A9BD1 !important;
    color: #F0F4F8 !important;
    border-radius: 20px !important;
    padding: 0.6rem 1.2rem !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    box-shadow: none !important;
}
body.theme-david .search-box input::placeholder {
    color: #6A9BD1 !important;
}
body.theme-david .custom-select option {
    background-color: #001F3F;
    color: #F0F4F8;
}

body.theme-david .card {
    background: linear-gradient(180deg, #002D55 0%, #001F3F 100%) !important;
    border: 3px solid #6A9BD1 !important;
    border-radius: 14px !important;
    box-shadow: inset 0 0 0 4px #001F3F, 0 8px 25px rgba(0, 31, 63, 0.4) !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    transition: transform 0.2s ease !important;
}
body.theme-david .card:hover {
    transform: translateY(-4px) !important;
    box-shadow: inset 0 0 0 4px #001F3F, 0 12px 30px rgba(0, 31, 63, 0.6) !important;
}
body.theme-david .card-image-wrapper {
    padding: 2.5rem 1rem 1.5rem 1rem !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: transparent !important;
}
body.theme-david .card-image-wrapper img {
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.4)) !important;
    position: relative !important;
    z-index: 2 !important;
    height: auto !important;
}
body.theme-david .card-image-wrapper::before {
    content: '' !important;
    position: absolute !important;
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    z-index: 1 !important;
    filter: blur(25px) !important;
    opacity: 0.8 !important;
}

/* Base glowing dot color */
body.theme-david .card-image-wrapper.badge-mythic::before,
body.theme-david .card-image-wrapper.badge-rare::before,
body.theme-david .card-image-wrapper.badge-special::before,
body.theme-david .card-image-wrapper.badge-epic::before,
body.theme-david .card-image-wrapper.badge-legendary::before,
body.theme-david .card-image-wrapper.bg-mythic::before,
body.theme-david .card-image-wrapper.bg-rare::before,
body.theme-david .card-image-wrapper.bg-special::before,
body.theme-david .card-image-wrapper.bg-epic::before,
body.theme-david .card-image-wrapper.bg-legendary::before,
body.theme-david .card-image-wrapper.bg-1::before,
body.theme-david .card-image-wrapper.bg-2::before,
body.theme-david .card-image-wrapper.bg-3::before,
body.theme-david .card-image-wrapper.bg-4::before,
body.theme-david .card-image-wrapper.bg-5::before {
    background: #6A9BD1 !important;
    opacity: 0.6 !important;
    filter: blur(25px) !important;
}

body.theme-david .card-content {
    padding: 0 1.2rem 1.2rem 1.2rem !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    background: transparent !important;
}
body.theme-david .character-name {
    color: #F0F4F8 !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8) !important;
}

body.theme-david .badges {
    display: flex !important;
    gap: 6px !important;
    margin-bottom: 1.2rem !important;
}
body.theme-david .badge {
    background: #6A9BD1 !important;
    color: #001F3F !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
}

body.theme-david .badge-percent {
    background: #F0F4F8 !important;
    color: #001F3F !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
}

body.theme-david .checkbox-group {
    border-top: 1px solid rgba(106, 155, 209, 0.2) !important;
    padding-top: 0.8rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
}

body.theme-david .custom-checkbox {
    color: #6A9BD1 !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

body.theme-david .checkmark {
    width: 16px !important;
    height: 16px !important;
    border-radius: 4px !important;
    border: 1px solid #6A9BD1 !important;
    background: #001F3F !important;
    position: relative !important;
}

body.theme-david .custom-checkbox input:checked ~ .checkmark {
    background-color: #6A9BD1 !important;
    border-color: #F0F4F8 !important;
}

body.theme-david .custom-checkbox input:checked ~ .checkmark:after {
    content: '' !important;
    position: absolute !important;
    left: 4px !important;
    top: 1px !important;
    width: 4px !important;
    height: 8px !important;
    border: solid #001F3F !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) !important;
}
/* --- EXPORT THEME STYLES --- */
body.theme-david .export-header { color: #002D55; text-shadow: 0 2px 10px rgba(255,255,255,0.8); }
body.theme-david .export-card.has-sprite { background: linear-gradient(180deg, #002D55 0%, #001F3F 100%); border: 2px solid #6A9BD1; border-radius: 10px; }
body.theme-david .export-card.owned .export-check { background-color: #00e5ff; border-color: #00e5ff; }

body.theme-yue .export-header { color: #00452C; text-shadow: 0 2px 10px rgba(255,255,255,0.8); }
body.theme-yue .export-card.has-sprite { background: linear-gradient(180deg, #eefbf6 0%, #ccf2e4 100%); border: 2px solid #00E893; border-radius: 10px; }
body.theme-yue .export-card.owned .export-check { background-color: #00E893; border-color: #00E893; }


body.theme-luan .export-header { color: #fdf2f8; text-shadow: 0 2px 10px rgba(244, 114, 182, 0.8); }
body.theme-luan .export-card.has-sprite { background: linear-gradient(180deg, #db2777 0%, #9d174d 100%); border: 2px solid #f9a8d4; border-radius: 10px; }
body.theme-luan .export-card.owned .export-check { background-color: #f9a8d4; border-color: #f9a8d4; }

body.theme-georgette .export-header { color: #f5f3ff; text-shadow: 0 2px 10px rgba(167, 139, 250, 0.8); }
body.theme-georgette .export-card.has-sprite { background: linear-gradient(180deg, #6d28d9 0%, #4c1d95 100%); border: 2px solid #a78bfa; border-radius: 10px; }
body.theme-georgette .export-card.owned .export-check { background-color: #a78bfa; border-color: #a78bfa; }

body.theme-aaron .export-header { color: #fef2f2; text-shadow: 0 2px 10px rgba(248, 113, 113, 0.8); }
body.theme-aaron .export-card.has-sprite { background: linear-gradient(180deg, #991b1b 0%, #450a0a 100%); border: 2px solid #f87171; border-radius: 10px; }
body.theme-aaron .export-card.owned .export-check { background-color: #f87171; border-color: #f87171; }

body.theme-jerick .export-header { color: #f3e8ff; text-shadow: 0 2px 10px rgba(216, 180, 226, 0.8); }
body.theme-jerick .export-card.has-sprite { background: linear-gradient(180deg, #4a1f63 0%, #2b113b 100%); border: 2px solid #d8b4e2; border-radius: 10px; }
body.theme-jerick .export-card.owned .export-check { background-color: #d8b4e2; border-color: #d8b4e2; }


/* ========================================================
   GEORGETTE DECORATIONS (Snoopy, Nubecitas, Libros, Huellitas & Té)
   ======================================================== */
#jugador5-decorations {
    display: none;
}

body.theme-georgette #jugador5-decorations {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    overflow: hidden !important;
    z-index: 0 !important;
}

.georgette-img {
    position: absolute !important;
    z-index: 0 !important;
    opacity: 0.88 !important;
    pointer-events: none !important;
    filter: drop-shadow(0 6px 14px rgba(216, 180, 254, 0.35)) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.georgette-img.svg-deco {
    filter: drop-shadow(0 4px 10px rgba(192, 132, 252, 0.35)) !important;
    animation: float 6s ease-in-out infinite !important;
}

body.theme-georgette .collection-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2rem 4rem !important;
    justify-content: space-between !important;
}

/* ========================================================
   ANIMACIONES VIVAS EN SU LUGAR (TODOS LOS 6 PERFILES)
   ======================================================== */

@keyframes floatGentle {
    0%, 100% {
        translate: 0 0;
    }
    50% {
        translate: 0 -9px;
    }
}

@keyframes floatGentleAlt {
    0%, 100% {
        translate: 0 0;
    }
    50% {
        translate: 0 8px;
    }
}

@keyframes floatDrift {
    0%, 100% {
        translate: 0 0;
    }
    50% {
        translate: 5px -7px;
    }
}

@keyframes floatDriftAlt {
    0%, 100% {
        translate: 0 0;
    }
    50% {
        translate: -5px -6px;
    }
}

@keyframes pulseGently {
    0%, 100% {
        scale: 1;
        opacity: 0.85;
    }
    50% {
        scale: 1.06;
        opacity: 1;
    }
}

@keyframes starTwinkleGlow {
    0%, 100% {
        scale: 0.95;
        opacity: 0.75;
    }
    50% {
        scale: 1.15;
        opacity: 1;
    }
}

@keyframes cloudDriftSlow {
    0%, 100% {
        translate: 0 0;
    }
    50% {
        translate: 10px -5px;
    }
}

/* Aplicación de animaciones alternadas con suavidad */
.david-img,
.yue-img,
.rs-img,
.luan-img,
.georgette-img,
.batman-img {
    will-change: translate, scale;
    animation: floatGentle 5.5s ease-in-out infinite;
}

.david-img:nth-child(2n),
.yue-img:nth-child(2n),
.rs-img:nth-child(2n),
.luan-img:nth-child(2n),
.georgette-img:nth-child(2n),
.batman-img:nth-child(2n) {
    animation: floatDriftAlt 6.2s ease-in-out infinite;
}

.david-img:nth-child(3n),
.yue-img:nth-child(3n),
.rs-img:nth-child(3n),
.luan-img:nth-child(3n),
.georgette-img:nth-child(3n),
.batman-img:nth-child(3n) {
    animation: floatDrift 5s ease-in-out infinite;
}

.david-img:nth-child(4n),
.yue-img:nth-child(4n),
.rs-img:nth-child(4n),
.luan-img:nth-child(4n),
.georgette-img:nth-child(4n),
.batman-img:nth-child(4n) {
    animation: floatGentleAlt 6.8s ease-in-out infinite;
}

/* Tiempos desfasados (stagger) para movimiento orgánico y natural */
.david-img:nth-child(1), .yue-img:nth-child(1), .rs-img:nth-child(1), .luan-img:nth-child(1), .georgette-img:nth-child(1), .batman-img:nth-child(1) { animation-delay: 0s; }
.david-img:nth-child(2), .yue-img:nth-child(2), .rs-img:nth-child(2), .luan-img:nth-child(2), .georgette-img:nth-child(2), .batman-img:nth-child(2) { animation-delay: 0.6s; }
.david-img:nth-child(3), .yue-img:nth-child(3), .rs-img:nth-child(3), .luan-img:nth-child(3), .georgette-img:nth-child(3), .batman-img:nth-child(3) { animation-delay: 1.3s; }
.david-img:nth-child(4), .yue-img:nth-child(4), .rs-img:nth-child(4), .luan-img:nth-child(4), .georgette-img:nth-child(4), .batman-img:nth-child(4) { animation-delay: 2.1s; }
.david-img:nth-child(5), .yue-img:nth-child(5), .rs-img:nth-child(5), .luan-img:nth-child(5), .georgette-img:nth-child(5), .batman-img:nth-child(5) { animation-delay: 0.9s; }
.david-img:nth-child(6), .yue-img:nth-child(6), .rs-img:nth-child(6), .luan-img:nth-child(6), .georgette-img:nth-child(6), .batman-img:nth-child(6) { animation-delay: 1.8s; }
.david-img:nth-child(7), .yue-img:nth-child(7), .rs-img:nth-child(7), .luan-img:nth-child(7), .georgette-img:nth-child(7), .batman-img:nth-child(7) { animation-delay: 2.7s; }
.david-img:nth-child(8), .yue-img:nth-child(8), .rs-img:nth-child(8), .luan-img:nth-child(8), .georgette-img:nth-child(8), .batman-img:nth-child(8) { animation-delay: 0.4s; }
.david-img:nth-child(9), .yue-img:nth-child(9), .rs-img:nth-child(9), .luan-img:nth-child(9), .georgette-img:nth-child(9), .batman-img:nth-child(9) { animation-delay: 1.5s; }
.david-img:nth-child(10), .yue-img:nth-child(10), .rs-img:nth-child(10), .luan-img:nth-child(10), .georgette-img:nth-child(10), .batman-img:nth-child(10) { animation-delay: 2.4s; }
.david-img:nth-child(11), .yue-img:nth-child(11), .rs-img:nth-child(11), .luan-img:nth-child(11), .georgette-img:nth-child(11), .batman-img:nth-child(11) { animation-delay: 3.1s; }
.david-img:nth-child(12), .yue-img:nth-child(12), .rs-img:nth-child(12), .luan-img:nth-child(12), .georgette-img:nth-child(12), .batman-img:nth-child(12) { animation-delay: 0.8s; }
.david-img:nth-child(13), .yue-img:nth-child(13), .rs-img:nth-child(13), .luan-img:nth-child(13), .georgette-img:nth-child(13), .batman-img:nth-child(13) { animation-delay: 1.9s; }
.david-img:nth-child(14), .yue-img:nth-child(14), .rs-img:nth-child(14), .luan-img:nth-child(14), .georgette-img:nth-child(14), .batman-img:nth-child(14) { animation-delay: 2.8s; }
.david-img:nth-child(15), .yue-img:nth-child(15), .rs-img:nth-child(15), .luan-img:nth-child(15), .georgette-img:nth-child(15), .batman-img:nth-child(15) { animation-delay: 3.5s; }

/* Animaciones específicas para nubes y destellos */
.geo-cloud {
    animation: cloudDriftSlow 7s ease-in-out infinite !important;
}

.aaron-star, .luan-sparkle, .luan-shooting-star {
    animation: starTwinkleGlow 3.5s ease-in-out infinite !important;
}

/* ========================================================
   ANIMACIÓN FLOTANTE DE ESPÍRITUS EN TODAS LAS CARDS
   ======================================================== */
@keyframes spriteFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-6px) scale(1.03);
    }
}

@keyframes spriteFloatAlt {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(5px) scale(0.98);
    }
}

.card-image-wrapper img {
    will-change: transform, filter;
    animation: spriteFloat 3.8s ease-in-out infinite;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease !important;
}

.card:nth-child(2n) .card-image-wrapper img {
    animation-delay: 0.6s;
}

.card:nth-child(3n) .card-image-wrapper img {
    animation-delay: 1.2s;
    animation-duration: 4.2s;
}

.card:nth-child(4n) .card-image-wrapper img {
    animation-delay: 1.8s;
    animation-duration: 3.5s;
}

.card:nth-child(5n) .card-image-wrapper img {
    animation-delay: 2.4s;
    animation-duration: 4.6s;
}

/* Efecto al pasar el cursor sobre la carta */
.card:hover .card-image-wrapper img {
    animation-play-state: paused;
    transform: translateY(-10px) scale(1.12) !important;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.6)) !important;
}

/* ========================================================
   CONTROLES COMPACTOS, ANCHOS Y SIN ESPACIOS VACÍOS
   ======================================================== */
.stats-mini-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    margin: 0 auto 0.6rem auto !important;
    max-width: 900px;
    z-index: 10;
    position: relative;
}

.stat-mini-card {
    background: rgba(30, 30, 35, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.5rem 1.4rem;
    min-width: 110px;
    text-align: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-mini-num {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
}

.stat-mini-num span:first-child {
    color: #ffffff;
}

.stat-slash {
    font-weight: 400;
    opacity: 0.45;
    font-size: 1.1rem;
    margin: 0 2px;
}

.stat-mini-num span:last-child {
    font-weight: 700;
    opacity: 0.6;
    font-size: 1.1rem;
}

.stat-mini-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
    text-transform: uppercase;
}

/* Barra de controles compacta y ancha */
.controls-bar {
    max-width: 920px !important;
    margin: 0.2rem auto 1.2rem auto !important;
    padding: 0.85rem 1.4rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.75rem !important;
    border-radius: 20px !important;
}

.controls-row-top {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.9rem !important;
    width: 100% !important;
    flex-wrap: wrap !important;
}

.controls-row-bottom {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
    flex-wrap: wrap !important;
}

.search-box {
    flex: 1 1 200px !important;
    max-width: 280px !important;
}

.search-box input {
    width: 100% !important;
    padding: 0.45rem 1.1rem !important;
    font-size: 0.82rem !important;
}

.custom-select {
    padding: 0.45rem 1.1rem !important;
    font-size: 0.82rem !important;
    min-width: 130px !important;
}

/* Eliminar márgenes excesivos en todos los temas */
body.theme-david .controls-bar,
body.theme-yue .controls-bar,
body.theme-jerick .controls-bar,
body.theme-luan .controls-bar,
body.theme-georgette .controls-bar,
body.theme-aaron .controls-bar {
    margin: 0.2rem auto 1.2rem auto !important;
    padding: 0.85rem 1.4rem !important;
    gap: 0.75rem !important;
    max-width: 920px !important;
}

/* Adaptación de mini cards por tema */
body.theme-yue .stat-mini-card {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(0, 187, 119, 0.35) !important;
}
body.theme-yue .stat-mini-num, body.theme-yue .stat-mini-num span:first-child { color: #00452C !important; }
body.theme-yue .stat-mini-num span:last-child, body.theme-yue .stat-slash { color: #00965F !important; }
body.theme-yue .stat-mini-label { color: #00965F !important; }

body.theme-luan .stat-mini-card {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(255, 179, 217, 0.6) !important;
}
body.theme-luan .stat-mini-num, body.theme-luan .stat-mini-num span:first-child { color: #4a154b !important; }
body.theme-luan .stat-mini-num span:last-child, body.theme-luan .stat-slash { color: #cc6699 !important; }
body.theme-luan .stat-mini-label { color: #cc6699 !important; }

body.theme-georgette .stat-mini-card {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(216, 180, 254, 0.6) !important;
}
body.theme-georgette .stat-mini-num, body.theme-georgette .stat-mini-num span:first-child { color: #4c1d95 !important; }
body.theme-georgette .stat-mini-num span:last-child, body.theme-georgette .stat-slash { color: #a855f7 !important; }
body.theme-georgette .stat-mini-label { color: #a855f7 !important; }

body.theme-david .stat-mini-card {
    background: rgba(0, 31, 63, 0.75) !important;
    border: 1px solid rgba(0, 229, 255, 0.3) !important;
}
body.theme-david .stat-mini-num, body.theme-david .stat-mini-num span:first-child { color: #ffffff !important; }
body.theme-david .stat-mini-num span:last-child, body.theme-david .stat-slash { color: #6A9BD1 !important; }
body.theme-david .stat-mini-label { color: #6A9BD1 !important; }

body.theme-jerick .stat-mini-card {
    background: rgba(43, 17, 59, 0.85) !important;
    border: 1px solid rgba(191, 128, 255, 0.4) !important;
}
body.theme-jerick .stat-mini-label { color: #a87bb5 !important; }

body.theme-aaron .stat-mini-card {
    background: rgba(30, 5, 10, 0.85) !important;
    border: 1px solid rgba(248, 113, 113, 0.35) !important;
}
body.theme-aaron .stat-mini-label { color: #f87171 !important; }

.filter-crown {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem 0.85rem !important;
}
.filter-crown svg {
    display: block;
    pointer-events: none;
}

/* ========================================================
   ESPACIADOS COMPACTOS Y PERFECTOS (SIN HUECOS VACÍOS)
   ======================================================== */
.collection-header {
    margin-bottom: 0.8rem !important;
}

body.theme-david .collection-header,
body.theme-yue .collection-header,
body.theme-jerick .collection-header,
body.theme-luan .collection-header,
body.theme-georgette .collection-header,
body.theme-aaron .collection-header {
    margin-bottom: 0.8rem !important;
    padding: 1rem 2rem !important;
}

.stats-mini-wrapper {
    margin: 0 auto 0.6rem auto !important;
}

.controls-bar {
    max-width: 920px !important;
    margin: 0 auto 1.2rem auto !important;
    padding: 0.85rem 1.4rem !important;
    gap: 0.75rem !important;
}

body.theme-david .controls-bar,
body.theme-yue .controls-bar,
body.theme-jerick .controls-bar,
body.theme-luan .controls-bar,
body.theme-georgette .controls-bar,
body.theme-aaron .controls-bar {
    max-width: 920px !important;
    margin: 0 auto 1.2rem auto !important;
    padding: 0.85rem 1.4rem !important;
    gap: 0.75rem !important;
}

.grid-container {
    margin: 0 auto !important;
    padding-top: 0 !important;
}

/* Save Image: masterizados = cuadro dorado con check blanco (aplica a todos los temas) */
body .export-card.mastered .export-check {
    background: linear-gradient(135deg, #FFE066 0%, #FFC107 50%, #D4A017 100%);
    border-color: #B8860B !important;
}
body .export-card.mastered .export-check::after {
    content: "";
    display: block;
    width: 3px;
    height: 7px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}
