/* ==========================================================================
   HABBO HOTEL RETRO THEME (2003-2006 Classic Era) — PikaSaur Auto-Buyer
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Silkscreen:wght@400;700&family=Inter:wght@400;500;600;700;800&display=swap');

/* ── ESTILOS Y TEMAS DE COLOR ────────────────────────────────────────────── */
:root, [data-theme="gold"] {
    --habbo-bg: #1c687d;
    --habbo-bg-pattern: #175768;
    --habbo-main-box: #e59d24;
    --habbo-main-box-inner: #f1ab33;
    --habbo-border: #1e1e1e;
    --habbo-header-bg: #d78d16;
    --habbo-tab-active: #f3b747;
    --habbo-tab-inactive: #c88110;
    --habbo-tab-active-text: #1e1e1e;
    --habbo-card-bg: #ffffff;
    --habbo-card-header: #e6e6e6;
    --habbo-card-text: #1a1a1a;
    --habbo-text-primary: #1e1e1e;
    --habbo-subtext: #475569;
    --habbo-heading: #0f172a;
    --habbo-input-bg: #ffffff;
    --habbo-input-text: #1e1e1e;
    --habbo-box-subcard-bg: #f8fafc;
    --habbo-box-subcard-border: #cbd5e1;
    --habbo-accent: #e59d24;
    --habbo-badge-bg: #f9c73d;
    --habbo-badge-border: #9b6c00;
}

[data-theme="blue"] {
    --habbo-bg: #0f2b48;
    --habbo-bg-pattern: #0a1f35;
    --habbo-main-box: #2b70b8;
    --habbo-main-box-inner: #3a81cd;
    --habbo-border: #111e2e;
    --habbo-header-bg: #1f5997;
    --habbo-tab-active: #4a90dc;
    --habbo-tab-inactive: #1a497c;
    --habbo-tab-active-text: #ffffff;
    --habbo-card-bg: #ffffff;
    --habbo-card-header: #e2ebf5;
    --habbo-card-text: #0f172a;
    --habbo-text-primary: #ffffff;
    --habbo-subtext: #475569;
    --habbo-heading: #0f172a;
    --habbo-input-bg: #ffffff;
    --habbo-input-text: #1e1e1e;
    --habbo-box-subcard-bg: #f8fafc;
    --habbo-box-subcard-border: #cbd5e1;
    --habbo-accent: #2b70b8;
    --habbo-badge-bg: #3b82f6;
    --habbo-badge-border: #1d4ed8;
}

[data-theme="purple"] {
    --habbo-bg: #2e1747;
    --habbo-bg-pattern: #221037;
    --habbo-main-box: #8b3ab8;
    --habbo-main-box-inner: #9c47cd;
    --habbo-border: #1e0b30;
    --habbo-header-bg: #6f2699;
    --habbo-tab-active: #aa58dc;
    --habbo-tab-inactive: #571a7c;
    --habbo-tab-active-text: #ffffff;
    --habbo-card-bg: #ffffff;
    --habbo-card-header: #f3e8fa;
    --habbo-card-text: #1e0b30;
    --habbo-text-primary: #ffffff;
    --habbo-subtext: #475569;
    --habbo-heading: #0f172a;
    --habbo-input-bg: #ffffff;
    --habbo-input-text: #1e1e1e;
    --habbo-box-subcard-bg: #f8fafc;
    --habbo-box-subcard-border: #cbd5e1;
    --habbo-accent: #8b3ab8;
    --habbo-badge-bg: #a855f7;
    --habbo-badge-border: #7e22ce;
}

[data-theme="green"] {
    --habbo-bg: #0c3826;
    --habbo-bg-pattern: #07281b;
    --habbo-main-box: #249964;
    --habbo-main-box-inner: #2db075;
    --habbo-border: #092016;
    --habbo-header-bg: #1a7a4f;
    --habbo-tab-active: #3cc888;
    --habbo-tab-inactive: #135d3b;
    --habbo-tab-active-text: #ffffff;
    --habbo-card-bg: #ffffff;
    --habbo-card-header: #e6f7f0;
    --habbo-card-text: #062619;
    --habbo-text-primary: #ffffff;
    --habbo-subtext: #475569;
    --habbo-heading: #0f172a;
    --habbo-input-bg: #ffffff;
    --habbo-input-text: #1e1e1e;
    --habbo-box-subcard-bg: #f8fafc;
    --habbo-box-subcard-border: #cbd5e1;
    --habbo-accent: #249964;
    --habbo-badge-bg: #10b981;
    --habbo-badge-border: #047857;
}

[data-theme="red"] {
    --habbo-bg: #4a1515;
    --habbo-bg-pattern: #360e0e;
    --habbo-main-box: #c83838;
    --habbo-main-box-inner: #db4848;
    --habbo-border: #260a0a;
    --habbo-header-bg: #a62626;
    --habbo-tab-active: #ec5d5d;
    --habbo-tab-inactive: #841b1b;
    --habbo-tab-active-text: #ffffff;
    --habbo-card-bg: #ffffff;
    --habbo-card-header: #fde8e8;
    --habbo-card-text: #260a0a;
    --habbo-text-primary: #ffffff;
    --habbo-subtext: #475569;
    --habbo-heading: #0f172a;
    --habbo-input-bg: #ffffff;
    --habbo-input-text: #1e1e1e;
    --habbo-box-subcard-bg: #f8fafc;
    --habbo-box-subcard-border: #cbd5e1;
    --habbo-accent: #c83838;
    --habbo-badge-bg: #ef4444;
    --habbo-badge-border: #b91c1c;
}

[data-theme="dark"] {
    --habbo-bg: #0f172a;
    --habbo-bg-pattern: #070b14;
    --habbo-main-box: #1e293b;
    --habbo-main-box-inner: #2d3d54;
    --habbo-border: #090d16;
    --habbo-header-bg: #1e293b;
    --habbo-tab-active: #334155;
    --habbo-tab-inactive: #0f172a;
    --habbo-tab-active-text: #f8fafc;
    --habbo-card-bg: #1e293b;
    --habbo-card-header: #334155;
    --habbo-card-text: #f8fafc;
    --habbo-text-primary: #f8fafc;
    --habbo-subtext: #94a3b8;
    --habbo-heading: #f8fafc;
    --habbo-input-bg: #0f172a;
    --habbo-input-text: #f8fafc;
    --habbo-box-subcard-bg: #0f172a;
    --habbo-box-subcard-border: #334155;
    --habbo-accent: #3b82f6;
    --habbo-badge-bg: #eab308;
    --habbo-badge-border: #854d0e;
}

/* ── UTILITY CLASSES & OVERRIDES MODO OSCURO ────────────────────────────── */
.text-heading { color: var(--habbo-heading) !important; }
.text-sub { color: var(--habbo-subtext) !important; }

.habbo-subcard {
    background-color: var(--habbo-box-subcard-bg);
    border-color: var(--habbo-box-subcard-border);
    color: var(--habbo-card-text);
}

[data-theme="dark"] ::placeholder {
    color: #94a3b8 !important;
    opacity: 0.8;
}

[data-theme="dark"] .habbo-subcard {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .text-sub,
[data-theme="dark"] [style*="color: #475569"],
[data-theme="dark"] [style*="color:#475569"],
[data-theme="dark"] [style*="color: #64748b"],
[data-theme="dark"] [style*="color:#64748b"] {
    color: #94a3b8 !important;
}

[data-theme="dark"] .text-heading,
[data-theme="dark"] [style*="color: #0f172a"],
[data-theme="dark"] [style*="color:#0f172a"],
[data-theme="dark"] [style*="color: #1e1e1e"],
[data-theme="dark"] [style*="color:#1e1e1e"] {
    color: #f8fafc !important;
}

[data-theme="dark"] .habbo-checkin-badge {
    background: #eab308 !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

/* ── BASE & GLOBAL ANIMATED ELEMENTAL BACKGROUNDS ──────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.habbo-theme {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--habbo-text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    transition: background 0.5s ease;
}

/* 🟡 DORADO — Eléctrico (Gradiente Rayos) */
:root, [data-theme="gold"] {
    background: radial-gradient(circle at 50% 30%, #1c687d 0%, #0d3844 100%);
    background-size: 180% 180%;
    animation: themeGoldBg 12s ease-in-out infinite alternate;
}
@keyframes themeGoldBg {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* 🔵 AZUL — Lluvia / Agua (Gradiente Oceánico) */
[data-theme="blue"] {
    background: radial-gradient(circle at 50% 40%, #17426e 0%, #061528 100%);
    background-size: 180% 180%;
    animation: themeBlueBg 10s ease-in-out infinite alternate;
}
@keyframes themeBlueBg {
    0% { background-position: 0% 100%; }
    50% { background-position: 100% 0%; }
    100% { background-position: 0% 100%; }
}

/* 🟣 PÚRPURA — Psíquico / Aura Cósmica */
[data-theme="purple"] {
    background: radial-gradient(circle at 50% 50%, #4a1973 0%, #140524 100%);
    background-size: 180% 180%;
    animation: themePurpleBg 14s ease-in-out infinite alternate;
}
@keyframes themePurpleBg {
    0% { background-position: 100% 0%; }
    50% { background-position: 0% 100%; }
    100% { background-position: 100% 0%; }
}

/* 🟢 VERDE — Hojas / Bosque Esmeralda */
[data-theme="green"] {
    background: radial-gradient(circle at 50% 30%, #0e4c32 0%, #041c12 100%);
    background-size: 180% 180%;
    animation: themeGreenBg 12s ease-in-out infinite alternate;
}
@keyframes themeGreenBg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 🔴 ROJO — Fuego / Magma */
[data-theme="red"] {
    background: radial-gradient(circle at 50% 40%, #6e1a1a 0%, #1f0505 100%);
    background-size: 180% 180%;
    animation: themeRedBg 10s ease-in-out infinite alternate;
}
@keyframes themeRedBg {
    0% { background-position: 100% 50%; }
    50% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* 🖤 MODO OSCURO — Cielo Estelar Nocturno */
[data-theme="dark"] {
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #020617 100%);
    background-size: 180% 180%;
    animation: themeDarkBg 16s ease-in-out infinite alternate;
}
@keyframes themeDarkBg {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* ── OVERLAY DE PATRÓN RETRO HABBO ──────────────────────────────────────── */
body.habbo-theme::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.07) 15%, transparent 16%),
        radial-gradient(rgba(255, 255, 255, 0.07) 15%, transparent 16%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    pointer-events: none;
    z-index: 0;
}

/* ── CONTENEDOR DE EFECTOS ELEMENTALES DE FONDO ────────────────────────── */
.elemental-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.elemental-particle {
    position: absolute;
    user-select: none;
    pointer-events: none;
}

/* 🔵 AZUL: LLUVIA ANIMADA CAYENDO */
[data-theme="blue"] .elemental-particle {
    width: 2px;
    height: 22px;
    background: linear-gradient(to bottom, transparent, rgba(96, 165, 250, 0.8), #93c5fd);
    border-radius: 2px;
    animation: rainFall 1.1s linear infinite;
}

@keyframes rainFall {
    0% { transform: translateY(-30px); opacity: 0; }
    30% { opacity: 0.85; }
    100% { transform: translateY(105vh); opacity: 0.15; }
}

/* 🔴 ROJO: FUEGO Y BRASAS ASCENDIENDO */
[data-theme="red"] .elemental-particle {
    width: 6px;
    height: 6px;
    background: #f97316;
    border-radius: 50%;
    box-shadow: 0 0 10px #ef4444, 0 0 20px #dc2626;
    animation: fireRise 3.2s ease-in infinite;
}

@keyframes fireRise {
    0% { transform: translateY(105vh) scale(0.6); opacity: 0; }
    20% { opacity: 0.9; }
    80% { opacity: 0.7; }
    100% { transform: translateY(-30px) scale(1.4); opacity: 0; }
}

/* 🟡 DORADO: CHISPAS ELÉCTRICAS FLOTANDO */
[data-theme="gold"] .elemental-particle {
    width: 4px;
    height: 10px;
    background: #facc15;
    box-shadow: 0 0 12px #eab308;
    transform: rotate(15deg);
    animation: sparkFlash 2.4s ease-in-out infinite alternate;
}

@keyframes sparkFlash {
    0% { transform: scale(0.5) translateY(0); opacity: 0.1; }
    50% { transform: scale(1.3) translateY(-45vh); opacity: 0.9; }
    100% { transform: scale(0.8) translateY(-90vh); opacity: 0.2; }
}

/* 🟢 VERDE: HOJAS ESMERALDA CAYENDO Y MECIÉNDOSE */
[data-theme="green"] .elemental-particle {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 10px 0 10px 0;
    box-shadow: 0 0 8px #15803d;
    animation: leafSway 6.5s ease-in-out infinite;
}

@keyframes leafSway {
    0% { transform: translateY(-20px) rotate(0deg) translateX(0); opacity: 0; }
    20% { opacity: 0.85; }
    50% { transform: translateY(50vh) rotate(180deg) translateX(35px); }
    100% { transform: translateY(105vh) rotate(360deg) translateX(-25px); opacity: 0.1; }
}

/* 🟣 PÚRPURA: AURA PSÍQUICA & DESTELLOS */
[data-theme="purple"] .elemental-particle {
    width: 8px;
    height: 8px;
    background: #c084fc;
    border-radius: 50%;
    box-shadow: 0 0 14px #a855f7, 0 0 24px #7e22ce;
    animation: psychicPulse 4.2s ease-in-out infinite alternate;
}

@keyframes psychicPulse {
    0% { transform: scale(0.4) translateY(100vh); opacity: 0.1; }
    50% { transform: scale(1.5) translateY(50vh); opacity: 0.9; }
    100% { transform: scale(0.6) translateY(0vh); opacity: 0.1; }
}

/* 🖤 MODO OSCURO: ESTRELLAS FUGACES PARPADEANTES */
[data-theme="dark"] .elemental-particle {
    width: 3px;
    height: 3px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 8px #94a3b8, 0 0 15px #38bdf8;
    animation: starTwinkle 3s ease-in-out infinite alternate;
}

@keyframes starTwinkle {
    0% { opacity: 0.1; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.6); }
    100% { opacity: 0.2; transform: scale(0.9); }
}

/* POSICIONAMIENTO DIFERENCIADO DE LAS 12 PARTÍCULAS */
.elemental-particle.p1 { left: 4%; animation-delay: 0s; }
.elemental-particle.p2 { left: 15%; animation-delay: -0.3s; }
.elemental-particle.p3 { left: 27%; animation-delay: -0.7s; }
.elemental-particle.p4 { left: 39%; animation-delay: -1.1s; }
.elemental-particle.p5 { left: 52%; animation-delay: -0.2s; }
.elemental-particle.p6 { left: 64%; animation-delay: -0.5s; }
.elemental-particle.p7 { left: 76%; animation-delay: -0.9s; }
.elemental-particle.p8 { left: 88%; animation-delay: -0.4s; }
.elemental-particle.p9 { left: 10%; animation-delay: -1.3s; }
.elemental-particle.p10 { left: 22%; animation-delay: -1.7s; }
.elemental-particle.p11 { left: 58%; animation-delay: -2.0s; }
.elemental-particle.p12 { left: 82%; animation-delay: -1.5s; }

/* ── WRAPPER DE ALINEACIÓN SUPERIOR ────────────────────────────────────── */
.habbo-main-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 10px 0 40px 0;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* ── HABBO RETRO TOP BAR / LOGO ─────────────────────────────────────────── */
.habbo-header {
    max-width: 1320px;
    width: calc(100% - 32px);
    margin: 0 auto;
    padding: 10px 10px 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    box-sizing: border-box;
}

.habbo-logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.habbo-logo-box {
    background: #e72c2c;
    border: 3px solid #000;
    border-radius: 8px;
    padding: 6px 16px;
    box-shadow: inset 2px 2px 0px rgba(255,255,255,0.4), inset -2px -2px 0px rgba(0,0,0,0.4), 3px 3px 0px #000;
    transform: rotate(-1deg);
}

.habbo-logo-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.3rem;
    color: #fff;
    text-shadow: 2px 2px 0px #000, -1px -1px 0px #000;
    letter-spacing: -1px;
}

.habbo-hotel-badge {
    background: rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Silkscreen', cursive;
    white-space: nowrap;
    line-height: 1.2;
    box-sizing: border-box;
}

.habbo-badge-user {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffe600;
}

.habbo-badge-amazon {
    cursor: pointer;
}

.habbo-menu-btn {
    padding: 6px 12px;
    font-size: 1.1rem;
    line-height: 1;
}

.habbo-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.habbo-user-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.habbo-theme-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.5);
    border: 2px solid #000;
    padding: 4px 8px;
    border-radius: 8px;
}

.theme-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    transition: transform 0.15s, border-color 0.15s;
}

.theme-btn:hover, .theme-btn.active {
    transform: scale(1.2);
    border-color: #ffe600;
}

.theme-btn.gold { background: #e59d24; }
.theme-btn.blue { background: #2b70b8; }
.theme-btn.purple { background: #8b3ab8; }
.theme-btn.green { background: #249964; }
.theme-btn.red { background: #c83838; }
.theme-btn.dark { background: #283447; }

/* ── DROPDOWN MENÚ DE TEMAS DE COLOR HABBO (DESPLEGABLE ☰) ───────────── */
.habbo-menu-container {
    position: relative;
    display: inline-block;
}

.habbo-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--habbo-card-bg);
    border: 3px solid var(--habbo-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 1px 1px 0px rgba(255, 255, 255, 0.2);
    width: 210px;
    z-index: 1000;
    overflow: hidden;
    animation: habboMenuFadeIn 0.15s ease-out;
}

.habbo-dropdown-menu.show {
    display: block;
}

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

.habbo-dropdown-header {
    background-color: var(--habbo-header-bg);
    color: #ffffff;
    font-family: 'Silkscreen', cursive;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 8px 12px;
    border-bottom: 2px solid var(--habbo-border);
    text-shadow: 1px 1px 0px #000;
}

.habbo-dropdown-options {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.habbo-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 2px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--habbo-card-text);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
}

.habbo-dropdown-item:hover, .habbo-dropdown-item.active {
    background-color: var(--habbo-box-subcard-bg);
    border-color: var(--habbo-accent);
}

.habbo-dropdown-item .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #000;
    display: inline-block;
    flex-shrink: 0;
}

.habbo-dropdown-item .dot.gold { background: #e59d24; }
.habbo-dropdown-item .dot.blue { background: #2b70b8; }
.habbo-dropdown-item .dot.purple { background: #8b3ab8; }
.habbo-dropdown-item .dot.green { background: #249964; }
.habbo-dropdown-item .dot.red { background: #c83838; }
.habbo-dropdown-item .dot.dark { background: #283447; }

/* ── HABBO RETRO CONTAINER ──────────────────────────────────────────────── */
.habbo-window {
    max-width: 1320px;
    width: calc(100% - 32px);
    margin: 10px auto;
    background-color: var(--habbo-main-box);
    border: 4px solid var(--habbo-border);
    border-radius: 16px;
    box-shadow: 
        inset 3px 3px 0px rgba(255, 255, 255, 0.4), 
        inset -3px -3px 0px rgba(0, 0, 0, 0.3),
        0 12px 32px rgba(0,0,0,0.6);
    padding: 12px;
    box-sizing: border-box;
    overflow: visible;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ── BARRA COMPACTA DE ESTADO MÓVIL (SOLO CELULAR) ─────────────────────── */
.habbo-mobile-status-strip {
    display: none;
    background: rgba(0, 0, 0, 0.45);
    border: 2px solid var(--habbo-border);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    color: #ffffff;
    font-family: 'Silkscreen', cursive;
    font-size: 0.75rem;
    justify-content: space-around;
    align-items: center;
    text-shadow: 1px 1px 0px #000;
}

/* ── HABBO TABS NAVIGATION ──────────────────────────────────────────────── */
.habbo-tabs-header {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    padding-left: 4px;
}

.habbo-tab-btn {
    font-family: 'Silkscreen', cursive;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 16px;
    border: 3px solid var(--habbo-border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background-color: var(--habbo-tab-inactive);
    color: #ffffff;
    cursor: pointer;
    text-shadow: 1px 1px 0px #000;
    box-shadow: inset 1px 1px 0px rgba(255,255,255,0.3);
    transition: background-color 0.2s, color 0.2s;
}

.habbo-tab-btn.active {
    background-color: var(--habbo-tab-active);
    color: var(--habbo-tab-active-text);
    text-shadow: none;
    box-shadow: inset 2px 2px 0px rgba(255,255,255,0.5);
}

.habbo-tab-btn:hover:not(.active) {
    background-color: var(--habbo-header-bg);
}

/* ── HABBO INNER CONTENT LAYOUT ─────────────────────────────────────────── */
.habbo-inner-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    width: 100%;
}

.habbo-inner-content > * {
    min-width: 0;
    max-width: 100%;
}

/* ── HABBO BOX CARDS ────────────────────────────────────────────────────── */
.habbo-card {
    background-color: var(--habbo-card-bg);
    border: 3px solid var(--habbo-border);
    border-radius: 12px;
    color: var(--habbo-card-text);
    box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.4), 2px 2px 6px rgba(0,0,0,0.2);
    margin-bottom: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.habbo-card-title {
    background-color: var(--habbo-header-bg);
    color: #ffffff;
    font-family: 'Silkscreen', cursive;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 10px 14px;
    border-bottom: 3px solid var(--habbo-border);
    text-shadow: 1px 1px 0px #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.habbo-card-body {
    padding: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ── RETRO BADGE STYLES ─────────────────────────────────────────────────── */
.habbo-checkin-badge {
    background: var(--habbo-badge-bg);
    border: 3px solid #000;
    border-radius: 50%;
    width: 65px;
    height: 65px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    color: #000;
    text-align: center;
    box-shadow: inset 2px 2px 0px #fff, inset -2px -2px 0px rgba(0,0,0,0.4), 2px 2px 5px rgba(0,0,0,0.3);
    transform: rotate(-6deg);
    cursor: pointer;
    transition: transform 0.15s;
}

.habbo-checkin-badge:hover {
    transform: rotate(0deg) scale(1.08);
}

/* ── HABBO RETRO BUTTONS ────────────────────────────────────────────────── */
.btn-habbo {
    font-family: 'Silkscreen', cursive;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 16px;
    border: 3px solid #000;
    border-radius: 8px;
    cursor: pointer;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.5);
    box-shadow: inset 2px 2px 0px rgba(255,255,255,0.4), inset -2px -2px 0px rgba(0,0,0,0.4), 2px 2px 0px #000;
    transition: all 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-habbo:active {
    transform: translate(2px, 2px);
    box-shadow: inset -1px -1px 0px rgba(255,255,255,0.4), inset 2px 2px 0px rgba(0,0,0,0.4);
}

.btn-habbo-green {
    background-color: #2bb673;
    color: #fff;
}
.btn-habbo-green:hover { background-color: #31cb80; }

.btn-habbo-blue {
    background-color: #2b70b8;
    color: #fff;
}
.btn-habbo-blue:hover { background-color: #3682d3; }

.btn-habbo-red {
    background-color: #e73636;
    color: #fff;
}
.btn-habbo-red:hover { background-color: #f74545; }

.btn-habbo-gray {
    background-color: #64748b;
    color: #fff;
}
.btn-habbo-gray:hover { background-color: #7889a0; }

.btn-habbo-theme {
    background-color: var(--habbo-header-bg);
    color: #ffffff;
    transition: filter 0.15s ease, background-color 0.3s ease;
}
.btn-habbo-theme:hover {
    filter: brightness(1.15);
}

[data-theme="dark"] .btn-habbo-theme {
    background-color: #3b82f6;
    color: #ffffff;
}

/* ── HABBO FORM INPUTS ──────────────────────────────────────────────────── */
.habbo-input {
    width: 100%;
    padding: 10px 12px;
    background-color: var(--habbo-input-bg);
    color: var(--habbo-input-text);
    border: 3px solid var(--habbo-border);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    outline: none;
    box-shadow: inset 2px 2px 0px rgba(0,0,0,0.15);
}

.habbo-input:focus {
    border-color: var(--habbo-accent);
}

/* ── HABBO RETRO TABLES ─────────────────────────────────────────────────── */
.table-responsive-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.habbo-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.88rem;
}

.habbo-table th, .habbo-table td {
    padding: 10px 12px;
    border: 2px solid var(--habbo-border);
    text-align: left;
    color: var(--habbo-card-text);
}

.habbo-table th {
    background-color: var(--habbo-card-header);
    font-family: 'Silkscreen', cursive;
    font-size: 0.75rem;
    color: var(--habbo-card-text);
}

.habbo-table tr:nth-child(even) {
    background-color: rgba(255,255,255,0.03);
}

/* ── HABBO MODAL DIALOGS ────────────────────────────────────────────────── */
.habbo-modal-card {
    background-color: var(--habbo-card-bg);
    color: var(--habbo-card-text);
    border: 4px solid #000;
    border-radius: 14px;
    padding: 0;
    max-width: 450px;
    width: 92%;
    box-shadow: inset 2px 2px 0px rgba(255,255,255,0.2), 0 12px 30px rgba(0,0,0,0.6);
    overflow: hidden;
}

.habbo-modal-header {
    background-color: var(--habbo-header-bg);
    color: #fff;
    font-family: 'Silkscreen', cursive;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 3px solid #000;
    text-shadow: 1px 1px 0px #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.habbo-modal-body {
    padding: 20px;
    color: var(--habbo-card-text);
}

/* ── RESPONSIVE MOBILE STYLES (CELULAR) ─────────────────────────────────── */
@media (max-width: 860px) {
    .habbo-main-wrapper {
        min-height: auto;
        padding: 0;
        width: 100%;
        overflow-x: hidden;
    }

    .habbo-mobile-status-strip {
        display: flex;
    }

    .habbo-header {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 8px 6px 0 6px;
        width: 100%;
        max-width: 100%;
    }

    .habbo-logo-container {
        width: 100%;
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 8px;
        align-items: center;
        justify-content: space-between;
    }

    .habbo-logo-container .habbo-hotel-badge {
        width: 100%;
        min-width: 0;
        font-size: clamp(0.68rem, 2.5vw, 0.78rem);
        padding: 6px 4px;
        justify-content: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .habbo-header-right {
        width: 100%;
    }

    .habbo-user-box {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        align-items: stretch;
    }

    .habbo-user-box .habbo-hotel-badge,
    .habbo-user-box .btn-habbo,
    .habbo-user-box .habbo-menu-container {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .habbo-user-box .habbo-hotel-badge {
        font-size: clamp(0.68rem, 2.5vw, 0.78rem) !important;
        padding: 6px 4px;
        justify-content: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .habbo-user-box .habbo-hotel-badge span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
        max-width: 100%;
    }

    .habbo-user-box .btn-habbo {
        font-size: clamp(0.68rem, 2.5vw, 0.78rem) !important;
        padding: 6px 4px;
        justify-content: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .habbo-user-box .habbo-menu-container {
        display: flex;
    }

    .habbo-user-box .habbo-menu-container .habbo-menu-btn {
        width: 100%;
        font-size: 1rem !important;
        padding: 6px 4px;
    }

    .habbo-theme-picker {
        width: 100%;
        justify-content: center;
        padding: 6px;
    }

    .habbo-window {
        margin: 8px 4px 20px 4px;
        padding: 8px;
        border-width: 3px;
        border-radius: 12px;
        width: calc(100% - 8px);
        max-width: 100%;
    }

    .habbo-tabs-header {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding-left: 0;
        margin-bottom: 16px;
    }

    .habbo-tab-btn {
        width: 100%;
        min-width: 0;
        text-align: center;
        padding: 8px 4px;
        font-size: clamp(0.68rem, 2.4vw, 0.75rem);
        border-bottom: 3px solid var(--habbo-border);
        border-radius: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* REORDENAMIENTO DE MÓVIL: CONTENIDO DE PESTAÑA ARRIBA, SIDEBAR ABAJO */
    .habbo-inner-content {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .habbo-inner-content section {
        order: 1; /* El contenido de la pestaña activa aparece PRIMERO */
    }

    .habbo-inner-content aside {
        order: 2; /* Las tarjetas del sidebar van al FINAL */
        margin-top: 8px;
    }

    .habbo-card-body {
        padding: 12px;
    }

    .habbo-table th, .habbo-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .habbo-table th {
        font-size: 0.68rem;
    }

    #targetForm {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .habbo-logo-text {
        font-size: 1.1rem;
    }

    .habbo-tabs-header {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px;
    }

    .habbo-tab-btn {
        font-size: clamp(0.58rem, 2.1vw, 0.7rem) !important;
        padding: 7px 2px !important;
    }
}
