* {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* ==========================================
   IMAGER PAGE LAYOUT
   ========================================== */

.imager-page {
    padding-bottom: 20px;
}

.imager-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(255,255,255,0.06);
}

.imager-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(79,195,247,0.15), rgba(79,195,247,0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #4fc3f7;
    flex-shrink: 0;
}

.imager-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    font-family: 'PT Sans', 'Helvetica Neue', sans-serif;
}

.imager-subtitle {
    font-size: 12px;
    opacity: 0.5;
    margin: 2px 0 0 0;
}

/* Warning Banner */
.imager-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid rgba(233, 69, 96, 0.2);
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.5;
}

.imager-warning > i {
    color: #e94560;
    font-size: 16px;
    flex-shrink: 0;
}

.imager-warning strong {
    color: #e94560;
}

/* ==========================================
   PREVIEW CARD (Left Column)
   ========================================== */

.imager-preview-card {
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    margin-bottom: 16px;
}

.imager-avatar-display {
    background: linear-gradient(180deg, rgba(79,195,247,0.08) 0%, rgba(0,0,0,0) 100%);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.imager-avatar-display img {
    max-height: 180px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
}

.imager-input-section {
    padding: 16px;
}

.imager-input-group {
    margin-bottom: 12px;
}

.imager-input-group label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
    margin-bottom: 6px;
    display: block;
}

.imager-input-group label i {
    margin-right: 4px;
}

.imager-input-group .form-control {
    border-radius: 8px;
    font-size: 13px;
    padding: 10px 14px;
    height: auto;
}

.imager-btn-update {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #4fc3f7, #2196f3);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.imager-btn-update:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33,150,243,0.3);
}

/* ==========================================
   CONTROL CARDS
   ========================================== */

.imager-control-card {
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 16px;
    margin-bottom: 16px;
}

.imager-control-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
    margin-bottom: 10px;
}

.imager-control-label i {
    margin-right: 4px;
}

/* Size Buttons */
.imager-size-buttons {
    display: flex;
    gap: 8px;
}

.imager-size-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.imager-size-btn:hover {
    background: rgba(79,195,247,0.15);
    border-color: rgba(79,195,247,0.3);
    color: #4fc3f7;
}

.imager-size-btn:active {
    transform: scale(0.97);
}

/* ==========================================
   NAVIGATION TABS
   ========================================== */

.imager-nav-card {
    border-radius: 12px 12px 0 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-bottom: none;
    padding: 0;
    overflow: hidden;
}

.sub-navigation {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
}

.menuItem {
    width: 61px;
    height: 44px;
    float: left;
    margin: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.15);
    position: relative;
    border-right: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s ease;
}

.menuItem:hover {
    background: rgba(79,195,247,0.15);
}

.menuItem.nav-selected {
    background: rgba(79,195,247,0.2);
    box-shadow: inset 0 -2px 0 #4fc3f7;
}

.menuItem img {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ==========================================
   CLOTHES GRID
   ========================================== */

.imager-clothes-card {
    border-radius: 0 0 12px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-top: none;
    padding: 12px;
    max-height: 325px;
    overflow: auto;
    margin-bottom: 16px;
}

.clothes-object {
    display: inline-block;
    height: 55px;
    width: 55px;
    background-color: rgba(255,255,255,0.06);
    background-repeat: no-repeat;
    background-position: center -10px;
    border-radius: 10px;
    box-sizing: border-box;
    border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 3px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.clothes-object:hover,
.clothes-object.selected {
    background-color: rgba(79,195,247,0.15);
    border-color: rgba(79,195,247,0.5);
    box-shadow: 0 2px 8px rgba(79,195,247,0.2);
}

.removable {
    background-image: url(/img/imager/removable.png);
    background-position: center center !important;
}

.ch { background-position-y: -30px !important; }
.lg { background-position-y: -70px !important; }
.ca { background-position-y: -30px !important; }
.cp { background-position-y: -30px !important; }
.cc { background-position-y: -45px !important; }
.wa { background-position-y: -50px !important; }
.sh { background-position-y: -75px !important; }

.club::after {
    background-image: url(/img/imager/habboclub.png);
    background-size: cover;
    width: 15px;
    height: 15px;
    display: block;
    content: "";
    position: relative;
    top: 43px;
    left: 37px;
}

.sellable::after {
    background-image: url(/img/imager/sellable.png);
    background-size: cover;
    width: 17px;
    height: 15px;
    display: block;
    content: "";
    position: relative;
    top: 43px;
    left: 37px;
}

.nft::after {
    background-image: url(/img/imager/nft.png);
    background-size: cover;
    width: 17px;
    height: 15px;
    display: block;
    content: "";
    position: relative;
    top: 43px;
    left: 37px;
}

/* ==========================================
   COLOR PALETTES
   ========================================== */

.imager-palette-card {
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 14px;
    margin-bottom: 16px;
    max-height: 180px;
    overflow: auto;
}

.imager-palette-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.5;
    margin-bottom: 8px;
}

.imager-palette-label i {
    margin-right: 4px;
}

.color-object {
    display: inline-block;
    margin: 2px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    border: 2px solid rgba(0,0,0,0.15);
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
}

.color-object:hover {
    transform: scale(1.15);
    z-index: 1;
}

.colorClub::after {
    background-image: url(/img/imager/habboclub.png);
    background-size: cover;
    width: 15px;
    height: 15px;
    display: block;
    content: "";
    position: absolute;
    bottom: -4px;
    right: -4px;
}

.colorSelected, .secondColorSelected {
    border-color: #fff !important;
    box-shadow: 0 0 0 2px rgba(79,195,247,0.5), 0 2px 8px rgba(0,0,0,0.2);
    transform: scale(1.15);
    z-index: 1;
}

.disabled-palette {
    opacity: 0.3;
    pointer-events: none;
}

#hc, #nonhc, #sell, #nft {
    display: contents;
}

/* ==========================================
   POSES & DIRECTIONS CARD
   ========================================== */

.imager-poses-card {
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 16px;
    margin-bottom: 16px;
}

.imager-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

.imagerButton {
    background: rgba(255,255,255,0.06);
    height: 60px;
    width: 60px;
    padding: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 10px;
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
}

.imagerButton:hover {
    background: rgba(79,195,247,0.1);
    border-color: rgba(79,195,247,0.2);
}

.imagerButton.selected {
    background: rgba(79,195,247,0.15);
    border-color: rgba(79,195,247,0.4);
    box-shadow: 0 2px 8px rgba(79,195,247,0.15);
}

.imagerButton > .habboAvatar {
    position: absolute;
    top: 50%;
    left: 50%;
    max-height: 100%;
    transform: translate(-50%, -60%);
}

.imagerButton > .habboHead {
    position: absolute;
    top: 50%;
    left: 50%;
    max-height: 100%;
    transform: translate(-50%, -50%);
}

/* ==========================================
   HAND ITEMS CARD
   ========================================== */

.imager-items-card {
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 16px;
    margin-bottom: 16px;
}

.imager-items-grid {
    max-height: 300px;
    overflow: auto;
}

/* ==========================================
   NAVIGATION HELPERS
   ========================================== */

ol, ul {
    list-style: none;
}

.hidden {
    display: none !important;
}

/* ==========================================
   SCROLLBAR STYLING
   ========================================== */

.imager-clothes-card::-webkit-scrollbar,
.imager-palette-card::-webkit-scrollbar,
.imager-items-grid::-webkit-scrollbar {
    width: 6px;
}

.imager-clothes-card::-webkit-scrollbar-track,
.imager-palette-card::-webkit-scrollbar-track,
.imager-items-grid::-webkit-scrollbar-track {
    background: transparent;
}

.imager-clothes-card::-webkit-scrollbar-thumb,
.imager-palette-card::-webkit-scrollbar-thumb,
.imager-items-grid::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.imager-clothes-card::-webkit-scrollbar-thumb:hover,
.imager-palette-card::-webkit-scrollbar-thumb:hover,
.imager-items-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 767px) {
    .imager-header {
        flex-direction: column;
        text-align: center;
    }

    .imager-avatar-display {
        min-height: 160px;
    }

    .imagerButton {
        width: 52px;
        height: 52px;
    }

    .imager-size-buttons {
        gap: 6px;
    }
}

/* ==========================================
   LIGHT MODE
   ========================================== */

body.theme-light .imager-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .imager-header-icon {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.18), rgba(33, 150, 243, 0.08));
    color: #1976d2;
}

body.theme-light .imager-title {
    color: #1a1a1a;
}

body.theme-light .imager-subtitle {
    color: #5a5a5a;
    opacity: 0.85;
}

body.theme-light .imager-warning {
    background: rgba(233, 69, 96, 0.08);
    border-color: rgba(233, 69, 96, 0.2);
}

body.theme-light .imager-warning > i,
body.theme-light .imager-warning strong {
    color: #c62828;
}

body.theme-light .imager-preview-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body.theme-light .imager-avatar-display {
    background: linear-gradient(180deg, rgba(79, 195, 247, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .imager-input-group label {
    color: #4a4a4a;
    opacity: 0.9;
}

body.theme-light .imager-control-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body.theme-light .imager-control-label {
    color: #4a4a4a;
    opacity: 0.9;
}

body.theme-light .imager-size-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
}

body.theme-light .imager-size-btn:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: rgba(33, 150, 243, 0.3);
    color: #1976d2;
}

body.theme-light .imager-nav-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .menuItem {
    background: rgba(0, 0, 0, 0.06);
    border-right-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .menuItem:hover {
    background: rgba(33, 150, 243, 0.12);
}

body.theme-light .menuItem.nav-selected {
    background: rgba(33, 150, 243, 0.15);
    box-shadow: inset 0 -2px 0 #1976d2;
}

body.theme-light .imager-clothes-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .clothes-object {
    background-color: rgba(0, 0, 0, 0.06);
}

body.theme-light .clothes-object:hover,
body.theme-light .clothes-object.selected {
    background-color: rgba(33, 150, 243, 0.12);
    border-color: rgba(33, 150, 243, 0.4);
}

body.theme-light .imager-palette-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body.theme-light .imager-palette-label {
    color: #4a4a4a;
    opacity: 0.9;
}

body.theme-light .color-object {
    border-color: rgba(0, 0, 0, 0.15);
}

body.theme-light .colorSelected,
body.theme-light .secondColorSelected {
    border-color: #1976d2 !important;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.3), 0 2px 8px rgba(0, 0, 0, 0.12);
}

body.theme-light .imager-poses-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body.theme-light .imagerButton {
    background: rgba(0, 0, 0, 0.05);
}

body.theme-light .imagerButton:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: rgba(33, 150, 243, 0.25);
}

body.theme-light .imagerButton.selected {
    background: rgba(33, 150, 243, 0.12);
    border-color: rgba(33, 150, 243, 0.4);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
}

body.theme-light .imager-items-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body.theme-light .imager-clothes-card::-webkit-scrollbar-thumb,
body.theme-light .imager-palette-card::-webkit-scrollbar-thumb,
body.theme-light .imager-items-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

body.theme-light .imager-clothes-card::-webkit-scrollbar-thumb:hover,
body.theme-light .imager-palette-card::-webkit-scrollbar-thumb:hover,
body.theme-light .imager-items-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}
