* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-primary);
    transition: background-color var(--transition-normal), color var(--transition-normal);
    line-height: 1.6;
}

.site-wrapper {
    width: 100%;
    background-color: var(--bg-body);
    transition: background-color var(--transition-normal);
}

@media (min-width: 1200px) {
    body {
        background-image: radial-gradient(rgba(0, 0, 0, 0.25) 1px, transparent 0), var(--bg-body-outer);
        background-color: #060814;
        background-attachment: fixed, fixed;
        background-size: 4px 4px, cover;
        background-position: center, center top;
        background-repeat: repeat, no-repeat;
    }
    .site-wrapper {
        max-width: 1200px;
        margin: 40px auto;
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-color);
        border-radius: 16px;
    }
    header.site-header {
        border-top-left-radius: 15px;
        border-top-right-radius: 15px;
    }
    footer {
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

main.container {
    padding-top: 35px;
    padding-bottom: 60px;
}
main.container:has(.hero) {
    padding-top: 0;
}

/* --- CABECERA & NAVBAR --- */
header.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 15, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-normal);
}

header.site-header .container {
    max-width: 1200px;
}

[data-theme="light"] header.site-header {
    background: rgba(255, 255, 255, 0.85);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 22px;
    color: var(--text-main);
    gap: 8px;
    margin-right: 15px;
}

.logo span {
    color: var(--primary);
}

.logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 5px 12px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.05);
    list-style: none;
    gap: 4px;
    transition: all var(--transition-normal);
}

.nav-links > li > a,
.nav-links > li > .dropdown-toggle {
    text-decoration: none;
    color: var(--text-muted) !important;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
    padding: 8px 16px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: transparent;
}

.nav-links > li > a:hover:not(.active),
.nav-links > li > .dropdown-toggle:hover:not(.active),
.nav-links > li.dropdown:hover > a.dropdown-toggle:not(.active) {
    color: var(--primary) !important;
    background: rgba(192, 54, 52, 0.06) !important;
    transform: translateY(-1px) scale(1.03);
}

.nav-links > li > a.active,
.nav-links > li > .dropdown-toggle.active {
    color: #ffffff !important;
    background: var(--primary) !important;
    box-shadow: 0 4px 12px var(--primary-glow) !important;
}

.nav-links > li > a.active:hover,
.nav-links > li > .dropdown-toggle.active:hover {
    background: var(--primary-hover) !important;
    box-shadow: 0 4px 15px var(--primary-glow) !important;
    transform: translateY(-1px) scale(1.03);
}

/* Dropdown Navigation Menu */
.nav-links li.dropdown {
    position: relative;
}

.nav-links .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.nav-links .dropdown-toggle .caret {
    font-size: 10px;
    color: currentColor;
    opacity: 0.8;
    transition: transform var(--transition-fast);
}

.nav-links .dropdown:hover .dropdown-toggle .caret {
    transform: rotate(180deg);
}

.nav-links .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(13, 15, 23, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 190px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    list-style: none;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1000;
}

[data-theme="light"] .nav-links .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.nav-links .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-links .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-muted) !important;
    background: transparent !important;
    border-radius: 0;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-links .dropdown-menu a:hover {
    color: var(--text-main) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="light"] .nav-links .dropdown-menu a:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

/* Toggles & Widgets */
.nav-widgets {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-social-link, .header-social-link:visited {
    color: var(--text-main) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.header-social-link:hover {
    color: var(--primary) !important;
    border-color: var(--primary);
    transform: scale(1.05);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    border-radius: 50%;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--text-main);
    transform: scale(1.1);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition-fast), transform var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
}

.user-badge img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary);
}

/* User Dropdown in Nav Widgets */
.nav-widgets .dropdown {
    position: relative;
}

.nav-widgets .dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-widgets .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    transform: translateY(10px);
    background: rgba(13, 15, 23, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 170px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    list-style: none;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1000;
}

[data-theme="light"] .nav-widgets .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.nav-widgets .dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-widgets .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.nav-widgets .dropdown-menu a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .nav-widgets .dropdown-menu a:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-widgets .dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* --- HERO SECTION --- */
.hero {
    padding: 100px 0;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(105deg, rgba(13, 15, 23, 0.94) 30%, rgba(13, 15, 23, 0.8) 55%, rgba(13, 15, 23, 0.25) 100%);
    z-index: 1;
    pointer-events: none;
}

[data-theme="light"] .hero::before {
    background: linear-gradient(105deg, rgba(248, 250, 252, 0.96) 30%, rgba(248, 250, 252, 0.85) 55%, rgba(248, 250, 252, 0.3) 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-main) 60%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.search-box {
    position: relative;
    max-width: 500px;
}

.search-box input {
    width: 100%;
    padding: 14px 20px;
    padding-right: 50px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 16px;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-box button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
}

/* Hero Banner & Glow Effect */
.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero:hover .hero-image-container {
    opacity: 0;
    transform: scale(0.94);
    pointer-events: none;
}

.hero-banner-wrapper {
    position: relative;
    width: 100%;
    max-width: 440px;
    transition: transform var(--transition-normal);
    cursor: pointer;
}

.hero-banner-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), 
                box-shadow 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

.banner-glow-effect {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background: linear-gradient(135deg, #ff3e3e, #f6e05e, #3182ce, #805ad5);
    background-size: 300% 300%;
    border-radius: 24px;
    filter: blur(25px);
    opacity: 0.2;
    z-index: 1;
    transition: opacity 0.5s ease, filter 0.5s ease;
    animation: glow-animation 8s ease infinite;
}

/* Hover States */
.hero-banner-wrapper:hover {
    transform: translateY(-8px);
}

.hero-banner-wrapper:hover .hero-banner-img {
    transform: scale(1.03);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.hero-banner-wrapper:hover .banner-glow-effect {
    opacity: 0.5;
    filter: blur(35px);
}

/* Glow gradient shift animation */
@keyframes glow-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- ALERTAS FLASH FLOATING TOASTS --- */
.alert {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 1000;
    min-width: 280px;
    max-width: 450px;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    animation: alertSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards, alertFadeOut 0.5s ease 5s forwards;
    border-left: 4px solid currentColor;
}

/* Evitar estiramiento vertical en alertas dinámicas con posición bottom inline */
.alert[style*="bottom"] {
    top: auto !important;
}

/* Light Theme Colors (Default) */
.alert-success {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    border-left-width: 4px;
}

.alert-error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-left-width: 4px;
}

/* Dark Theme Colors */
[data-theme="dark"] .alert-success {
    background-color: #061f0d;
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-left: 4px solid #4ade80;
}

[data-theme="dark"] .alert-error {
    background-color: #2a0f0f;
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-left: 4px solid #f87171;
}

@keyframes alertSlideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes alertFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
        visibility: hidden;
    }
}

@media (max-width: 768px) {
    .alert {
        left: 20px;
        right: 20px;
        max-width: none;
        top: 80px;
    }
}

/* --- SECCIONES HOME / GRIDS GENERALES --- */
.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.home-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

/* Tarjetas */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(192, 54, 52, 0.3);
    box-shadow: var(--shadow-md);
}

/* --- POKÉDEX LIST & CARDS --- */
.pokedex-filters {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.filter-group select, 
.filter-group input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px;
    border-radius: 8px;
    outline: none;
    font-family: var(--font-primary);
}

.pokedex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.pokemon-card {
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

.pokemon-number {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.pokemon-card img {
    width: 120px;
    height: 120px;
    margin: 10px auto;
    object-fit: contain;
    transition: transform var(--transition-normal);
}

.pokemon-card:hover img {
    transform: scale(1.1) translateY(-5px);
}

.pokemon-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-inverse);
    margin: 0 4px;
}

/* Colores de tipo en base a variables */
.type-badge.planta { background-color: var(--type-planta); }
.type-badge.fuego { background-color: var(--type-fuego); }
.type-badge.agua { background-color: var(--type-agua); }
.type-badge.electrico { background-color: var(--type-electrico); }
.type-badge.veneno { background-color: var(--type-veneno); }
.type-badge.psiquico { background-color: var(--type-psiquico); }
.type-badge.fantasma { background-color: var(--type-fantasma); }
.type-badge.normal { background-color: var(--type-normal); }
.type-badge.volador { background-color: var(--type-volador); color: var(--text-main); }
.type-badge.roca { background-color: var(--type-roca); }
.type-badge.tierra { background-color: var(--type-tierra); }
.type-badge.lucha { background-color: var(--type-lucha); }
.type-badge.bicho { background-color: var(--type-bicho); }
.type-badge.siniestro { background-color: var(--type-siniestro); color: white; }

/* --- DETALLE DE POKÉMON --- */
.pokemon-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    margin: 40px 0;
}

.pokemon-media {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.pokemon-media img {
    max-width: 100%;
    height: 300px;
    object-fit: contain;
}

.btn-favorite {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-favorite.active {
    background: rgba(192, 54, 52, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.pokemon-info h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
}

.pokemon-meta-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    background: var(--bg-body);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
}

.stat-bar-group {
    margin-bottom: 12px;
}

.stat-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 4px;
}

.stat-bar-bg {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* --- NOTICIAS --- */
.news-featured-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.news-featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(192, 54, 52, 0.08), var(--shadow-md);
    border-color: rgba(192, 54, 52, 0.25);
}

.news-featured-img {
    height: 100%;
    min-height: 350px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.news-featured-card:hover .news-featured-img {
    transform: scale(1.03);
}

.news-featured-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-category-badge {
    background: rgba(192, 54, 52, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    align-self: flex-start;
    margin-bottom: 12px;
}

.news-featured-content h2 {
    font-size: 26px;
    line-height: 1.3;
    margin-bottom: 15px;
    font-weight: 800;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.news-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
    box-shadow: var(--shadow-sm);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(192, 54, 52, 0.05), var(--shadow-md);
    border-color: rgba(192, 54, 52, 0.18);
}

.news-card img {
    height: 180px;
    width: 100%;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

/* --- QUILL WYSIWYG EDITOR CUSTOM STYLES --- */
.ql-toolbar.ql-snow {
    border: 1.5px solid var(--border-color) !important;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background: var(--bg-card);
    padding: 8px 12px !important;
}
.ql-container.ql-snow {
    border: 1.5px solid var(--border-color) !important;
    border-top: none !important;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background: var(--bg-input);
    font-family: var(--font-primary) !important;
}
.ql-editor {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
}
.ql-editor.ql-blank::before {
    color: var(--text-muted) !important;
    font-style: normal !important;
    opacity: 0.6;
}

.news-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

/* --- DETALLE NOTICIA & COMENTARIOS --- */
article {
    max-width: 860px;
    margin: 0 auto;
}

.news-header {
    margin: 40px 0 24px 0;
    text-align: center;
}

.news-header h1 {
    font-size: 36px !important;
    font-weight: 800;
    line-height: 1.25;
    margin-top: 15px;
    margin-bottom: 15px;
}

.news-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.news-banner {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 35px;
}

.news-body {
    font-size: 17px;
    line-height: 1.75;
    margin-bottom: 60px;
    color: var(--text-main);
}

.news-body p {
    margin-top: 0;
    margin-bottom: 12px;
    text-align: justify;
}

.news-body p:empty,
.news-body p:has(br:only-child) {
    margin: 6px 0;
    height: 8px;
    line-height: 1;
}

.news-body h2 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 14px;
    color: var(--text-main);
    border-left: 4px solid var(--primary);
    padding-left: 14px;
    line-height: 1.35;
}

.news-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 10px;
    color: var(--text-main);
    line-height: 1.35;
}

.news-body ul,
.news-body ol {
    margin-top: 0;
    margin-bottom: 18px;
    padding-left: 0;
}

.news-body ul li,
.news-body ol li {
    position: relative;
    list-style-type: none;
    padding-left: 26px;
    margin-bottom: 6px;
    font-size: 16px;
    line-height: 1.5;
}

.news-body ul li::before,
.news-body ol li[data-list="bullet"]::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    font-size: 26px;
    position: absolute;
    left: 6px;
    top: -5px;
}

.news-body ol {
    counter-reset: ql-counter;
}

.news-body ol li {
    counter-increment: ql-counter;
}

.news-body ol li::before {
    content: counter(ql-counter) ".";
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
    position: absolute;
    left: 6px;
    top: 0;
}

.news-body ol li[data-list="bullet"] {
    counter-increment: none;
}

.news-body strong {
    color: var(--text-main);
    font-weight: 700;
}

.news-body a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.news-body a:hover {
    color: var(--primary-hover);
}

.news-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px auto;
    display: block;
    box-shadow: var(--shadow-sm);
}

.comments-section {
    max-width: 860px;
    margin: 0 auto 60px auto;
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

.comment-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    height: 120px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    padding: 12px;
    outline: none;
    margin-bottom: 15px;
    font-family: var(--font-primary);
}

.comment-form textarea:focus {
    border-color: var(--primary);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: flex;
    gap: 15px;
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content h4 {
    font-size: 15px;
    margin-bottom: 5px;
}

.comment-content p {
    font-size: 14px;
    color: var(--text-muted);
}

/* --- TCG & CARTAS --- */
.tcg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.tcg-card {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.tcg-card img {
    max-width: 100%;
    height: 250px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* --- GUÍAS --- */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.guide-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --- EVENTOS --- */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.event-details h3 {
    margin-bottom: 5px;
}

.event-type-badge {
    background: rgba(192, 54, 52, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

/* --- FORMULARIOS (LOGIN, REGISTRO, PERFIL) --- */
.auth-container {
    max-width: 450px;
    margin: 60px auto;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px;
    border-radius: 8px;
    outline: none;
    font-family: var(--font-primary);
}

.form-group input:focus {
    border-color: var(--primary);
}

/* --- PANEL DE ADMINISTRACIÓN --- */
.admin-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: calc(100vh - 70px);
}

.admin-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.admin-nav a {
    padding: 12px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.admin-nav a:hover, 
.admin-nav a.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--primary);
}

.admin-content {
    padding: 40px;
    background: var(--bg-body);
    min-width: 0;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.admin-stat-card h3 {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.admin-stat-card p {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.admin-table th, 
.admin-table td {
    padding: 15px 20px;
    text-align: left;
}

.admin-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    word-break: break-word;
}

.admin-table tr:hover {
    background: rgba(255,255,255,0.01);
}

/* Modales y Formularios Admin */
.admin-form-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 40px;
}

/* --- FOOTER --- */
footer {
    background-color: #090b11;
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px 0;
    margin-top: 80px;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="light"] footer {
    background-color: #f1f5f9;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.04);
}

.footer-logo img {
    height: 42px;
    object-fit: contain;
    display: block;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.6;
    max-width: 380px;
}

[data-theme="light"] .footer-brand p {
    color: #475569;
}

.footer-links h3 {
    font-size: 15px;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-main);
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14.5px;
    transition: color var(--transition-fast);
}

[data-theme="light"] .footer-links a {
    color: #475569;
}

.footer-links a:hover {
    color: var(--primary);
}

[data-theme="light"] .footer-links a:hover {
    color: var(--primary);
}

.footer-disclaimer {
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

[data-theme="light"] .footer-disclaimer {
    color: #475569;
}

/* --- RESPONSIVIDAD GENERAL --- */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 { font-size: 36px; }
    
    .search-box { margin: 0 auto; }
    
    .home-grid { grid-template-columns: 1fr; }
    
    .pokemon-detail-grid { grid-template-columns: 1fr; }
    
    .news-featured-card { grid-template-columns: 1fr; }
    
    .news-featured-img { height: 200px; }
    
    .admin-layout { grid-template-columns: 1fr; }
    
    .admin-sidebar { border-right: none; border-bottom: 1px solid var(--border-color); }
    
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 600px) {
    .navbar { flex-direction: column; height: auto; padding: 15px 0; gap: 15px; }
    .nav-links { flex-wrap: wrap; justify-content: center; }
    .event-item { flex-direction: column; align-items: flex-start; gap: 15px; }
}

/* --- MODALES --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Premium Modals Custom Styling */
.modal-premium-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 48px;
    margin-bottom: 20px;
    height: 60px;
}
.modal-premium-icon-success {
    color: #4ade80;
    text-shadow: 0 0 15px rgba(74, 222, 128, 0.3);
}
.modal-premium-icon-error {
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
}
.modal-premium-icon-info {
    color: #3182ce;
    text-shadow: 0 0 15px rgba(49, 130, 206, 0.3);
}
.modal-premium-icon-question {
    color: var(--accent);
    text-shadow: 0 0 15px rgba(246, 224, 94, 0.3);
}
.btn-qty-adj {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s;
    user-select: none;
}
.btn-qty-adj:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.btn-qty-adj:active {
    transform: scale(0.9);
}
.modal-premium-close {
    cursor: pointer;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-muted);
    transition: color 0.2s;
    line-height: 1;
}
.modal-premium-close:hover {
    color: var(--primary);
}

.btn-tab {
    background-color: var(--bg-body);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-tab:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-main);
}

.btn-tab.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.avatar-option-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-option-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.avatar-option-card.selected {
    border-color: var(--primary);
    background-color: rgba(239, 68, 68, 0.1);
}

.avatar-option-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.avatar-option-card h5 {
    font-size: 13px;
    margin-top: 5px;
    font-weight: 600;
    color: var(--text-main);
}

/* --- CARNET DE ENTRENADOR (TRAINER CARD) --- */
.trainer-card {
    background: linear-gradient(135deg, rgba(21, 24, 36, 0.95), rgba(13, 15, 23, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border-left: 6px solid var(--primary);
    transition: background var(--transition-normal), border var(--transition-normal), box-shadow var(--transition-normal);
}

[data-theme="light"] .trainer-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.98));
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.trainer-card::before {
    content: "";
    position: absolute;
    bottom: -35px;
    right: -35px;
    width: 180px;
    height: 180px;
    background: url('../uploads/logo.png') no-repeat center/contain;
    opacity: 0.07;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

[data-theme="light"] .trainer-card::before {
    opacity: 0.04;
}

.trainer-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.trainer-card-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 800;
    color: var(--primary);
}

.trainer-card-id {
    font-family: monospace;
    font-size: 13px;
    color: var(--text-muted);
}

.trainer-card-body {
    display: flex;
    gap: 24px;
    align-items: center;
}

.trainer-card-photo-container {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    border: 2px solid var(--primary);
    background-color: var(--bg-body);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 2px 8px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border var(--transition-normal), background-color var(--transition-normal);
}

.trainer-card-photo-container::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.04), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.04));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    opacity: 0.4;
}

.trainer-card-photo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    z-index: 2;
}

.trainer-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.trainer-card-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.trainer-card-class {
    font-size: 10px;
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

[data-theme="light"] .trainer-card-class {
    color: #b45309; /* Un tono más oscuro y legible de amarillo/naranja en modo claro */
}

.trainer-card-stats {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.trainer-card-stats strong {
    color: var(--text-main);
}

.trainer-card-badges {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.trainer-badge-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-muted);
    opacity: 0.25;
    transition: all var(--transition-normal);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

[data-theme="light"] .trainer-badge-icon {
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    background-color: #e2e8f0;
}

.trainer-badge-icon.active {
    opacity: 1;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Colores de Medallas de Gimnasio Activas (Estilo Metálico/Neón) */
.trainer-badge-icon.active.badge-1 {
    background: linear-gradient(135deg, #4ade80, #166534);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.trainer-badge-icon.active.badge-2 {
    background: linear-gradient(135deg, #f87171, #991b1b);
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.trainer-badge-icon.active.badge-3 {
    background: linear-gradient(135deg, #60a5fa, #1e40af);
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.trainer-badge-icon.active.badge-4 {
    background: linear-gradient(135deg, #facc15, #854d0e);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.trainer-badge-icon.active.badge-5 {
    background: linear-gradient(135deg, #94a3b8, #334155);
    box-shadow: 0 0 12px rgba(148, 163, 184, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.trainer-badge-icon.active.badge-6 {
    background: linear-gradient(135deg, #c084fc, #581c87);
    box-shadow: 0 0 12px rgba(192, 132, 252, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.trainer-badge-icon.active.badge-7 {
    background: linear-gradient(135deg, #a5f3fc, #0369a1);
    box-shadow: 0 0 12px rgba(165, 243, 252, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.trainer-badge-icon.active.badge-8 {
    background: linear-gradient(135deg, #f472b6, #9d174d);
    box-shadow: 0 0 12px rgba(244, 114, 182, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* TCG Card Collection styles */
.tcg-card {
    position: relative;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.tcg-card.collected {
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 0 15px rgba(96, 165, 250, 0.15);
    background: linear-gradient(to bottom, var(--bg-card), rgba(96, 165, 250, 0.03));
}

.collection-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.btn-collection-adjust {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-collection-adjust:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-collection-adjust:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.collection-qty {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    min-width: 20px;
    text-align: center;
}

.collected-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: #1a202c;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Stat card styles for TCG album */
.collection-stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.collection-stat-title {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.collection-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

/* --- ESTILOS GLOBALES DE FORMULARIOS --- */
input[type="text"], 
input[type="email"], 
input[type="password"], 
select, 
textarea {
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    color: var(--text-main);
    border-radius: 8px;
    outline: none;
    font-family: var(--font-primary);
    font-size: 14.5px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

input[type="text"]::placeholder, 
input[type="email"]::placeholder, 
input[type="password"]::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

input[type="text"]:hover, 
input[type="email"]:hover, 
input[type="password"]:hover,
select:hover,
textarea:hover {
    border-color: var(--text-muted);
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(255, 255, 255, 0.01);
}

[data-theme="light"] input[type="text"]:focus, 
[data-theme="light"] input[type="email"]:focus, 
[data-theme="light"] input[type="password"]:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    background: #ffffff;
}

/* --- ESTILOS PREMIUM PARA EL ÁLBUM TCG --- */
.profile-section-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.tcg-album-scroll {
    max-height: 440px;
    overflow-y: auto;
    padding-right: 8px;
}

.tcg-album-scroll::-webkit-scrollbar {
    width: 6px;
}

.tcg-album-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
}

.tcg-album-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.tcg-album-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.profile-tcg-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.profile-tcg-card:hover {
    transform: translateY(-5px);
    border-color: rgba(192, 54, 52, 0.25);
    box-shadow: 0 10px 20px rgba(192, 54, 52, 0.05), var(--shadow-md);
}

.profile-tcg-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--text-main);
    color: var(--text-inverse);
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 30px;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.profile-tcg-card-img-wrapper {
    position: relative;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: visible;
}

.profile-tcg-card-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
    transition: transform var(--transition-normal), filter var(--transition-normal);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.profile-tcg-card:hover .profile-tcg-card-img {
    transform: translateY(-2px) scale(1.03);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
}

.profile-tcg-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
}

.profile-tcg-card-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin: 0;
}

.profile-tcg-card-set {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.profile-tcg-card-price {
    font-size: 12px;
    font-weight: 800;
    color: #2f855a;
    margin-top: 4px;
    background: rgba(56, 161, 105, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    align-self: center;
}

/* Pestañas de Perfil Modernas */
.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.profile-tabs .btn-tab {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.profile-tabs .btn-tab:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-main);
}

.profile-tabs .btn-tab.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Contenido de Pestañas con Transiciones Suaves */
.tab-content {
    display: none;
    animation: fadeInTab 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-content.active {
    display: block;
}

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

/* Botón de Quitar Favorito Premium */
.btn-remove-fav {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(192, 54, 52, 0.08) !important;
    border: none;
    color: var(--primary) !important;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-remove-fav:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    transform: scale(1.15) rotate(-8deg);
    box-shadow: 0 4px 10px var(--primary-glow);
}

.btn-remove-fav:hover i::before {
    content: "\f7a9" !important; /* fa-heart-crack en FontAwesome 6 */
}

/* Botón de Quitar Carta del Álbum TCG */
.btn-delete-tcg {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(192, 54, 52, 0.08) !important;
    border: none;
    color: var(--primary) !important;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-delete-tcg:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    transform: scale(1.15);
    box-shadow: 0 4px 10px var(--primary-glow);
}

