@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

:root {
    --kh-primary: #4A9FD8;
    --kh-primary-light: #6BB5E8;
    --kh-primary-dark: #2E6B99;
    --kh-accent: #FFD700;
    --kh-accent-glow: #FFF4A3;
    
    --bg-main: #0A0E1A;
    --bg-panel: #141828;
    --bg-elevated: #1A1F35;
    --bg-hover: #242B45;
    --bg-card: #1E2438;
    
    --text-primary: #E8F0FF;
    --text-secondary: #9FB4D9;
    --text-muted: #5A6B8C;
    
    --border: #2A3754;
    --border-light: #3A4764;
    --border-glow: #4A9FD8;
    
    --shadow: rgba(0, 0, 0, 0.5);
    --shadow-lg: rgba(0, 0, 0, 0.8);
    --glow: rgba(74, 159, 216, 0.4);
    --glow-strong: rgba(74, 159, 216, 0.8);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}
.style-current {
    width: 42px;
    height: 42px;
    cursor: pointer;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 4px;
    background: var(--bg-elevated);
    transition: all 0.3s ease;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* ============================================================================
   CORNER ACCENTS
   ============================================================================ */

.corner-accent {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--kh-primary);
    pointer-events: none;
    z-index: 10;
}

.corner-accent.tl {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.corner-accent.tr {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

.corner-accent.bl {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

.corner-accent.br {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* ============================================================================
   LOGIN SCREEN
   ============================================================================ */

.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #0A0E1A 0%, #141828 50%, #0D1525 100%);
    padding: 2rem 1rem;
    overflow-y: auto;
}

.kh-bg-pattern {
    position: fixed;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(74, 159, 216, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(74, 159, 216, 0.03) 0%, transparent 50%);
    animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.login-container {
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    width: 90%;
    max-width: 450px;
    box-shadow: 
        0 0 40px var(--glow),
        inset 0 0 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(40px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-crown {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: radial-gradient(circle, var(--kh-primary) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: crownFloat 3s ease-in-out infinite;
    box-shadow: 0 0 40px var(--glow-strong);
    position: relative;
}

.crown-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, var(--glow-strong) 0%, transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
    border-radius: 50%;
}

@keyframes crownFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.crown-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 0 10px var(--kh-accent-glow));
    position: relative;
    z-index: 1;
}

.app-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: 8px;
    text-shadow: 
        0 0 10px var(--glow-strong),
        0 0 20px var(--glow),
        2px 2px 0 var(--kh-primary-dark);
}


.app-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.google-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-hover) 100%);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.google-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--glow), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.google-btn:hover::before {
    transform: translateX(100%);
}

.google-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.google-btn:hover {
    border-color: var(--kh-primary);
    box-shadow: 0 0 20px var(--glow);
    transform: translateY(-2px);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.divider span {
    padding: 0 1.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.form-field input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-field input:focus {
    outline: none;
    border-color: var(--kh-primary);
    background: var(--bg-elevated);
    box-shadow: 0 0 15px var(--glow);
}

.login-btn, .guest-btn {
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.login-btn {
    background: linear-gradient(135deg, var(--kh-primary-dark) 0%, var(--kh-primary) 100%);
    color: var(--text-primary);
    box-shadow: 0 0 20px var(--glow);
}

.login-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.login-btn:hover:not(:disabled)::before {
    transform: translateX(100%);
}

.login-btn:hover:not(:disabled) {
    box-shadow: 0 0 30px var(--glow-strong);
    transform: translateY(-2px);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-light);
    border-top-color: var(--kh-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.guest-btn {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 2px solid var(--border);
}

.guest-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.login-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-weight: 600;
    line-height: 1.6;
    font-style: italic;
}
.login-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-weight: 600;
    line-height: 1.6;
    font-style: italic;
}

/* LOGIN SCREEN MOBILE FIX */
@media (max-width: 768px) {
    .login-screen {
        align-items: stretch;
        padding: 1.25rem;
    }

    .login-container {
        padding: 1.5rem 1.25rem;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .login-header {
        margin-bottom: 1rem;
    }

    .logo-crown {
        width: 56px;
        height: 56px;
        margin-bottom: 0.625rem;
    }

    .crown-icon {
        font-size: 1.75rem;
    }

    .app-title {
        font-size: 1.6rem;
        letter-spacing: 4px;
        margin-bottom: 0.25rem;
    }

    .app-subtitle {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    .login-form {
        gap: 0.5rem;
    }

    .google-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .divider {
        margin: 0.5rem 0;
    }

    .form-field input {
        padding: 0.75rem 0.875rem;
    }

    .login-btn, .guest-btn {
        padding: 0.75rem;
        font-size: 0.8rem;
        letter-spacing: 1px;
    }

    .login-hint {
        padding-top: 0.75rem;
        font-size: 0.75rem;
    }
}

/* ============================================================================
   MAIN APP
   ============================================================================ */

.app-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.kh-bg-stars {
    position: fixed;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent);
    background-size: 200% 200%;
    animation: starsMove 60s linear infinite;
    opacity: 0.3;
    pointer-events: none;
}

@keyframes starsMove {
    from { background-position: 0 0; }
    to { background-position: 100% 100%; }
}

/* ============================================================================
   TOP BAR
   ============================================================================ */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-panel);
    border-bottom: 2px solid var(--border-glow);
    box-shadow: 0 0 20px var(--glow), 0 4px 20px var(--shadow);
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

.bar-glow {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--kh-primary), transparent);
    animation: barPulse 2s ease-in-out infinite;
}

@keyframes barPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-mini {
    width: 36px;
    height: 36px;
    background: var(--bg-elevated);
    border: 2px solid var(--kh-primary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--glow);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-shape {
    width: 20px;
    height: 20px;
    background: var(--kh-primary);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: logoRotate 4s linear infinite;
}

@keyframes logoRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.app-name {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 10px var(--glow);
}

.version-badge {
    padding: 0.3rem 0.8rem;
    background: var(--bg-elevated);
    border: 2px solid var(--kh-primary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--kh-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px var(--glow);
}

/* ============================================================================
   BOOKMARK TABS
   ============================================================================ */

.bookmark-tabs {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin-left: 2rem;
    height: 42px;
}

.bookmark-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.65rem 1rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-light);
    border-bottom: 2px solid var(--border-light);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    transform-origin: bottom;
    z-index: 1;
    margin-bottom: -4px;
}

.bookmark-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--kh-primary);
    box-shadow: 0 -2px 10px var(--glow);
}

.bookmark-tab.active {
    background: var(--bg-main);
    border-color: var(--border-glow);
    border-bottom-color: var(--bg-main);
    color: var(--kh-primary);
    z-index: 101;
    transform: translateY(2px) scale(1.05);
    box-shadow: 0 -4px 20px var(--glow-strong), inset 0 -3px 0 var(--bg-main);
    padding-bottom: 0.85rem;
    margin-bottom: -2px;
}

.bookmark-tab .tab-icon {
    font-size: 1.1rem;
    filter: grayscale(0.5);
    transition: filter 0.3s ease;
}

.bookmark-tab.active .tab-icon {
    filter: grayscale(0);
    text-shadow: 0 0 10px var(--glow);
}

.bookmark-tab .tab-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
}

/* Tablet responsive for bookmark tabs */
@media (max-width: 900px) {
    .bookmark-tabs {
        margin-left: 1rem;
        gap: 0.35rem;
    }

    .bookmark-tab {
        padding: 0.45rem 0.9rem 0.6rem 0.9rem;
        font-size: 0.8rem;
    }

    .bookmark-tab .tab-icon {
        font-size: 1rem;
    }

    .bookmark-tab .tab-label {
        font-size: 0.75rem;
    }

    .bookmark-tab.active {
        padding-bottom: 0.8rem;
    }
}

.top-bar-center {
    display: flex;
    align-items: center;
}

.entry-counter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    position: relative;
}

.counter-current {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    color: var(--kh-primary);
    text-shadow: 0 0 20px var(--glow-strong);
    position: relative;
}

.counter-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--kh-primary);
    text-shadow: 0 0 5px var(--glow);
}

.logout-btn {
    padding: 0.6rem 1.2rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.logout-btn:hover {
    background: var(--bg-hover);
    border-color: var(--kh-primary);
    color: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
}

.mobile-menu-btn, .mobile-info-btn {
    display: none;
    width: 48px;
    height: 48px;
    background: var(--bg-elevated);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Desktop Info/Feedback Button */
.desktop-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-elevated);
    border: 2px solid var(--border-light);
    border-radius: 50%;
    margin-left: -0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    flex-shrink: 0;
}

.desktop-info-btn:hover {
    border-color: var(--kh-primary);
    color: var(--kh-primary);
    box-shadow: 0 0 12px var(--glow);
    text-shadow: 0 0 8px var(--glow);
}

/* ============================================================================
   MAIN CONTAINER
   ============================================================================ */

.main-container {
    flex: 1;
    display: grid;
    grid-template-columns: 310px 580px 1fr;
    gap: 1.5rem;
    overflow: hidden;
    padding: 1.5rem;
}

/* Wider center panel for closet view */
.main-container.closet-view {
    grid-template-columns: 310px 670px 1fr;
}

/* Profile view - full width center, hide side panels */
.main-container.profile-view {
    grid-template-columns: 1fr;
}

.main-container.profile-view .left-panel,
.main-container.profile-view .right-panel {
    display: none;
}

/* Social view - full width center, hide side panels */
.main-container.social-view {
    grid-template-columns: 1fr;
}

.main-container.social-view .left-panel,
.main-container.social-view .right-panel {
    display: none;
}

/* ============================================================================
   LEFT PANEL
   ============================================================================ */

.left-panel {
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 30px var(--glow), inset 0 0 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.panel-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    flex-shrink: 0;
}

.panel-section:last-child {
    border-bottom: none;
}

.section-header {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--kh-primary);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.header-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--kh-primary), transparent);
    box-shadow: 0 0 10px var(--glow);
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.category-item {
    display: grid;
    grid-template-columns: 4px 36px 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-family: inherit;
    position: relative;
}

.item-selector {
    width: 4px;
    height: 24px;
    align-self: center;
    background: transparent;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.category-item:hover .item-selector {
    background: var(--kh-primary);
    box-shadow: 0 0 10px var(--glow);
}

.category-item.active .item-selector {
    background: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow-strong);
}

.category-item:hover {
    background: var(--bg-hover);
}

.category-item.active {
    background: linear-gradient(90deg, var(--bg-hover) 0%, transparent 100%);
}

.cat-icon {
    font-size: 1.4rem;
}

.cat-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cat-count {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--kh-primary);
    background: var(--bg-elevated);
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-shadow: 0 0 5px var(--glow);
}

.category-item.active .cat-count {
    border-color: var(--kh-primary);
    box-shadow: 0 0 10px var(--glow);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.tag-chip {
    padding: 0.5rem 0.875rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-chip:hover {
    background: var(--bg-hover);
    border-color: var(--kh-primary);
    color: var(--kh-primary);
    box-shadow: 0 0 10px var(--glow);
}

.tag-chip.active {
    background: var(--kh-primary-dark);
    border-color: var(--kh-primary);
    color: var(--text-primary);
    box-shadow: 0 0 15px var(--glow-strong);
}

.draft-item {
    padding: 0.875rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-left: 4px solid #FF9800;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.draft-item:hover {
    background: var(--bg-hover);
    border-color: #FF9800;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.4);
}

.draft-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.draft-type {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.panel-btn {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-elevated);
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.panel-btn:last-child {
    margin-bottom: 0;
}

.panel-btn:hover {
    border-color: var(--kh-primary);
    box-shadow: 0 0 20px var(--glow);
    transform: translateY(-2px);
}

.btn-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, var(--glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.panel-btn:hover .btn-glow {
    opacity: 0.3;
}

.add-btn {
    background: linear-gradient(135deg, var(--kh-primary-dark) 0%, var(--kh-primary) 100%);
    border-color: var(--kh-primary);
    box-shadow: 0 0 20px var(--glow);
}

.add-btn:hover {
    box-shadow: 0 0 30px var(--glow-strong);
}

.secondary-btn {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

/* ============================================================================
   CENTER PANEL - SEARCH & LIST
   ============================================================================ */

.center-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* App Pages - Switch between Database/Closet/etc */
.app-page {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.app-page.hidden {
    display: none;
}

.search-section {
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 30px var(--glow), inset 0 0 30px rgba(0, 0, 0, 0.3);
    padding: 1rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.search-icon {
    font-size: 1.3rem;
    color: var(--text-muted);
}

.search-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--bg-main);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
}

.search-clear {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear:hover {
    background: var(--bg-hover);
    color: var(--kh-primary);
    border-color: var(--kh-primary);
    box-shadow: 0 0 10px var(--glow);
}

.filter-stats {
    display: flex;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    flex: 1;
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--kh-primary);
    text-shadow: 0 0 15px var(--glow);
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.list-view {
    flex: 1;
    overflow: hidden;
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 30px var(--glow), inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.list-scroll {
    height: 100%;
    overflow-y: auto;
    padding: 1rem;
}

.list-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 165px;
    max-height: 165px;
}

.list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    transition: all 0.3s ease;
}

.list-item:hover::before {
    background: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
}

.list-item:hover {
    border-color: var(--kh-primary);
    background: var(--bg-hover);
    box-shadow: 0 0 20px var(--glow);
    transform: translateX(4px);
}

.list-item.active {
    border-color: var(--kh-primary);
    background: var(--bg-hover);
    box-shadow: 0 0 25px var(--glow-strong);
}

.list-item.active::before {
    background: var(--kh-primary);
    box-shadow: 0 0 20px var(--glow-strong);
}

.item-content {
    display: grid;
    grid-template-columns: 1fr 130px;
    gap: 1rem;
    height: 100%;
}

.item-left {
        display: grid;
        grid-template-rows: 1fr 1fr 1fr;
        gap: 0.5rem;
        min-width: 0;
        overflow: hidden;
}

.item-right {
    flex-shrink: 0;
    width: 130px;
}

.item-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    padding-left: 4px;
}

.item-title {
    font-size: clamp(0.75rem, 2.5vw, 1.35rem);
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    text-align: left;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    padding-bottom: 4px;
}

.item-title:active {
    cursor: grabbing;
}

.item-title::-webkit-scrollbar {
    height: 6px;
}

.item-title::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-radius: 3px;
}

.item-title::-webkit-scrollbar-thumb {
    background: var(--kh-primary-dark);
    border-radius: 3px;
    border: 1px solid var(--bg-main);
}

.item-title::-webkit-scrollbar-thumb:hover {
    background: var(--kh-primary);
}




.item-middle {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 0.5rem;
    align-items: center;
    height: 100%;
    padding-left: 4px;
}



.item-number {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 900;
    color: var(--kh-primary);
    text-shadow: 0 0 10px var(--glow);
    white-space: nowrap;
    line-height: 1;
}

.item-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 4px;
}

.item-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    line-height: 1.3;
}

.item-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.375rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--kh-primary-dark) var(--bg-main);
    padding-bottom: 8px;
    padding-left: 4px;
    width: 100%;
    min-width: 0;
    cursor: grab;
}

.item-tags:active {
    cursor: grabbing;
}

.item-tags::-webkit-scrollbar {
    height: 6px;
}

.item-tags::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-radius: 3px;
}

.item-tags::-webkit-scrollbar-thumb {
    background: var(--kh-primary-dark);
    border-radius: 3px;
    border: 1px solid var(--bg-main);
}

.item-tags::-webkit-scrollbar-thumb:hover {
    background: var(--kh-primary);
}

.item-tag {
    padding: 0.25rem 0.6rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.item-tag-more {
    padding: 0.25rem 0.6rem;
    background: var(--kh-primary-dark);
    border: 1px solid var(--kh-primary);
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--kh-primary);
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.item-image-container {
    width: 100%;
    height: 100%;
    min-height: 120px;
    max-height: 120px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    background: var(--bg-main);
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
}

.item-no-image-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

.item-type-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.4rem;
    background: rgba(20, 24, 40, 0.95);
    border-top: 1px solid var(--kh-primary);
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--kh-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    backdrop-filter: blur(5px);
}

.list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    transition: all 0.3s ease;
}

.list-item:hover::before {
    background: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
}

.list-item:hover {
    border-color: var(--kh-primary);
    background: var(--bg-hover);
    box-shadow: 0 0 20px var(--glow);
    transform: translateX(4px);
}

.list-item.active {
    border-color: var(--kh-primary);
    background: var(--bg-hover);
    box-shadow: 0 0 25px var(--glow-strong);
}

.list-item.active::before {
    background: var(--kh-primary);
    box-shadow: 0 0 20px var(--glow-strong);
}




.item-info {
    flex: 1;
}
.item-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.item-type-badge {
    padding: 0.35rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================================
   RIGHT PANEL - ENTRY CARDS
   ============================================================================ */

.right-panel {
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 30px var(--glow), inset 0 0 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.entry-card-view {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-selection {
    text-align: center;
    padding: 3rem;
}

.no-selection-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.no-selection-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.entry-detail {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 2px solid var(--border);
    background: var(--bg-elevated);
    flex-shrink: 0;
    position: sticky;
    z-index: 50;
    top: 0;
}

.back-btn {
    padding: 0.75rem 1.25rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    color: var(--kh-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    background: var(--bg-hover);
    border-color: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
}

.detail-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-button {
    width: 48px;
    height: 48px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    background: var(--bg-hover);
    border-color: var(--kh-primary);
    color: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
}

.detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
}

.detail-header-section {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.detail-header-section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
}

.detail-number {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    color: var(--kh-primary);
    margin-bottom: 0.75rem;
    text-shadow: 0 0 30px var(--glow-strong);
}

.detail-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.detail-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.detail-type-badge {
    display: inline-block;
    padding: 0.6rem 1.75rem;
    background: var(--kh-primary-dark);
    border: 2px solid var(--kh-primary);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-primary);
    box-shadow: 0 0 20px var(--glow);
}

.detail-images {
    margin-bottom: 1.5rem;
    position: relative;
}

.image-gallery {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 300px;
    max-height: 500px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 0 30px var(--glow);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
}

.gallery-image {
    width: 100%;
    height: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
}

.entry-badge-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.entry-number-badge {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--kh-primary);
    background: rgba(20, 24, 40, 0.95);
    padding: 0.5rem 1rem;
    border: 2px solid var(--kh-primary);
    border-radius: var(--radius-md);
    text-shadow: 0 0 15px var(--glow-strong);
    box-shadow: 0 0 20px var(--glow);
    backdrop-filter: blur(10px);
}

.entry-type-badge-small {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    background: rgba(20, 24, 40, 0.95);
    padding: 0.4rem 0.75rem;
    border: 2px solid var(--kh-primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 0 15px var(--glow);
    backdrop-filter: blur(10px);
    text-align: center;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(20, 24, 40, 0.95);
    border: 3px solid var(--kh-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--kh-primary);
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 0 20px var(--glow);
    z-index: 10;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.gallery-nav:hover {
    background: var(--kh-primary);
    color: var(--bg-main);
    box-shadow: 0 0 30px var(--glow-strong);
    transform: translateY(-50%) scale(1.15);
    border-color: var(--kh-primary);
}

.gallery-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-nav.prev {
    left: 0.75rem;
}

.gallery-nav.next {
    right: 0.75rem;
}

.gallery-counter {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.6rem 1.2rem;
    background: rgba(20, 24, 40, 0.95);
    border: 2px solid var(--kh-primary);
    border-radius: var(--radius-md);
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--kh-primary);
    box-shadow: 0 0 20px var(--glow);
    z-index: 10;
    backdrop-filter: blur(10px);
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-card {
    padding: 1.25rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-left: 4px solid var(--kh-primary);
    border-radius: var(--radius-md);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.info-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.625rem;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--kh-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.detail-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--kh-primary);
    box-shadow: 0 0 10px var(--glow);
}

.detail-text {
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 2rem;
}

.detail-tag {
    padding: 0.6rem 1.25rem;
    background: var(--kh-primary-dark);
    border: 2px solid var(--kh-primary);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px var(--glow);
}

/* ============================================================================
   MODAL
   ============================================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 26, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-dialog {
    width: 90%;
    max-width: 750px;
    max-height: 90vh;
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 50px var(--glow-strong);
    display: flex;
    flex-direction: column;
    animation: modalSlide 0.4s ease;
    position: relative;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 2rem;
    border-bottom: 2px solid var(--border);
    background: var(--bg-elevated);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px var(--glow);
}

.modal-close {
    width: 48px;
    height: 48px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1.75rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg-hover);
    border-color: var(--kh-primary);
    color: var(--kh-primary);
    box-shadow: 0 0 20px var(--glow);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.entry-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.form-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--kh-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.form-input, .form-textarea {
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 600;
    background: var(--bg-main);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--kh-primary);
    background: var(--bg-elevated);
    box-shadow: 0 0 15px var(--glow);
}

.form-textarea {
    resize: vertical;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.type-card {
    padding: 1.75rem 1rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.type-card:hover {
    border-color: var(--kh-primary);
    background: var(--bg-hover);
    box-shadow: 0 0 20px var(--glow);
}

.type-card.selected {
    background: var(--kh-primary-dark);
    border-color: var(--kh-primary);
    box-shadow: 0 0 25px var(--glow-strong);
}

.type-emoji {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 0 10px var(--glow));
}

.type-text {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upload-area {
    padding: 2rem;
    background: var(--bg-elevated);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.upload-btn {
    padding: 1.25rem 2.5rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.upload-btn:hover {
    background: var(--bg-hover);
    border-color: var(--kh-primary);
    box-shadow: 0 0 20px var(--glow);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-preview-single {
    margin-top: 1rem;
    max-width: 300px;
}

.image-preview-single img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-light);
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 36px;
    height: 36px;
    background: rgba(20, 24, 40, 0.95);
    border: 2px solid var(--kh-primary);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--kh-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--glow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-image-btn:hover {
    background: var(--kh-primary);
    color: var(--text-primary);
    box-shadow: 0 0 20px var(--glow-strong);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
}

.form-button {
    padding: 1rem 2rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.submit-btn {
    background: linear-gradient(135deg, var(--kh-primary-dark) 0%, var(--kh-primary) 100%);
    border-color: var(--kh-primary);
    color: var(--text-primary);
    box-shadow: 0 0 20px var(--glow);
}

.submit-btn:hover {
    box-shadow: 0 0 30px var(--glow-strong);
    transform: translateY(-2px);
}

.cancel-btn {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.cancel-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.delete-btn {
    background: linear-gradient(135deg, #8B2E2E 0%, #B33A3A 100%);
    border-color: #D32F2F;
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(211, 47, 47, 0.4);
}

.draft-btn {
    background: linear-gradient(135deg, #8B5E2E 0%, #B37A3A 100%);
    border-color: #FF9800;
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.4);
}

.draft-btn:hover {
    box-shadow: 0 0 25px rgba(255, 152, 0, 0.6);
    transform: translateY(-2px);
}

.delete-btn:hover {
    box-shadow: 0 0 25px rgba(211, 47, 47, 0.6);
    transform: translateY(-2px);
}

/* Privacy Toggle */
.privacy-toggle-wrapper {
    padding: 1rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.privacy-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.privacy-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.privacy-slider {
    width: 52px;
    height: 28px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 14px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.privacy-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-muted);
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.privacy-toggle input[type="checkbox"]:checked ~ .privacy-slider {
    background: var(--kh-primary);
    border-color: var(--kh-primary);
}

.privacy-toggle input[type="checkbox"]:checked ~ .privacy-slider::before {
    transform: translateX(24px);
    background: white;
}

.privacy-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.privacy-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.privacy-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.privacy-text strong {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 700;
}

.privacy-text small {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.privacy-toggle:hover .privacy-slider {
    border-color: var(--kh-primary);
}

.privacy-toggle input[type="checkbox"]:checked ~ .privacy-label .privacy-icon {
    filter: drop-shadow(0 0 8px var(--glow));
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */

.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    padding: 1.25rem 1.75rem;
    background: var(--bg-panel);
    border: 2px solid var(--kh-primary);
    border-left: 5px solid var(--kh-primary);
    border-radius: var(--radius-md);
    box-shadow: 0 0 30px var(--glow-strong);
    min-width: 320px;
    animation: toastSlide 0.4s ease;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--text-primary);
}

@keyframes toastSlide {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left-color: #4CAF50;
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.5);
}

.toast.error {
    border-left-color: #F44336;
    box-shadow: 0 0 30px rgba(244, 67, 54, 0.5);
}

.toast.warning {
    border-left-color: #FF9800;
    box-shadow: 0 0 30px rgba(255, 152, 0, 0.5);
}

.toast.info {
    border-left-color: var(--kh-primary);
    box-shadow: 0 0 30px var(--glow);
}

/* ============================================================================
   ACTIVITY LOG PANEL
   ============================================================================ */

.activity-panel {
    position: fixed;
    right: -400px;
    top: 0;
    bottom: 0;
    width: 400px;
    max-width: 90vw;
    background: var(--bg-panel);
    border-left: 2px solid var(--border-light);
    box-shadow: -4px 0 30px var(--shadow-lg);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.activity-panel.active {
    right: 0;
}

.panel-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border);
    background: var(--bg-elevated);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--kh-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.panel-close {
    width: 40px;
    height: 40px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-close:hover {
    background: var(--bg-hover);
    border-color: var(--kh-primary);
    color: var(--kh-primary);
}

.activity-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.activity-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-left: 4px solid var(--kh-primary);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: var(--bg-hover);
    box-shadow: 0 0 15px var(--glow);
}

.activity-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.activity-details {
    flex: 1;
}

.activity-action {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-entry {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.activity-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Feedback Form */
.feedback-form-section {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.feedback-input {
    width: 100%;
    background: var(--bg-main);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    padding: 0.75rem;
    resize: vertical;
    min-height: 70px;
    max-height: 200px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.feedback-input:focus {
    outline: none;
    border-color: var(--kh-primary);
    box-shadow: 0 0 10px var(--glow);
}

.feedback-input::placeholder {
    color: var(--text-muted);
}

.feedback-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.feedback-char-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Rajdhani', sans-serif;
}

.feedback-submit-btn {
    padding: 0.4rem 1.2rem;
    background: var(--kh-primary-dark);
    border: 2px solid var(--kh-primary);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
}

.feedback-submit-btn:hover {
    background: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
}

.feedback-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Feedback Divider */
.feedback-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem 0.5rem;
}

.feedback-divider span {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 2px;
    white-space: nowrap;
}

.feedback-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Feedback Items (admin view) */
.feedback-list {
    padding: 0 1rem 1rem;
}

.feedback-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-left: 3px solid var(--kh-primary);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.feedback-item:hover {
    background: var(--bg-hover);
    box-shadow: 0 0 10px var(--glow);
}

.feedback-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.feedback-username {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--kh-primary);
    text-shadow: 0 0 5px var(--glow);
}

.feedback-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.feedback-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}

/* Panel Credits */
.panel-credits {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1.5rem 1rem;
    margin-top: auto;
    border-top: 1px solid var(--border);
    text-align: center;
}

.credits-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.credits-email {
    font-size: 0.75rem;
    color: var(--kh-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.credits-email:hover {
    text-shadow: 0 0 8px var(--glow);
}

/* ============================================================================
   MOBILE NAV OVERLAY
   ============================================================================ */

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 26, 0.8);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* ============================================================================
   SCROLLBAR
   ============================================================================ */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--kh-primary-dark);
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg-main);
    box-shadow: inset 0 0 10px var(--glow);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--kh-primary);
    box-shadow: inset 0 0 15px var(--glow-strong);
}

/* ============================================================================
   RESPONSIVE DESIGN - TABLETS
   ============================================================================ */

@media (max-width: 1600px) {
    .main-container {
        grid-template-columns: 300px 520px 1fr;
    }

    .main-container.closet-view {
        grid-template-columns: 300px 570px 1fr;
    }
}

@media (max-width: 1400px) {
    .main-container {
        grid-template-columns: 290px 460px 1fr;
    }

    .main-container.closet-view {
        grid-template-columns: 290px 510px 1fr;
    }
}

@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 280px 420px 1fr;
    }

    .main-container.closet-view {
        grid-template-columns: 280px 450px 1fr;
    }

    .detail-number {
        font-size: 2.5rem;
    }

    .detail-title {
        font-size: 1.5rem;
    }
}

/* ============================================================================
   MOBILE - COMPLETE SEPARATE SYSTEM
   ============================================================================ */

@media (max-width: 1024px) {
    /* Hide desktop left panel completely on mobile */
    .left-panel {
        display: none !important;
    }

    /* Top Bar Mobile */
    .top-bar {
        padding: 0.75rem 0.75rem;
    }

    .top-bar-left {
        gap: 0.5rem;
        flex: 1;
        overflow: hidden;
    }

    .top-bar-right {
        gap: 0.5rem;
    }

    .app-name,
    .version-badge,
    .top-bar-center,
    .user-info,
    .desktop-info-btn {
        display: none !important;
    }

    /* Hide top bookmark tabs on mobile ONLY - using bottom nav instead */
    .bookmark-tabs {
        display: none !important;
    }

    /* Ensure main container doesn't have bottom padding on desktop */
    .main-container {
        padding-bottom: 0;
    }

    .logout-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .style-selector-wrapper {
        display: flex;
        margin-right: 0.5rem;
        margin-left: auto;
        position: relative;
        z-index: 200;
    }

    /* Ensure dropdown works on mobile with better touch targets */
    .style-current {
        width: 48px;
        height: 40px;
        padding: 6px;
    }

    .style-options {
        right: 0;
        z-index: 250;
    }

    .style-option {
        width: 48px;
        height: 48px;
        padding: 6px;
    }

    .mobile-menu-btn,
    .mobile-info-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        background: var(--bg-elevated);
        border: 2px solid var(--border-light);
        border-radius: var(--radius-md);
        font-size: 1.5rem;
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.3s ease;
    }

    /* Main Container Mobile */
    .main-container,
    .main-container.closet-view {
        grid-template-columns: 1fr !important;
        gap: 0;
        padding: 1rem 1rem 0.75rem;
    }

    /* Center Panel */
    .center-panel {
        width: 100% !important;
        margin-bottom: 0;
    }

    /* Closet page mobile - match database layout */
    .closet-grid-view,
    .closet-list-view {
        width: 100% !important;
        max-width: 100% !important;
    }

    .search-section {
        width: 100% !important;
        max-width: 100% !important;
    }

    #closetPage {
        width: 100% !important;
        max-width: 100% !important;
    }

    .app-page {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    #profilePage {
        overflow-x: hidden !important;
    }

    .profile-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .profile-content-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .profile-sidebar,
    .profile-main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
    }

    .profile-box {
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .view-mode-toggle {
        display: none !important;
    }

    .closet-add-section:not(.closet-fab) {
        display: none !important;
    }

    /* Right Panel - Hide on mobile, we use overlay instead */
    .right-panel {
        display: none;
    }

    /* Bottom breathing room for list/grid scrollers */
    .list-scroll,
    .closet-grid-scroll,
    .closet-list-view .list-scroll {
        padding-bottom: 1.25rem;
    }

    /* Activity Panel Mobile */
    .activity-panel {
        width: 350px;
        z-index: 2000;
    }

    /* Modal — must sit above .mobile-detail-overlay (z-index: 1700) */
    .modal-overlay {
        padding-bottom: 75px;
        z-index: 1800;
    }

    .modal-dialog {
        width: 95%;
        max-height: calc(95vh - 75px);
    }
    
    .type-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* ===== NEW MOBILE MENU SYSTEM ===== */
    
    /* Mobile Backdrop */
    .mobile-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 14, 26, 0.9);
        z-index: 1500;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    /* Mobile Bottom Navigation */
    .mobile-bottom-nav {
        display: none;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 65px;
        background: var(--bg-panel);
        border-top: 2px solid var(--border-light);
        padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
        z-index: 1000;
        box-shadow: 0 -4px 20px var(--shadow-lg);
    }

    /* Hide bottom nav when app wrapper is hidden (login screen) */
    .app-wrapper.hidden .mobile-bottom-nav {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Also hide when login screen is visible */
    body:has(.login-screen:not(.hidden)) .mobile-bottom-nav {
        display: none !important;
        visibility: hidden !important;
    }

    @media (max-width: 1024px) {
        .mobile-bottom-nav {
            display: flex;
            align-items: center;
            justify-content: space-around;
            gap: 0.25rem;
        }

        /* Shrink app-wrapper so it ends at the nav bar, not behind it */
        .app-wrapper {
            bottom: 65px;
            height: auto;
        }

        @supports (padding-bottom: env(safe-area-inset-bottom)) {
            .app-wrapper {
                bottom: calc(65px + env(safe-area-inset-bottom));
                height: auto;
            }
        }
    }

    .bottom-nav-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        flex: 1;
        padding: 0.5rem 0.25rem;
        background: transparent;
        border: none;
        border-radius: var(--radius-md);
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        min-width: 0;
    }

    .bottom-nav-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--kh-primary), var(--kh-accent));
        border-radius: 0 0 3px 3px;
        transition: width 0.3s ease;
    }

    .bottom-nav-btn.active::before {
        width: 60%;
    }

    .bottom-nav-btn.active {
        color: var(--kh-primary);
        background: var(--bg-elevated);
    }

    .bottom-nav-btn:active {
        transform: scale(0.95);
        background: var(--bg-elevated-hover);
    }

    @supports (backdrop-filter: blur(10px)) {
        .mobile-bottom-nav {
            background: rgba(18, 25, 47, 0.85);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }
    }

    .bottom-nav-btn .nav-icon {
        font-size: 1.4rem;
        transition: transform 0.3s ease;
    }

    .bottom-nav-btn.active .nav-icon {
        transform: scale(1.1);
        filter: drop-shadow(0 0 8px var(--glow));
    }

    .bottom-nav-btn .nav-label {
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* Mobile Menu Container */
    .mobile-menu-container {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -100%;
        width: 85vw;
        max-width: 350px;
        background: var(--bg-panel);
        border-right: 2px solid var(--border-light);
        box-shadow: 4px 0 30px var(--shadow-lg);
        z-index: 1600;
        display: flex;
        flex-direction: column;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-menu-container.active {
        left: 0;
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.5rem;
        border-bottom: 2px solid var(--border);
        background: var(--bg-elevated);
    }

    .mobile-menu-title {
        font-family: 'Orbitron', monospace;
        font-size: 1.2rem;
        font-weight: 800;
        color: var(--kh-primary);
        text-transform: uppercase;
        letter-spacing: 3px;
        text-shadow: 0 0 10px var(--glow);
    }

    .mobile-menu-close {
        width: 40px;
        height: 40px;
        background: var(--bg-elevated);
        border: 2px solid var(--border);
        border-radius: var(--radius-md);
        font-size: 1.5rem;
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-menu-close:hover {
        background: var(--bg-hover);
        border-color: var(--kh-primary);
        color: var(--kh-primary);
    }

    .mobile-menu-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Mobile Detail Overlay */
    .mobile-detail-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-panel);
        z-index: 1700;
        display: none;
        flex-direction: column;
        overflow: hidden;
    }

    .mobile-detail-overlay.active {
        display: flex;
    }

    .mobile-detail-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        background: var(--bg-elevated);
        border-bottom: 2px solid var(--border);
        flex-shrink: 0;
    }

    .mobile-detail-back {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.6rem 1rem;
        background: var(--bg-elevated);
        border: 2px solid var(--border-light);
        border-radius: var(--radius-md);
        font-size: 1rem;
        color: var(--kh-primary);
        cursor: pointer;
        transition: all 0.3s ease;
        font-family: inherit;
        font-weight: 700;
    }

    .mobile-detail-back:hover {
        background: var(--bg-hover);
        border-color: var(--kh-primary);
        box-shadow: 0 0 15px var(--glow);
    }

    .mobile-detail-actions {
        display: flex;
        gap: 0.5rem;
    }

    .mobile-detail-btn {
        width: 44px;
        height: 44px;
        background: var(--bg-elevated);
        border: 2px solid var(--border);
        border-radius: var(--radius-md);
        font-size: 1.1rem;
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-detail-btn:hover {
        background: var(--bg-hover);
        border-color: var(--kh-primary);
        color: var(--kh-primary);
        box-shadow: 0 0 15px var(--glow);
    }

    .mobile-detail-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1.5rem 1rem;
    }

    /* Image Gallery Mobile */
    .image-gallery {
        min-height: 250px;
        max-height: 400px;
    }
    
    .gallery-image {
        max-height: 400px;
    }

    .entry-number-badge {
        font-size: 1.2rem;
        padding: 0.4rem 0.8rem;
    }
    
    .entry-type-badge-small {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}
/* ============================================================================
   STYLE SELECTOR - DROPDOWN WITH THEME PREVIEWS
   ============================================================================ */

.style-selector-wrapper {
    display: flex;
    align-items: center;
    margin-right: 1rem;
    position: relative;
    z-index: 150;
}

.style-dropdown {
    position: relative;
}

.style-current {
    width: 50px;
    height: 36px;
    cursor: pointer;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 4px;
    background: var(--bg-elevated);
    transition: all 0.3s ease;
}

.style-current:hover {
    border-color: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
}

.style-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 8px 24px var(--shadow-lg);
    min-width: 60px;
}

.style-options.active {
    display: flex;
}

.style-option {
    width: 42px;
    height: 42px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.style-option:hover {
    transform: scale(1.05);
}

.theme-preview {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.style-option:hover .theme-preview {
    border-color: var(--kh-primary);
    box-shadow: 0 0 10px var(--glow);
}

/* Default Theme Preview - Vaporwave Blue/Purple */
.preview-default {
    background: linear-gradient(135deg, #2E6B99 0%, #4A9FD8 100%);
}

/* Cyberpunk Theme Preview - Black with Orange/Pink Border */
.preview-cyberpunk {
    background: #000000;
    border: 2px solid #FF1493;
    border-radius: 8px;
    box-shadow: 
        0 0 8px rgba(255, 20, 147, 0.6),
        inset 0 0 10px rgba(255, 140, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.preview-cyberpunk::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.3) 0%, rgba(255, 20, 147, 0.3) 100%);
}

/* Pokédex Theme Preview - Red with Blue Circle */
.preview-pokedex {
    background: #8B0000;
}

.preview-pokedex::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #4DA9FF 0%, #0066CC 100%);
    border-radius: 50%;
    border: 1px solid #FFFFFF;
    box-shadow: 0 0 8px rgba(77, 169, 255, 0.8);
}

/* Game Boy Theme Preview - Greenish Gray */
.preview-gameboy {
    background: linear-gradient(135deg, #B8B896 0%, #C4C4A0 100%);
    border: 2px solid #2B2B2B;
}

/* Cozy Theme Preview - Peach/Pink */
.preview-cozy {
    background: linear-gradient(135deg, #FFB4A8 0%, #FFCCC4 100%);
}

/* Console Theme Preview - Xbox Green on Dark */
.preview-console {
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    border: 2px solid #107C10;
    box-shadow: 0 0 6px rgba(16, 124, 16, 0.6);
}

.preview-console::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #107C10;
    border-radius: 50%;
    box-shadow: 0 0 8px #107C10;
}

@media (max-width: 1024px) {
    .style-current {
        width: 44px;
        height: 32px;
    }
    
    .style-option {
        width: 44px;
        height: 32px;
    }
}
/* ============================================================================
   POKÉDEX THEME
   ============================================================================ */

body[data-theme="pokedex"] {
    --kh-primary: #8B0000;
    --kh-primary-light: #A52A2A;
    --kh-primary-dark: #660000;
    --kh-accent: #FFD700;
    --kh-accent-glow: #FFF4A3;
    
    --bg-main: #1A0505;
    --bg-panel: #8B0000;
    --bg-elevated: #7A0000;
    --bg-hover: #9B1010;
    --bg-card: #750000;
    
    --text-primary: #FFFFFF;
    --text-secondary: #FFE6E6;
    --text-muted: #FFCCCC;
    
    --border: #660000;
    --border-light: #8B0000;
    --border-glow: #A52A2A;
    
    --shadow: rgba(0, 0, 0, 0.7);
    --shadow-lg: rgba(0, 0, 0, 0.9);
    --glow: rgba(139, 0, 0, 0.4);
    --glow-strong: rgba(139, 0, 0, 0.6);
}

body[data-theme="pokedex"] .logo-mini {
    background: linear-gradient(135deg, #0066CC 0%, #4DA9FF 100%);
    border-color: #FFFFFF;
}

body[data-theme="pokedex"] .logo-shape {
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #FFFFFF 0%, #4DA9FF 100%);
    clip-path: circle(50%);
    animation: pokePulse 2s ease-in-out infinite;
}

@keyframes pokePulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(77, 169, 255, 0.6);
    }
    50% { 
        transform: scale(1.2);
        box-shadow: 0 0 20px rgba(77, 169, 255, 1);
    }
}

body[data-theme="pokedex"] .app-name {
    color: #FFFFFF;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.5),
        2px 2px 0 #660000,
        -1px -1px 0 #000000;
}

body[data-theme="pokedex"] .version-badge {
    background: #FFD700;
    color: #8B0000;
    border-color: #FFD700;
    font-weight: 900;
}

body[data-theme="pokedex"] .top-bar {
    background: linear-gradient(180deg, #8B0000 0%, #750000 100%);
    border-bottom-color: #FFD700;
}

body[data-theme="pokedex"] .bar-glow {
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
}

body[data-theme="pokedex"] .left-panel,
body[data-theme="pokedex"] .center-panel .search-section,
body[data-theme="pokedex"] .center-panel .list-view,
body[data-theme="pokedex"] .right-panel {
    background: linear-gradient(135deg, #7A0000 0%, #8B0000 50%, #7A0000 100%);
    border-color: #660000;
}

body[data-theme="pokedex"] .category-item:hover,
body[data-theme="pokedex"] .list-item:hover {
    background: rgba(155, 16, 16, 0.4);
}

body[data-theme="pokedex"] .category-item.active {
    background: linear-gradient(90deg, rgba(155, 16, 16, 0.6) 0%, transparent 100%);
}

body[data-theme="pokedex"] .item-selector {
    background: transparent;
}

body[data-theme="pokedex"] .category-item:hover .item-selector,
body[data-theme="pokedex"] .category-item.active .item-selector {
    background: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

body[data-theme="pokedex"] .cat-count,
body[data-theme="pokedex"] .stat-value,
body[data-theme="pokedex"] .counter-current {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

body[data-theme="pokedex"] .section-header {
    color: #FFFFFF;
}
body[data-theme="pokedex"] .user-name,
body[data-theme="pokedex"] .user-role {
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
body[data-theme="pokedex"] .item-number,
body[data-theme="pokedex"] .detail-number,
body[data-theme="pokedex"] .entry-number-badge {
    color: #4DA9FF;
    text-shadow: 0 0 15px rgba(77, 169, 255, 0.9);
}

body[data-theme="pokedex"] .list-item::before,
body[data-theme="pokedex"] .list-item.active::before {
    background: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

body[data-theme="pokedex"] .item-tag,
body[data-theme="pokedex"] .item-tag-more {
    background: #0F6B0F;
    border-color: #1A8F1A;
    color: #90EE90;
}

body[data-theme="pokedex"] .add-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #8B0000;
    border-color: #FFD700;
    text-shadow: none;
}

body[data-theme="pokedex"] .modal-dialog,
body[data-theme="pokedex"] .login-container {
    background: linear-gradient(135deg, #7A0000 0%, #8B0000 50%, #7A0000 100%);
    border-color: #FFD700;
}

body[data-theme="pokedex"] .type-card.selected {
    background: #FFD700;
    border-color: #FFA500;
    color: #8B0000;
}

body[data-theme="pokedex"] .type-card.selected .type-text {
    color: #8B0000;
}

body[data-theme="pokedex"] .style-selector-dropdown {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FFD700' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

body[data-theme="gameboy"] .style-selector-dropdown {
    background: #9BBC0F;
    border: 2px solid #0F380F;
    color: #0F380F;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230F380F' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
}

body[data-theme="gameboy"] .style-selector-dropdown:hover {
    background: #A0CC1F;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230F380F' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    box-shadow: none;
}

@media (max-width: 1024px) {
    .style-selector-wrapper {
        margin-right: 0.5rem;
        order: -1;
    }
    
    .style-selector-dropdown {
        padding: 0.5rem 2rem 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* ============================================================================
   GAME BOY THEME
   ============================================================================ */

body[data-theme="gameboy"] {
    --kh-primary: #2B2B2B;
    --kh-primary-light: #3A3A3A;
    --kh-primary-dark: #1A1A1A;
    --kh-accent: #2B2B2B;
    --kh-accent-glow: #3A3A3A;
    
    --bg-main: #C4C4A0;
    --bg-panel: #B8B896;
    --bg-elevated: #C4C4A0;
    --bg-hover: #CFCFB0;
    --bg-card: #B8B896;
    
    --text-primary: #2B2B2B;
    --text-secondary: #3A3A3A;
    --text-muted: #5A5A4A;
    
    --border: #2B2B2B;
    --border-light: #3A3A3A;
    --border-glow: #2B2B2B;
    
    --shadow: rgba(43, 43, 43, 0.2);
    --shadow-lg: rgba(43, 43, 43, 0.4);
    --glow: rgba(43, 43, 43, 0.3);
    --glow-strong: rgba(43, 43, 43, 0.6);
}

body[data-theme="gameboy"] * {
    text-shadow: none !important;
}

body[data-theme="gameboy"] {
    background: #C4C4A0;
}

body[data-theme="gameboy"] .kh-bg-stars,
body[data-theme="gameboy"] .kh-bg-pattern {
    display: none;
}

body[data-theme="gameboy"] .logo-mini {
    background: transparent;
    border: 3px solid #2B2B2B;
}

body[data-theme="gameboy"] .logo-shape {
    background: #2B2B2B;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

body[data-theme="gameboy"] .app-name {
    color: #2B2B2B;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

body[data-theme="gameboy"] .version-badge {
    background: transparent;
    color: #2B2B2B;
    border: 2px solid #2B2B2B;
}

body[data-theme="gameboy"] .top-bar {
    background: #B8B896;
    border-bottom: 3px solid #2B2B2B;
    box-shadow: none;
}

body[data-theme="gameboy"] .bar-glow {
    display: none;
}

body[data-theme="gameboy"] .left-panel,
body[data-theme="gameboy"] .center-panel .search-section,
body[data-theme="gameboy"] .center-panel .list-view,
body[data-theme="gameboy"] .right-panel {
    background: #C4C4A0;
    border: 3px solid #2B2B2B;
    box-shadow: inset 0 0 20px rgba(43, 43, 43, 0.1);
}

body[data-theme="gameboy"] .corner-accent {
    border-color: #2B2B2B;
    border-width: 3px;
}

body[data-theme="gameboy"] .category-item,
body[data-theme="gameboy"] .list-item {
    background: transparent;
    border: 2px solid #2B2B2B;
}

body[data-theme="gameboy"] .category-item:hover,
body[data-theme="gameboy"] .list-item:hover {
    background: #B8B896;
}

body[data-theme="gameboy"] .category-item.active,
body[data-theme="gameboy"] .list-item.active {
    background: #B8B896;
}

body[data-theme="gameboy"] .item-selector {
    background: transparent;
}

body[data-theme="gameboy"] .category-item:hover .item-selector,
body[data-theme="gameboy"] .category-item.active .item-selector {
    background: #2B2B2B;
}

body[data-theme="gameboy"] .cat-count,
body[data-theme="gameboy"] .stat-value,
body[data-theme="gameboy"] .counter-current,
body[data-theme="gameboy"] .item-number {
    color: #2B2B2B;
    font-family: 'Courier New', monospace;
}

body[data-theme="gameboy"] .list-item::before {
    background: #2B2B2B;
}

body[data-theme="gameboy"] .item-image-container {
    background: #B8B896;
    border: 2px solid #2B2B2B;
}

body[data-theme="gameboy"] .item-image {
    filter: none;
    opacity: 1;
}

body[data-theme="gameboy"] .item-no-image {
    background: #C4C4A0;
}

body[data-theme="gameboy"] .item-type-overlay {
    background: rgba(184, 184, 150, 0.95);
    border-top: 2px solid #2B2B2B;
    color: #2B2B2B;
}

body[data-theme="gameboy"] .search-input,
body[data-theme="gameboy"] .form-input,
body[data-theme="gameboy"] .form-textarea {
    background: #C4C4A0;
    border: 2px solid #2B2B2B;
    color: #2B2B2B;
}

body[data-theme="gameboy"] .search-input:focus,
body[data-theme="gameboy"] .form-input:focus,
body[data-theme="gameboy"] .form-textarea:focus {
    background: #CFCFB0;
    border-color: #2B2B2B;
    box-shadow: inset 0 0 10px rgba(43, 43, 43, 0.2);
}

body[data-theme="gameboy"] button {
    background: #B8B896;
    border: 2px solid #2B2B2B;
    color: #2B2B2B;
    box-shadow: none;
}

body[data-theme="gameboy"] button:hover {
    background: #C4C4A0;
    box-shadow: none;
}

body[data-theme="gameboy"] .add-btn,
body[data-theme="gameboy"] .submit-btn,
body[data-theme="gameboy"] .login-btn {
    background: #2B2B2B;
    color: #C4C4A0;
    border: 2px solid #2B2B2B;
}

body[data-theme="gameboy"] .add-btn:hover,
body[data-theme="gameboy"] .submit-btn:hover,
body[data-theme="gameboy"] .login-btn:hover {
    background: #3A3A3A;
}

body[data-theme="gameboy"] .tag-chip,
body[data-theme="gameboy"] .item-tag,
body[data-theme="gameboy"] .detail-tag {
    background: transparent;
    border: 2px solid #2B2B2B;
    color: #2B2B2B;
}

body[data-theme="gameboy"] .tag-chip.active,
body[data-theme="gameboy"] .tag-chip:hover {
    background: #2B2B2B;
    color: #C4C4A0;
}

body[data-theme="gameboy"] .modal-dialog,
body[data-theme="gameboy"] .login-container {
    background: #C4C4A0;
    border: 3px solid #2B2B2B;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

body[data-theme="gameboy"] .type-card {
    background: #C4C4A0;
    border: 2px solid #2B2B2B;
}

body[data-theme="gameboy"] .type-card:hover,
body[data-theme="gameboy"] .type-card.selected {
    background: #2B2B2B;
    color: #C4C4A0;
}

body[data-theme="gameboy"] .type-card.selected .type-text {
    color: #C4C4A0;
}

body[data-theme="gameboy"] .gallery-image {
    filter: none;
}

body[data-theme="gameboy"] .detail-number,
body[data-theme="gameboy"] .detail-title {
    color: #2B2B2B;
    font-family: 'Courier New', monospace;
}

body[data-theme="gameboy"] .info-card {
    background: #B8B896;
    border: 2px solid #2B2B2B;
    border-left-width: 4px;
}

body[data-theme="gameboy"] .toast {
    background: #C4C4A0;
    border: 3px solid #2B2B2B;
    color: #2B2B2B;
    box-shadow: none;
}

body[data-theme="gameboy"] ::-webkit-scrollbar-track {
    background: #C4C4A0;
}

body[data-theme="gameboy"] ::-webkit-scrollbar-thumb {
    background: #2B2B2B;
    border: 2px solid #C4C4A0;
}

body[data-theme="gameboy"] .logo-crown {
    background: transparent;
    box-shadow: none;
}

body[data-theme="gameboy"] .crown-glow {
    display: none;
}

body[data-theme="gameboy"] .crown-icon {
    filter: none;
}

body[data-theme="gameboy"] .entry-number-badge,
body[data-theme="gameboy"] .entry-type-badge-small,
body[data-theme="gameboy"] .gallery-nav,
body[data-theme="gameboy"] .gallery-counter {
    background: rgba(184, 184, 150, 0.95);
    border: 2px solid #2B2B2B;
    color: #2B2B2B;
    box-shadow: none;
}

body[data-theme="gameboy"] .style-selector-dropdown {
    background: #C4C4A0;
    border: 2px solid #2B2B2B;
    color: #2B2B2B;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232B2B2B' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
}

body[data-theme="gameboy"] .style-selector-dropdown:hover {
    background: #B8B896;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232B2B2B' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    box-shadow: none;
}
/* ============================================================================
   COOKING MAMA / ANIMAL CROSSING THEME
   ============================================================================ */

body[data-theme="cozy"] {
    --kh-primary: #FFB4A8;
    --kh-primary-light: #FFCCC4;
    --kh-primary-dark: #FF9B8E;
    --kh-accent: #FFF4A3;
    --kh-accent-glow: #FFFBCC;
    
    --bg-main: #FFF9F0;
    --bg-panel: #FFEBE0;
    --bg-elevated: #FFF5EB;
    --bg-hover: #FFD4C8;
    --bg-card: #FFF0E6;
    
    --text-primary: #6B4E3D;
    --text-secondary: #8B7355;
    --text-muted: #A89080;
    
    --border: #FFD4C8;
    --border-light: #FFE0D6;
    --border-glow: #FFB4A8;
    
    --shadow: rgba(107, 78, 61, 0.15);
    --shadow-lg: rgba(107, 78, 61, 0.25);
    --glow: rgba(255, 180, 168, 0.3);
    --glow-strong: rgba(255, 180, 168, 0.5);
}

/* Soften all borders and corners */
body[data-theme="cozy"] * {
    text-shadow: none !important;
}

body[data-theme="cozy"] {
    background: linear-gradient(135deg, #FFF9F0 0%, #FFEBE0 50%, #FFF5EB 100%);
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive, sans-serif;
}

/* Decorative background pattern */
body[data-theme="cozy"] .kh-bg-stars {
    background-image: 
        radial-gradient(circle, #FFE0D6 2px, transparent 2px),
        radial-gradient(circle, #FFD4C8 1px, transparent 1px);
    background-size: 80px 80px, 40px 40px;
    background-position: 0 0, 20px 20px;
    opacity: 0.4;
}

body[data-theme="cozy"] .kh-bg-pattern {
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 180, 168, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 212, 200, 0.08) 0%, transparent 50%);
}

/* Logo & Branding */
body[data-theme="cozy"] .logo-mini {
    background: linear-gradient(135deg, #FFB4A8 0%, #FFCCC4 100%);
    border: 3px solid #FFF5EB;
    box-shadow: 0 4px 12px rgba(255, 180, 168, 0.3);
}

body[data-theme="cozy"] .logo-shape {
    background: #FFFFFF;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: cozyBounce 2s ease-in-out infinite;
}

@keyframes cozyBounce {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
    }
    50% { 
        transform: scale(1.1) rotate(5deg);
    }
}

body[data-theme="cozy"] .app-name {
    color: #6B4E3D;
    font-family: 'Comic Sans MS', cursive;
    letter-spacing: 2px;
}

body[data-theme="cozy"] .version-badge {
    background: #FFFFFF;
    color: #FFB4A8;
    border: 2px solid #FFB4A8;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 180, 168, 0.3);
}

/* Top Bar */
body[data-theme="cozy"] .top-bar {
    background: linear-gradient(180deg, #FFEBE0 0%, #FFF5EB 100%);
    border-bottom: 3px solid #FFD4C8;
    box-shadow: 0 4px 12px rgba(107, 78, 61, 0.1);
}

body[data-theme="cozy"] .bar-glow {
    background: linear-gradient(90deg, transparent, #FFB4A8, transparent);
    opacity: 0.4;
}

/* Panels */
body[data-theme="cozy"] .left-panel,
body[data-theme="cozy"] .center-panel .search-section,
body[data-theme="cozy"] .center-panel .list-view,
body[data-theme="cozy"] .right-panel {
    background: #FFEBE0;
    border: 3px solid #FFD4C8;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(107, 78, 61, 0.12);
}

/* Corner Accents - Softer */
body[data-theme="cozy"] .corner-accent {
    border-color: #FFB4A8;
    border-width: 3px;
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* Category Items */
body[data-theme="cozy"] .category-item,
body[data-theme="cozy"] .list-item {
    background: #FFF5EB;
    border: 2px solid #FFE0D6;
    border-radius: 15px;
}

body[data-theme="cozy"] .category-item:hover,
body[data-theme="cozy"] .list-item:hover {
    background: #FFD4C8;
    border-color: #FFB4A8;
    transform: translateX(4px) scale(1.02);
}

body[data-theme="cozy"] .category-item.active,
body[data-theme="cozy"] .list-item.active {
    background: linear-gradient(90deg, #FFD4C8 0%, #FFE0D6 100%);
    border-color: #FFB4A8;
    box-shadow: 0 4px 12px rgba(255, 180, 168, 0.3);
}

body[data-theme="cozy"] .item-selector {
    background: transparent;
    border-radius: 4px;
}

body[data-theme="cozy"] .category-item:hover .item-selector,
body[data-theme="cozy"] .category-item.active .item-selector {
    background: #FFB4A8;
    box-shadow: 0 0 10px rgba(255, 180, 168, 0.5);
}

/* Counts & Numbers */
body[data-theme="cozy"] .cat-count,
body[data-theme="cozy"] .stat-value,
body[data-theme="cozy"] .counter-current,
body[data-theme="cozy"] .item-number,
body[data-theme="cozy"] .detail-number {
    color: #FFB4A8;
    font-family: 'Comic Sans MS', cursive;
}

body[data-theme="cozy"] .user-name {
    color: #6B4E3D;
}

/* List Items */
body[data-theme="cozy"] .list-item::before {
    background: #FFB4A8;
    box-shadow: 0 0 10px rgba(255, 180, 168, 0.4);
    border-radius: 4px;
}

body[data-theme="cozy"] .item-image-container {
    background: #FFF5EB;
    border: 3px solid #FFE0D6;
    border-radius: 15px;
}

body[data-theme="cozy"] .item-type-overlay {
    background: rgba(255, 235, 224, 0.95);
    border-top: 2px solid #FFB4A8;
    color: #6B4E3D;
    font-family: 'Comic Sans MS', cursive;
}

/* Tags */
body[data-theme="cozy"] .tag-chip,
body[data-theme="cozy"] .item-tag,
body[data-theme="cozy"] .detail-tag {
    background: #FFFFFF;
    border: 2px solid #FFD4C8;
    color: #6B4E3D;
    border-radius: 20px;
    font-family: 'Comic Sans MS', cursive;
}

body[data-theme="cozy"] .tag-chip:hover,
body[data-theme="cozy"] .tag-chip.active {
    background: #FFB4A8;
    color: #FFFFFF;
    border-color: #FFB4A8;
}

body[data-theme="cozy"] .item-tag-more {
    background: #FFB4A8;
    border-color: #FFB4A8;
    color: #FFFFFF;
}

/* Buttons */
body[data-theme="cozy"] button,
body[data-theme="cozy"] .form-button {
    background: #FFF5EB;
    border: 3px solid #FFD4C8;
    color: #6B4E3D;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(107, 78, 61, 0.1);
}

body[data-theme="cozy"] button:hover,
body[data-theme="cozy"] .form-button:hover {
    background: #FFD4C8;
    border-color: #FFB4A8;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(107, 78, 61, 0.15);
}

body[data-theme="cozy"] .add-btn,
body[data-theme="cozy"] .submit-btn,
body[data-theme="cozy"] .login-btn {
    background: linear-gradient(135deg, #FFB4A8 0%, #FFCCC4 100%);
    color: #FFFFFF;
    border: 3px solid #FFB4A8;
    box-shadow: 0 6px 15px rgba(255, 180, 168, 0.3);
}

body[data-theme="cozy"] .add-btn:hover,
body[data-theme="cozy"] .submit-btn:hover,
body[data-theme="cozy"] .login-btn:hover {
    background: linear-gradient(135deg, #FF9B8E 0%, #FFB4A8 100%);
    box-shadow: 0 8px 20px rgba(255, 180, 168, 0.4);
}

/* Inputs */
body[data-theme="cozy"] .search-input,
body[data-theme="cozy"] .form-input,
body[data-theme="cozy"] .form-textarea {
    background: #FFFFFF;
    border: 2px solid #FFE0D6;
    color: #6B4E3D;
    border-radius: 12px;
}

body[data-theme="cozy"] .search-input:focus,
body[data-theme="cozy"] .form-input:focus,
body[data-theme="cozy"] .form-textarea:focus {
    background: #FFFBF5;
    border-color: #FFB4A8;
    box-shadow: 0 0 15px rgba(255, 180, 168, 0.2);
}

/* Modal */
body[data-theme="cozy"] .modal-dialog,
body[data-theme="cozy"] .login-container {
    background: #FFEBE0;
    border: 3px solid #FFD4C8;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(107, 78, 61, 0.2);
}

body[data-theme="cozy"] .type-card {
    background: #FFF5EB;
    border: 2px solid #FFE0D6;
    border-radius: 15px;
}

body[data-theme="cozy"] .type-card:hover,
body[data-theme="cozy"] .type-card.selected {
    background: linear-gradient(135deg, #FFD4C8 0%, #FFE0D6 100%);
    border-color: #FFB4A8;
    transform: scale(1.05);
}

body[data-theme="cozy"] .type-card.selected .type-text {
    color: #6B4E3D;
    font-weight: 700;
}

/* Info Cards */
body[data-theme="cozy"] .info-card {
    background: #FFF5EB;
    border: 2px solid #FFE0D6;
    border-left: 5px solid #FFB4A8;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(107, 78, 61, 0.08);
}

/* Toasts */
body[data-theme="cozy"] .toast {
    background: #FFEBE0;
    border: 3px solid #FFB4A8;
    color: #6B4E3D;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(107, 78, 61, 0.15);
}

/* Scrollbar */
body[data-theme="cozy"] ::-webkit-scrollbar-track {
    background: #FFF5EB;
}

body[data-theme="cozy"] ::-webkit-scrollbar-thumb {
    background: #FFB4A8;
    border: 2px solid #FFF5EB;
    border-radius: 10px;
}

body[data-theme="cozy"] ::-webkit-scrollbar-thumb:hover {
    background: #FF9B8E;
}

/* Special Elements */
body[data-theme="cozy"] .logo-crown {
    background: linear-gradient(circle, rgba(255, 180, 168, 0.3) 0%, transparent 70%);
    box-shadow: 0 0 30px rgba(255, 180, 168, 0.3);
}

body[data-theme="cozy"] .crown-glow {
    background: radial-gradient(circle, rgba(255, 180, 168, 0.2) 0%, transparent 70%);
}

body[data-theme="cozy"] .entry-number-badge,
body[data-theme="cozy"] .entry-type-badge-small,
body[data-theme="cozy"] .gallery-nav,
body[data-theme="cozy"] .gallery-counter {
    background: rgba(255, 235, 224, 0.95);
    border: 2px solid #FFB4A8;
    color: #6B4E3D;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

body[data-theme="cozy"] .draft-item {
    border-left-color: #FFB4A8;
}

/* Style Selector */
body[data-theme="cozy"] .style-selector-dropdown {
    background-color: #FFF5EB;
    border: 2px solid #FFD4C8;
    color: #6B4E3D;
    border-radius: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FFB4A8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
}

body[data-theme="cozy"] .style-selector-dropdown:hover {
    background: #FFD4C8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FFB4A8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    box-shadow: 0 4px 10px rgba(255, 180, 168, 0.2);
}
/* ============================================================================
   CYBERPUNK THEME - NEON CITY AESTHETIC
   ============================================================================ */

body[data-theme="cyberpunk"] {
    --kh-primary: #FF0080;
    --kh-primary-light: #FF1493;
    --kh-primary-dark: #CC0066;
    --kh-accent: #00FFFF;
    --kh-accent-glow: #00FFFF;
    
    --bg-main: #0A0A0F;
    --bg-panel: #12121A;
    --bg-elevated: #1A1A28;
    --bg-hover: #252535;
    --bg-card: #16161F;
    
    --text-primary: #FFFFFF;
    --text-secondary: #A8A8B8;
    --text-muted: #6B6B7B;
    
    --border: #2A2A3A;
    --border-light: #3A3A4A;
    --border-glow: #FF0080;
    
    --shadow: rgba(0, 0, 0, 0.8);
    --shadow-lg: rgba(0, 0, 0, 0.95);
    --glow: rgba(255, 0, 128, 0.5);
    --glow-strong: rgba(255, 0, 128, 0.8);
}

body[data-theme="cyberpunk"] {
    background: #0A0A0F;
    font-family: 'Rajdhani', sans-serif;
}

/* Scanline effect background */
body[data-theme="cyberpunk"] .kh-bg-stars {
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 0, 128, 0.03) 2px,
            rgba(255, 0, 128, 0.03) 4px
        ),
        radial-gradient(circle at 30% 40%, rgba(255, 0, 128, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(0, 255, 255, 0.08) 0%, transparent 60%);
    opacity: 0.6;
}

body[data-theme="cyberpunk"] .kh-bg-pattern {
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 0, 128, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 255, 0.1) 0%, transparent 50%);
}

/* Unique hexagon logo */
body[data-theme="cyberpunk"] .logo-mini {
    background: linear-gradient(135deg, #1A1A28 0%, #252535 100%);
    border: 2px solid #FF0080;
    box-shadow: 
        0 0 20px rgba(255, 0, 128, 0.6),
        0 0 40px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(255, 0, 128, 0.1);
}

body[data-theme="cyberpunk"] .logo-shape {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #FF0080 0%, #00FFFF 100%);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    animation: cyberSpin 6s linear infinite;
    filter: drop-shadow(0 0 8px #FF0080);
}

@keyframes cyberSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Glitchy app name */
body[data-theme="cyberpunk"] .app-name {
    color: #FF0080;
    text-shadow: 
        0 0 10px rgba(255, 0, 128, 0.8),
        2px 0 5px rgba(0, 255, 255, 0.5),
        -2px 0 5px rgba(0, 255, 255, 0.5);
    animation: glitchText 3s infinite;
}

@keyframes glitchText {
    0%, 90%, 100% { 
        text-shadow: 
            0 0 10px rgba(255, 0, 128, 0.8),
            2px 0 5px rgba(0, 255, 255, 0.5),
            -2px 0 5px rgba(0, 255, 255, 0.5);
    }
    95% { 
        text-shadow: 
            0 0 20px rgba(255, 0, 128, 1),
            4px 0 10px rgba(0, 255, 255, 0.8),
            -4px 0 10px rgba(0, 255, 255, 0.8);
        transform: translateX(2px);
    }
}

body[data-theme="cyberpunk"] .version-badge {
    background: linear-gradient(135deg, #FF0080 0%, #CC0066 100%);
    color: #FFFFFF;
    border: 2px solid #00FFFF;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

body[data-theme="cyberpunk"] .top-bar {
    background: linear-gradient(180deg, #12121A 0%, #0A0A0F 100%);
    border-bottom: 2px solid #FF0080;
    box-shadow: 
        0 0 30px rgba(255, 0, 128, 0.5),
        0 4px 20px rgba(0, 0, 0, 0.8),
        inset 0 -1px 20px rgba(255, 0, 128, 0.2);
}

body[data-theme="cyberpunk"] .bar-glow {
    background: linear-gradient(90deg, transparent, #FF0080, #00FFFF, #FF0080, transparent);
    height: 2px;
    animation: barGlide 4s ease-in-out infinite;
}

@keyframes barGlide {
    0%, 100% { opacity: 0.5; transform: translateX(-50%); }
    50% { opacity: 1; transform: translateX(50%); }
}

/* Neon panels with depth */
body[data-theme="cyberpunk"] .left-panel,
body[data-theme="cyberpunk"] .center-panel .search-section,
body[data-theme="cyberpunk"] .center-panel .list-view,
body[data-theme="cyberpunk"] .right-panel {
    background: linear-gradient(135deg, #12121A 0%, #16161F 50%, #12121A 100%);
    border: 2px solid #FF0080;
    box-shadow: 
        0 0 20px rgba(255, 0, 128, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 0 40px rgba(0, 0, 0, 0.5),
        inset 0 0 2px rgba(255, 0, 128, 0.3);
}

body[data-theme="cyberpunk"] .corner-accent {
    border-color: #00FFFF;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    animation: cornerFlicker 2s ease-in-out infinite;
}

@keyframes cornerFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Sleek hover effects */
body[data-theme="cyberpunk"] .category-item:hover,
body[data-theme="cyberpunk"] .list-item:hover {
    background: linear-gradient(90deg, rgba(255, 0, 128, 0.15) 0%, rgba(0, 255, 255, 0.05) 100%);
    border-color: #FF0080;
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.3);
}

body[data-theme="cyberpunk"] .category-item.active {
    background: linear-gradient(90deg, rgba(255, 0, 128, 0.2) 0%, transparent 100%);
    border-color: #FF0080;
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.4);
}

body[data-theme="cyberpunk"] .category-item:hover .item-selector,
body[data-theme="cyberpunk"] .category-item.active .item-selector {
    background: linear-gradient(180deg, #FF0080 0%, #00FFFF 100%);
    box-shadow: 0 0 10px rgba(255, 0, 128, 0.8);
}

/* Neon pink numbers */
body[data-theme="cyberpunk"] .cat-count,
body[data-theme="cyberpunk"] .stat-value,
body[data-theme="cyberpunk"] .counter-current {
    color: #FF0080;
    text-shadow: 
        0 0 10px rgba(255, 0, 128, 1),
        0 0 20px rgba(255, 0, 128, 0.5);
    font-weight: 900;
}

body[data-theme="cyberpunk"] .user-name {
    color: #00FFFF;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

body[data-theme="cyberpunk"] .user-role {
    color: #A8A8B8;
}

/* Compact entry numbers - FIX for iOS */
body[data-theme="cyberpunk"] .item-number,
body[data-theme="cyberpunk"] .detail-number,
body[data-theme="cyberpunk"] .entry-number-badge {
    color: #FF0080;
    text-shadow: 
        0 0 10px rgba(255, 0, 128, 1),
        0 0 20px rgba(255, 0, 128, 0.5);
    font-family: 'Rajdhani', monospace;
    font-weight: 900;
    letter-spacing: -1px;
}

body[data-theme="cyberpunk"] .section-header {
    color: #FF0080;
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.6);
}

/* Glowing edge indicator */
body[data-theme="cyberpunk"] .list-item::before {
    background: linear-gradient(180deg, #FF0080 0%, #00FFFF 100%);
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.8);
}

body[data-theme="cyberpunk"] .list-item.active {
    border-color: #FF0080;
    background: rgba(255, 0, 128, 0.08);
    box-shadow: 
        0 0 20px rgba(255, 0, 128, 0.4),
        inset 0 0 20px rgba(255, 0, 128, 0.05);
}

/* Cyan tags */
body[data-theme="cyberpunk"] .item-tag {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00FFFF;
    color: #00FFFF;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

body[data-theme="cyberpunk"] .item-tag-more {
    background: linear-gradient(135deg, #FF0080 0%, #CC0066 100%);
    border-color: #FF0080;
    color: #FFFFFF;
    box-shadow: 0 0 10px rgba(255, 0, 128, 0.5);
}

/* Hot pink button */
body[data-theme="cyberpunk"] .add-btn {
    background: linear-gradient(135deg, #FF0080 0%, #CC0066 100%);
    color: #FFFFFF;
    border-color: #00FFFF;
    box-shadow: 
        0 0 20px rgba(255, 0, 128, 0.6),
        0 0 40px rgba(0, 255, 255, 0.3);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

body[data-theme="cyberpunk"] .add-btn:hover {
    box-shadow: 
        0 0 30px rgba(255, 0, 128, 0.8),
        0 0 50px rgba(0, 255, 255, 0.5);
}

body[data-theme="cyberpunk"] .modal-dialog,
body[data-theme="cyberpunk"] .login-container {
    background: linear-gradient(135deg, #12121A 0%, #16161F 50%, #12121A 100%);
    border: 2px solid #FF0080;
    box-shadow: 
        0 0 40px rgba(255, 0, 128, 0.6),
        0 0 80px rgba(0, 255, 255, 0.3),
        inset 0 0 50px rgba(0, 0, 0, 0.6);
}

body[data-theme="cyberpunk"] .type-card.selected {
    background: rgba(255, 0, 128, 0.15);
    border-color: #FF0080;
    box-shadow: 
        0 0 20px rgba(255, 0, 128, 0.6),
        inset 0 0 20px rgba(255, 0, 128, 0.1);
}

body[data-theme="cyberpunk"] .search-input:focus,
body[data-theme="cyberpunk"] .form-input:focus,
body[data-theme="cyberpunk"] .form-textarea:focus {
    border-color: #FF0080;
    box-shadow: 
        0 0 15px rgba(255, 0, 128, 0.5),
        inset 0 0 10px rgba(255, 0, 128, 0.1);
}

body[data-theme="cyberpunk"] .detail-tag,
body[data-theme="cyberpunk"] .tag-chip.active {
    background: linear-gradient(135deg, #FF0080 0%, #CC0066 100%);
    border-color: #00FFFF;
    color: #FFFFFF;
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.6);
}

body[data-theme="cyberpunk"] button:hover {
    border-color: #FF0080;
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.4);
}

body[data-theme="cyberpunk"] .info-card {
    background: rgba(255, 0, 128, 0.05);
    border-left-color: #FF0080;
    border-left-width: 4px;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.6),
        -4px 0 10px rgba(255, 0, 128, 0.3);
}

body[data-theme="cyberpunk"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FF0080 0%, #CC0066 100%);
    border-color: #0A0A0F;
    box-shadow: 0 0 10px rgba(255, 0, 128, 0.6);
}

body[data-theme="cyberpunk"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FF1493 0%, #00FFFF 100%);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

/* Entry images with cyber effect */
body[data-theme="cyberpunk"] .item-image-container,
body[data-theme="cyberpunk"] .image-gallery {
    border-color: #FF0080;
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.3);
}

body[data-theme="cyberpunk"] .item-type-overlay {
    background: rgba(18, 18, 26, 0.95);
    border-top-color: #FF0080;
    color: #00FFFF;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.6);
}

/* ============================================================================
   CONSOLE THEME - XBOX 360 / XBOX ONE INSPIRED
   ============================================================================ */

body[data-theme="console"] {
    --kh-primary: #107C10;
    --kh-primary-light: #1B9E1B;
    --kh-primary-dark: #0B5B0B;
    --kh-accent: #52B043;
    --kh-accent-glow: #7FD672;

    --bg-main: #1A1A1A;
    --bg-panel: #242424;
    --bg-elevated: #2D2D2D;
    --bg-hover: #333333;
    --bg-card: #282828;

    --text-primary: #FFFFFF;
    --text-secondary: #C8C8C8;
    --text-muted: #808080;

    --border: #3A3A3A;
    --border-light: #4A4A4A;
    --border-glow: #107C10;

    --shadow: rgba(0, 0, 0, 0.6);
    --shadow-lg: rgba(0, 0, 0, 0.85);
    --glow: rgba(16, 124, 16, 0.35);
    --glow-strong: rgba(16, 124, 16, 0.6);
}

body[data-theme="console"] {
    background: #1A1A1A;
    font-family: 'Segoe UI', 'Noto Sans', -apple-system, sans-serif;
}

/* Clean, minimal background - no stars, just subtle gradient tiles */
body[data-theme="console"] .kh-bg-stars {
    background-image:
        radial-gradient(circle at 50% 50%, rgba(16, 124, 16, 0.03) 0%, transparent 70%);
    opacity: 0.8;
}

body[data-theme="console"] .kh-bg-pattern {
    background-image:
        radial-gradient(circle at 30% 40%, rgba(16, 124, 16, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(82, 176, 67, 0.03) 0%, transparent 50%);
}

/* Logo - Xbox power button inspired */
body[data-theme="console"] .logo-mini {
    background: #1A1A1A;
    border: 2px solid #107C10;
    border-radius: 50%;
    box-shadow:
        0 0 12px rgba(16, 124, 16, 0.5),
        inset 0 0 8px rgba(16, 124, 16, 0.15);
}

body[data-theme="console"] .logo-shape {
    width: 16px;
    height: 16px;
    background: #107C10;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(16, 124, 16, 0.8);
    animation: consolePulse 3s ease-in-out infinite;
}

@keyframes consolePulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(16, 124, 16, 0.6);
        opacity: 0.9;
    }
    50% {
        box-shadow: 0 0 16px rgba(16, 124, 16, 1);
        opacity: 1;
    }
}

body[data-theme="console"] .app-name {
    color: #FFFFFF;
    font-weight: 300;
    letter-spacing: 4px;
    text-shadow: none;
}

body[data-theme="console"] .version-badge {
    background: #107C10;
    color: #FFFFFF;
    border: none;
    font-weight: 700;
    border-radius: 3px;
}

/* Top Bar - Xbox One dashboard style, clean gradient */
body[data-theme="console"] .top-bar {
    background: linear-gradient(180deg, #2D2D2D 0%, #242424 100%);
    border-bottom: 2px solid #107C10;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

body[data-theme="console"] .bar-glow {
    background: linear-gradient(90deg, transparent, #107C10, transparent);
    height: 2px;
    opacity: 0.7;
}

/* Panels - clean, flat, Xbox dashboard tiles feel */
body[data-theme="console"] .left-panel,
body[data-theme="console"] .center-panel .search-section,
body[data-theme="console"] .center-panel .list-view,
body[data-theme="console"] .right-panel {
    background: #242424;
    border: 1px solid #3A3A3A;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

body[data-theme="console"] .corner-accent {
    border-color: #107C10;
    opacity: 0.5;
}

/* Category items - Xbox tile navigation */
body[data-theme="console"] .category-item {
    border-radius: 4px;
    transition: all 0.2s ease;
}

body[data-theme="console"] .category-item:hover,
body[data-theme="console"] .list-item:hover {
    background: rgba(16, 124, 16, 0.12);
    border-color: #107C10;
}

body[data-theme="console"] .category-item.active {
    background: linear-gradient(90deg, rgba(16, 124, 16, 0.2) 0%, transparent 100%);
    border-left: 3px solid #107C10;
}

body[data-theme="console"] .item-selector {
    background: transparent;
}

body[data-theme="console"] .category-item:hover .item-selector,
body[data-theme="console"] .category-item.active .item-selector {
    background: #107C10;
    box-shadow: 0 0 8px rgba(16, 124, 16, 0.7);
}

/* Green accent numbers */
body[data-theme="console"] .cat-count,
body[data-theme="console"] .stat-value,
body[data-theme="console"] .counter-current {
    color: #52B043;
    text-shadow: 0 0 6px rgba(82, 176, 67, 0.4);
    font-weight: 700;
}

body[data-theme="console"] .section-header {
    color: #C8C8C8;
    letter-spacing: 2px;
}

body[data-theme="console"] .user-name {
    color: #52B043;
    text-shadow: none;
}

body[data-theme="console"] .user-role {
    color: #808080;
}

body[data-theme="console"] .item-number,
body[data-theme="console"] .detail-number,
body[data-theme="console"] .entry-number-badge {
    color: #107C10;
    text-shadow: 0 0 8px rgba(16, 124, 16, 0.5);
}

/* List items - clean Xbox guide style */
body[data-theme="console"] .list-item::before,
body[data-theme="console"] .list-item.active::before {
    background: #107C10;
    box-shadow: 0 0 6px rgba(16, 124, 16, 0.5);
}

body[data-theme="console"] .list-item.active {
    background: rgba(16, 124, 16, 0.1);
    border-color: #107C10;
}

/* Tags - Xbox achievement style */
body[data-theme="console"] .item-tag,
body[data-theme="console"] .item-tag-more {
    background: rgba(16, 124, 16, 0.15);
    border: 1px solid #107C10;
    color: #52B043;
    border-radius: 3px;
}

body[data-theme="console"] .tag-chip {
    background: #2D2D2D;
    border: 1px solid #3A3A3A;
    color: #C8C8C8;
    border-radius: 3px;
}

body[data-theme="console"] .tag-chip.active,
body[data-theme="console"] .tag-chip:hover {
    background: #107C10;
    border-color: #107C10;
    color: #FFFFFF;
    box-shadow: 0 0 8px rgba(16, 124, 16, 0.4);
}

/* Buttons - Xbox flat tile style */
body[data-theme="console"] .add-btn {
    background: #107C10;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-shadow: none;
    box-shadow: 0 2px 8px rgba(16, 124, 16, 0.3);
}

body[data-theme="console"] .add-btn:hover {
    background: #1B9E1B;
    box-shadow: 0 4px 16px rgba(16, 124, 16, 0.5);
}

body[data-theme="console"] .submit-btn,
body[data-theme="console"] .login-btn {
    background: #107C10;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
}

body[data-theme="console"] .submit-btn:hover,
body[data-theme="console"] .login-btn:hover {
    background: #1B9E1B;
}

body[data-theme="console"] button {
    border-radius: 4px;
}

body[data-theme="console"] button:hover {
    box-shadow: 0 0 10px rgba(16, 124, 16, 0.2);
}

/* Inputs - clean dark fields */
body[data-theme="console"] .search-input,
body[data-theme="console"] .form-input,
body[data-theme="console"] .form-textarea {
    background: #1A1A1A;
    border: 1px solid #3A3A3A;
    color: #FFFFFF;
    border-radius: 4px;
}

body[data-theme="console"] .search-input:focus,
body[data-theme="console"] .form-input:focus,
body[data-theme="console"] .form-textarea:focus {
    border-color: #107C10;
    box-shadow: 0 0 8px rgba(16, 124, 16, 0.3);
    outline: none;
}

/* Modal - Xbox One overlay style */
body[data-theme="console"] .modal-dialog,
body[data-theme="console"] .login-container {
    background: #242424;
    border: 1px solid #3A3A3A;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
}

body[data-theme="console"] .type-card {
    background: #2D2D2D;
    border: 1px solid #3A3A3A;
    border-radius: 4px;
}

body[data-theme="console"] .type-card:hover {
    border-color: #107C10;
    background: #333333;
}

body[data-theme="console"] .type-card.selected {
    background: #107C10;
    border-color: #1B9E1B;
    color: #FFFFFF;
    box-shadow: 0 0 12px rgba(16, 124, 16, 0.4);
}

body[data-theme="console"] .type-card.selected .type-text {
    color: #FFFFFF;
}

/* Images */
body[data-theme="console"] .item-image-container,
body[data-theme="console"] .image-gallery {
    border-color: #3A3A3A;
    border-radius: 4px;
}

body[data-theme="console"] .item-type-overlay {
    background: rgba(36, 36, 36, 0.95);
    border-top: 1px solid #3A3A3A;
    color: #52B043;
}

/* Detail view */
body[data-theme="console"] .detail-number,
body[data-theme="console"] .detail-title {
    color: #FFFFFF;
    font-weight: 400;
    letter-spacing: 1px;
}

body[data-theme="console"] .info-card {
    background: #2D2D2D;
    border: 1px solid #3A3A3A;
    border-left: 3px solid #107C10;
    border-radius: 4px;
}

body[data-theme="console"] .detail-tag {
    background: rgba(16, 124, 16, 0.15);
    border: 1px solid #107C10;
    color: #52B043;
    border-radius: 3px;
}

/* Toast */
body[data-theme="console"] .toast {
    background: #2D2D2D;
    border: 1px solid #107C10;
    border-left: 4px solid #107C10;
    color: #FFFFFF;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Scrollbar - Xbox thin style */
body[data-theme="console"] ::-webkit-scrollbar-track {
    background: #1A1A1A;
}

body[data-theme="console"] ::-webkit-scrollbar-thumb {
    background: #3A3A3A;
    border-radius: 4px;
}

body[data-theme="console"] ::-webkit-scrollbar-thumb:hover {
    background: #107C10;
}

/* Login screen */
body[data-theme="console"] .logo-crown {
    background: transparent;
    box-shadow: none;
}

body[data-theme="console"] .crown-glow {
    display: none;
}

body[data-theme="console"] .entry-number-badge,
body[data-theme="console"] .entry-type-badge-small {
    background: rgba(36, 36, 36, 0.95);
    border: 1px solid #3A3A3A;
    color: #52B043;
    border-radius: 3px;
}

body[data-theme="console"] .gallery-nav,
body[data-theme="console"] .gallery-counter {
    background: rgba(36, 36, 36, 0.95);
    border: 1px solid #3A3A3A;
    color: #FFFFFF;
    border-radius: 4px;
}

/* Closet items */
body[data-theme="console"] .closet-item-card {
    border-color: #3A3A3A;
    border-radius: 4px;
}

body[data-theme="console"] .closet-item-card:hover {
    border-color: #107C10;
    box-shadow: 0 2px 12px rgba(16, 124, 16, 0.3);
}

body[data-theme="console"] .closet-item-card.active {
    border-color: #107C10;
    box-shadow: 0 0 15px rgba(16, 124, 16, 0.4);
}

body[data-theme="console"] .closet-category-badge {
    background: rgba(26, 26, 26, 0.95);
    border-color: #107C10;
    color: #52B043;
}

/* Bookmark tabs - Xbox guide tabs */
body[data-theme="console"] .bookmark-tab {
    border-radius: 4px 4px 0 0;
}

body[data-theme="console"] .bookmark-tab.active {
    border-bottom: 2px solid #107C10;
}

/* Bottom nav */
body[data-theme="console"] .mobile-bottom-nav {
    background: #242424;
    border-top: 1px solid #3A3A3A;
}

body[data-theme="console"] .bottom-nav-btn.active {
    color: #107C10;
}

body[data-theme="console"] .bottom-nav-btn.active::after {
    background: #107C10;
}

/* Small Mobile */
@media (max-width: 480px) {
    .mobile-menu-container {
        width: 90vw;
    }

    .activity-panel {
        width: 100%;
        right: -100%;
    }

    .mobile-menu-btn,
    .mobile-info-btn {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    /* Smaller bottom nav for very small screens */
    .mobile-bottom-nav {
        height: 60px;
        padding: 0.25rem 0.25rem calc(0.25rem + env(safe-area-inset-bottom));
    }

    .app-wrapper {
        bottom: 60px;
        height: auto;
    }

    .modal-overlay {
        padding-bottom: 60px;
    }

    .modal-dialog {
        max-height: calc(95vh - 60px);
    }

    .bottom-nav-btn {
        padding: 0.4rem 0.2rem;
        gap: 0.2rem;
    }

    .bottom-nav-btn .nav-icon {
        font-size: 1.3rem;
    }

    .bottom-nav-btn .nav-label {
        font-size: 0.65rem;
    }
    
    .type-grid {
        grid-template-columns: 1fr;
    }
    
    .image-gallery {
        min-height: 200px;
        max-height: 300px;
    }
}
@media (max-width: 1024px) {
    /* ...existing mobile styles... */
    
    .item-right {
        width: 110px;
    }
    
    .item-image-container {
        min-height: 120px;
        max-height: 120px;
    }
    
    .list-item {
        min-height: 123px; /* CHANGE THIS VALUE */
        max-height: 123px; /* CHANGE THIS VALUE */
        padding: 0.5rem;
    }
    
    .item-content {
        grid-template-columns: 1fr 110px;
        gap: 0.5rem; /* Tighter gap */
    }

    .item-header {
        padding-left: 4px;
    }

    .item-middle {
        grid-template-columns: 58px 1fr;
        gap: 0.75rem;
        padding-left: 4px;
    }

    .item-number {
        font-size: 1.2rem;
    }

    .item-title {
        font-size: 1.32rem;
        text-align: left;
    }

    .item-subtitle {
        font-size: 0.96rem;
    }

    .item-info {
        padding-right: 4px;
    }

    .item-tags {
        padding-left: 2px;
        max-height: 30px; /* Enforce maximum height */
    }

    .item-tag {
        padding: 0.2rem 0.3rem;
        font-size: 0.6rem;
    }

    .item-tag-more {
        padding: 0.2rem 0.3rem;
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    /* ...existing mobile styles... */

    .item-right {
        width: 100px;
    }

    .item-image-container {
        min-height: 110px;
        max-height: 110px;
    }

    .list-item {
        min-height: 133px;
        max-height: 133px;
    }

    .item-content {
        grid-template-columns: 1fr 100px;
        gap: 0.75rem;
    }

    .item-header {
        padding-left: 4px;
    }

    .item-middle {
        grid-template-columns: 50px 1fr;
        gap: 1rem;
        padding-left: 4px;
    }

    .item-number {
        font-size: 1.2rem;
    }

    .item-title {
        font-size: 1.2rem;
        text-align: left;
    }

    .item-subtitle {
        font-size: 0.96rem;
    }

    .item-info {
        padding-right: 8px;
    }

    .item-tags {
        padding-left: 4px;
    }

    .item-tag {
        padding: 0.25rem 0.5rem;
        font-size: 0.55rem;
    }

    .item-tag-more {
        padding: 0.25rem 0.5rem;
        font-size: 0.55rem;
    }

    /* Gallery navigation for mobile */
    .gallery-nav {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    .gallery-nav.prev {
        left: 0.5rem;
    }

    .gallery-nav.next {
        right: 0.5rem;
    }

    .gallery-counter {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
        bottom: 0.75rem;
    }
}

/* ============================================================================
   CLOSET SYSTEM - PERSONAL WARDROBE
   ============================================================================ */

/* View Mode Toggle */
.view-mode-toggle {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.view-mode-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-mode-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.view-mode-btn.active {
    background: var(--kh-primary-dark);
    color: var(--text-primary);
    box-shadow: 0 0 10px var(--glow);
}

/* Closet Add Section */
/* Three-button action row in closet toolbar */
.closet-action-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.closet-action-item {
    flex: 1;
    min-width: 0;
}

.closet-action-item .panel-btn,
.closet-action-item .ai-stylist-btn,
.closet-action-item .style-match-btn {
    width: 100%;
    margin-bottom: 0;
}

.closet-add-section {
    margin-top: 0;
}

/* Closet Grid View Container */
.closet-grid-view {
    flex: 1;
    overflow: hidden;
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 30px var(--glow), inset 0 0 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.closet-grid-scroll {
    height: 100%;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    align-content: start;
}

/* Closet Item Card - Inventory Grid Style */
.closet-item-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.closet-item-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: transparent;
    border-radius: var(--radius-md);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 0 20px var(--glow);
}

.closet-item-card:hover {
    border-color: var(--kh-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--glow);
}

.closet-item-card:hover::before {
    opacity: 1;
}

.closet-item-card.active {
    border-color: var(--kh-primary);
    background: var(--bg-hover);
    box-shadow: 0 0 25px var(--glow-strong);
}

.closet-item-image {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-elevated);
    margin-bottom: 0.4rem;
    border: 1px solid var(--border);
}

.closet-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.closet-item-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--bg-elevated);
    font-size: 2rem;
    opacity: 0.3;
}

.closet-category-badge {
    position: absolute;
    bottom: 0.35rem;
    left: 0.35rem;
    padding: 0.15rem 0.4rem;
    background: rgba(20, 24, 40, 0.95);
    border: 1px solid var(--kh-primary);
    border-radius: var(--radius-sm);
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--kh-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 10px var(--glow);
}

.closet-favorite-badge {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    font-size: 1rem;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.8));
    animation: favoritePulse 2s ease-in-out infinite;
}

@keyframes favoritePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.closet-item-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.closet-item-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Closet Detail View Adaptations */
.closet-detail-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border);
    text-align: center;
}

.closet-detail-name {
    font-family: 'Orbitron', monospace;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.closet-detail-category {
    display: inline-block;
    padding: 0.6rem 1.75rem;
    background: var(--kh-primary-dark);
    border: 2px solid var(--kh-primary);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-primary);
    box-shadow: 0 0 20px var(--glow);
    margin-bottom: 1rem;
}

.closet-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.closet-favorite-toggle {
    font-size: 1.5rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.closet-favorite-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
}

.closet-favorite-toggle.active {
    background: var(--kh-primary-dark);
    border-color: var(--kh-accent);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

/* Empty State for Closet */
.closet-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 3rem;
    text-align: center;
}

.closet-empty-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.closet-empty-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2rem;
}

.closet-empty-cta {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--kh-primary-dark) 0%, var(--kh-primary) 100%);
    border: 2px solid var(--kh-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px var(--glow);
    font-family: inherit;
}

.closet-empty-cta:hover {
    box-shadow: 0 0 30px var(--glow-strong);
    transform: translateY(-2px);
}

/* Closet List View */
.closet-list-view {
    flex: 1;
    overflow: hidden;
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 30px var(--glow), inset 0 0 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.closet-list-view.hidden {
    display: none;
}

/* Responsive - Tablets */
@media (max-width: 1200px) {
    .closet-grid-scroll {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.65rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 1024px) {
    .closet-grid-scroll {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.5rem;
        padding: 0.65rem;
        padding-bottom: 2rem;
    }

    .closet-item-card {
        padding: 0.35rem;
    }

    .closet-item-name {
        font-size: 0.65rem;
    }

    .closet-item-meta {
        font-size: 0.55rem;
    }

    .closet-category-badge {
        font-size: 0.5rem;
        padding: 0.1rem 0.3rem;
    }

    .closet-favorite-badge {
        font-size: 0.85rem;
    }

    .view-mode-toggle {
        flex-direction: row;
    }
}

@media (max-width: 480px) {
    .closet-grid-scroll {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
        gap: 0.4rem;
        padding: 0.5rem;
        padding-bottom: 2rem;
    }

    .closet-item-card {
        padding: 0.3rem;
    }

    .closet-item-name {
        font-size: 0.6rem;
    }

    .closet-category-badge {
        font-size: 0.45rem;
        padding: 0.1rem 0.25rem;
    }

    .closet-favorite-badge {
        font-size: 0.75rem;
        top: 0.25rem;
        right: 0.25rem;
    }
}

/* ============================================================================
   PROFILE ONBOARDING
   ============================================================================ */

.onboarding-dialog {
    max-width: 520px;
}

.onboarding-header {
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--border);
    background: var(--bg-elevated);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.onboarding-welcome {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--kh-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 15px var(--glow);
    margin-bottom: 0.35rem;
}

.onboarding-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.onboarding-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--kh-primary);
    border-color: var(--kh-primary);
    color: var(--bg-panel);
    box-shadow: 0 0 12px var(--glow-strong);
}

.step-dot.completed {
    background: var(--kh-primary);
    border-color: var(--kh-primary);
    color: var(--bg-panel);
    opacity: 0.6;
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--border);
    transition: background 0.3s ease;
}

.step-line.active {
    background: var(--kh-primary);
    box-shadow: 0 0 6px var(--glow);
}

.onboarding-body {
    padding: 1.5rem 2rem;
}

.onboarding-step {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    animation: stepFadeIn 0.3s ease;
}

.onboarding-step.active {
    display: flex;
}

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.step-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.step-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: -0.75rem;
}

.onboarding-photo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.onboarding-photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.onboarding-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.onboarding-photo-preview .photo-placeholder {
    font-size: 3rem;
    opacity: 0.3;
}

.onboarding-photo-preview.has-photo {
    border-color: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
}

.onboarding-tag-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.tag-suggestion {
    padding: 0.4rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-suggestion:hover {
    border-color: var(--kh-primary);
    color: var(--kh-primary);
}

.tag-suggestion.selected {
    background: var(--kh-primary);
    border-color: var(--kh-primary);
    color: var(--bg-panel);
    box-shadow: 0 0 8px var(--glow);
}

.onboarding-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    border-top: 2px solid var(--border);
    background: var(--bg-elevated);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.onboarding-nav-buttons {
    display: flex;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .onboarding-dialog {
        width: 95%;
        max-height: 95vh;
    }

    .onboarding-header {
        padding: 1.5rem 1.25rem 1rem;
    }

    .onboarding-welcome {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .onboarding-body {
        padding: 1.25rem;
    }

    .onboarding-footer {
        padding: 1rem 1.25rem;
    }

    .step-line {
        width: 24px;
    }
}

/* ============================================================================
   CLOSET QUICK-ADD FLOW
   ============================================================================ */

/* Dual upload buttons (camera + browse) */
.upload-buttons {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.upload-buttons .upload-btn {
    flex: 1;
}

@media (max-width: 480px) {
    .upload-buttons {
        flex-direction: column;
    }

    .upload-area {
        padding: 1rem;
    }
}

/* Collapsible details toggle */
.form-details-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    user-select: none;
}

.form-details-toggle:hover {
    border-color: var(--kh-primary);
    color: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
}

.form-details-toggle .toggle-icon {
    font-size: 1.1rem;
    font-weight: 900;
    transition: transform 0.3s ease;
}

.form-details-toggle.expanded .toggle-icon {
    transform: rotate(45deg);
}

/* Collapsed details section */
.form-details-section {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 2000px;
    opacity: 1;
}

.form-details-section.collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    margin: 0;
}

/* Success / Add Another state */
.closet-save-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 3rem 2rem;
    text-align: center;
}

.closet-save-success.hidden {
    display: none;
}

.closet-save-success .success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--kh-primary);
    color: var(--bg-panel);
    font-size: 2rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px var(--glow-strong);
    animation: successPop 0.4s ease;
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.closet-save-success .success-message {
    font-family: 'Orbitron', monospace;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.closet-save-success .success-actions {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
}

.closet-save-success .success-actions .form-button {
    flex: 1;
}

/* Mobile: collapse action row without display:none (which would kill fixed children) */
@media (max-width: 768px) {
    .closet-action-row {
        visibility: hidden;
        height: 0;
        margin: 0;
        overflow: visible;
    }

    /* Add Item FAB — bottom */
    .closet-action-item.closet-fab {
        visibility: visible;
        position: fixed;
        bottom: 80px;
        right: 16px;
        z-index: 100;
        width: auto;
        flex: none;
    }

    .closet-action-item.closet-fab .panel-btn {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 20px var(--glow-strong);
        margin-bottom: 0;
    }

    .closet-action-item.closet-fab .panel-btn .btn-text { display: none; }
    .closet-action-item.closet-fab .panel-btn .btn-icon { font-size: 1.5rem; }

    /* AI Stylist FAB — middle */
    .closet-action-item.ai-stylist-fab {
        visibility: visible;
        position: fixed;
        bottom: 144px;
        right: 16px;
        z-index: 100;
        width: auto;
        flex: none;
    }

    .closet-action-item.ai-stylist-fab .ai-stylist-btn {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        padding: 0;
        letter-spacing: 0;
        box-shadow: 0 4px 20px rgba(124, 77, 255, 0.6);
    }

    .closet-action-item.ai-stylist-fab .ai-stylist-btn .btn-text { display: none; }

    /* AI Image FAB — top */
    .closet-action-item.style-match-fab {
        visibility: visible;
        position: fixed;
        bottom: 208px;
        right: 16px;
        z-index: 100;
        width: auto;
        flex: none;
    }

    .closet-action-item.style-match-fab .style-match-btn {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        padding: 0;
        letter-spacing: 0;
        box-shadow: 0 4px 20px rgba(20, 160, 120, 0.6);
    }

    .closet-action-item.style-match-fab .style-match-btn .btn-text { display: none; }
}

/* ============================================================================
   PROFILE PAGE - MYSPACE INSPIRED
   ============================================================================ */

#profilePage {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

#profilePage.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#socialPage {
    overflow-y: auto;
    padding: 0;
}

#socialPage.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.profile-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    overflow-x: hidden;
}

/* Profile Header */
.profile-header {
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 30px var(--glow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.profile-banner {
    height: 200px;
    background: linear-gradient(135deg, var(--kh-primary-dark), var(--kh-primary), var(--kh-accent));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: 100% auto;
    background-position: center;
    background-repeat: no-repeat;
}

.profile-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, var(--bg-panel));
}

.edit-banner-btn {
    position: absolute;
    top: 1rem;
    right: 2.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.edit-banner-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--kh-primary);
}

.profile-top {
    padding: 0 2rem 2rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    position: relative;
    margin-top: -60px;
}

.profile-pic-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--kh-primary);
    box-shadow: 0 0 20px var(--glow-strong), 0 4px 20px var(--shadow-lg);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
}

.profile-pic-placeholder {
    font-size: 4rem;
    opacity: 0.5;
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-pic-btn {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.4rem 0.8rem;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.edit-pic-btn:hover {
    background: var(--kh-primary);
    border-color: var(--kh-primary);
}

.profile-info {
    flex: 1;
    padding-top: 1rem;
}

.profile-name {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 900;
    color: var(--kh-primary);
    text-shadow: 0 0 15px var(--glow);
    margin-bottom: 0.5rem;
}

.profile-status {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.profile-stats {
    display: flex;
    gap: 2rem;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    min-width: 100px;
    transition: all 0.3s ease;
}

.stat-box:hover {
    border-color: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
    transform: translateY(-2px);
}

.mood-stat-box {
    cursor: pointer;
}

.mood-emoji-stat {
    font-size: 2rem;
    line-height: 1;
}

/* Mood Dropdown */
.mood-dropdown {
    padding: 0.5rem;
}

.mood-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 1rem;
    text-align: left;
}

.mood-option:hover {
    background: var(--bg-hover);
    border-color: var(--kh-primary);
    transform: translateX(3px);
}

.mood-option-emoji {
    font-size: 1.5rem;
    line-height: 1;
}

.mood-option-label {
    font-weight: 600;
}

.stat-num {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kh-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.edit-profile-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--kh-primary);
    border: 2px solid var(--kh-primary);
    border-radius: var(--radius-md);
    color: var(--bg-main);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.edit-profile-btn:hover {
    background: transparent;
    color: var(--kh-primary);
    box-shadow: 0 0 20px var(--glow-strong);
}

/* Profile Content Grid */
.profile-content-grid {
    display: grid;
    grid-template-columns: 350px minmax(0, 800px);
    gap: 1.5rem;
    align-items: stretch;
}

/* Sidebar — flex column so last box can grow to fill */
.profile-sidebar {
    display: flex;
    flex-direction: column;
}

.profile-sidebar .profile-box:last-child {
    flex: 1;
    margin-bottom: 0;
}

/* Main column — contributions box fills the full height */
.profile-main {
    display: flex;
    flex-direction: column;
}

.contributions-box {
    flex: 1;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.contributions-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Contribution section row labels */
.contrib-section-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.6rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}

/* Profile Boxes - MySpace Style */
.profile-box {
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 20px var(--glow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.box-header {
    background: var(--bg-elevated);
    border-bottom: 2px solid var(--border-light);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.box-header h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--kh-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.box-content {
    padding: 1.5rem;
}

.box-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Box Tabs */
.box-tabs {
    display: flex;
    gap: 0.5rem;
}

.box-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.box-tab:hover {
    color: var(--text-primary);
    border-color: var(--kh-primary);
}

.box-tab.active {
    background: var(--kh-primary);
    border-color: var(--kh-primary);
    color: var(--bg-main);
}

/* Interest Tags */
.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.interest-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--kh-primary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.interest-tag:hover {
    border-color: var(--kh-primary);
    box-shadow: 0 0 10px var(--glow);
}

/* Favorites List */
.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fave-item {
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border-left: 3px solid var(--kh-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.fave-item:hover {
    background: var(--bg-hover);
    border-left-width: 5px;
    padding-left: 1.2rem;
}

/* Contributions Tabs */

.profile-entries-grid,
.profile-closet-grid {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* hide scrollbar but keep scroll */
    scrollbar-width: thin;
    scrollbar-color: var(--kh-primary) transparent;
}

.profile-entries-grid::-webkit-scrollbar,
.profile-closet-grid::-webkit-scrollbar {
    height: 4px;
}

.profile-entries-grid::-webkit-scrollbar-track,
.profile-closet-grid::-webkit-scrollbar-track {
    background: transparent;
}

.profile-entries-grid::-webkit-scrollbar-thumb,
.profile-closet-grid::-webkit-scrollbar-thumb {
    background: var(--kh-primary);
    border-radius: 2px;
}

.profile-entry-card,
.profile-closet-card {
    flex: 0 0 120px;
    scroll-snap-align: start;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.profile-entry-card:hover,
.profile-closet-card:hover {
    border-color: var(--kh-primary);
    box-shadow: 0 0 15px var(--glow);
    transform: translateY(-2px);
}

.profile-card-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card-name {
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.4rem 0.5rem 0.1rem;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-card-type {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 0.5rem 0.4rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-text {
    font-size: 1rem;
}

/* Mood Box */
.mood-box .box-content {
    padding: 1rem 1.5rem;
}

.mood-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
}

.mood-emoji {
    font-size: 2rem;
}

.mood-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Profile Modal */
.profile-modal-dialog {
    max-width: 700px;
}

/* View-profile modal: full-bleed banner needs no padding */
#viewUserProfileModal .modal-body {
    padding: 0;
    overflow-y: auto;
}

/* Edit-profile modal: needs proper padding */
#profileModalOverlay .modal-body {
    padding: 1.5rem;
}

/* Social Entry / Closet Detail Modal — sits above user profile modal */
#socialDetailModal {
    z-index: 1050;
}

.social-detail-dialog {
    max-width: 640px;
}

@media (max-width: 768px) {
    .social-detail-dialog {
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        margin: 0;
    }
}

/* ============================================================
   REDESIGNED USER PROFILE MODAL (vp-* classes)
   ============================================================ */

.vp-banner {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.vp-banner-default {
    background: linear-gradient(135deg, var(--kh-primary-dark, #1a0a2e) 0%, var(--kh-primary, #7b2fbe) 100%);
    opacity: 0.75;
}

.vp-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem 1rem;
}

.vp-avatar-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--kh-primary);
    box-shadow: 0 0 16px var(--glow);
    background: var(--bg-elevated);
    overflow: hidden;
    flex-shrink: 0;
}

.vp-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vp-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.vp-name-block {
    flex: 1;
    min-width: 0;
    padding-bottom: 0.25rem;
}

.vp-display-name {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--kh-primary);
    text-shadow: 0 0 8px var(--glow);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vp-username {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.vp-status-line {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-style: italic;
}

.vp-mood-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.35rem;
    padding: 0.2rem 0.6rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.vp-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0.5rem 1.5rem 0;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.vp-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-align: center;
}

.vp-stat-num {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--kh-primary);
    line-height: 1;
}

.vp-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vp-stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
    flex-shrink: 0;
}

.vp-about-section {
    margin: 1rem 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.vp-about-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--kh-primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.15rem;
}

.vp-about-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.vp-about-item + .vp-about-item {
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
}

.vp-section {
    margin: 1.25rem 1.5rem 0;
}

.vp-section:last-child {
    padding-bottom: 1.5rem;
}

.vp-section-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--kh-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vp-section-count {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    background: var(--kh-primary);
    color: var(--bg-main);
    border-radius: 999px;
    line-height: 1.4;
}

.vp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
}

.vp-item {
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.vp-item:hover {
    transform: translateY(-3px);
    border-color: var(--kh-primary);
    box-shadow: 0 0 14px var(--glow);
}

.vp-item-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.vp-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vp-item-emoji {
    font-size: 1.75rem;
}

.vp-item-badge {
    position: absolute;
    bottom: 0.35rem;
    left: 0.35rem;
    padding: 0.15rem 0.4rem;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid var(--kh-primary);
    border-radius: var(--radius-sm);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--kh-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    max-width: calc(100% - 0.7rem);
    overflow: hidden;
    text-overflow: ellipsis;
}

.vp-item-name {
    padding: 0.4rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* View User Profile Modal Styles */
.view-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.view-profile-info {
    flex: 1;
}

.view-profile-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.view-profile-status {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.view-profile-mood {
    font-size: 0.9rem;
    color: var(--accent-primary);
}

.view-profile-stats {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 16px;
    justify-content: center;
}

.view-profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.view-profile-stat-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.view-profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.view-profile-bio,
.view-profile-interests,
.view-profile-designers {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.view-profile-bio strong,
.view-profile-interests strong,
.view-profile-designers strong {
    color: var(--text-primary);
}

.view-profile-section {
    margin-top: 20px;
}

.view-profile-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.view-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.view-profile-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.view-profile-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.view-profile-item-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.view-profile-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.view-profile-item-name {
    padding: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.mood-selector {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.75rem;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Responsive - Tablet */
@media (max-width: 1200px) {
    .profile-content-grid {
        grid-template-columns: 1fr;
        align-items: start;
    }

    /* Reset flex stretching — columns just stack normally */
    .profile-sidebar,
    .profile-main {
        display: block;
    }

    .profile-sidebar .profile-box:last-child,
    .contributions-box {
        flex: unset;
        margin-bottom: 1.5rem;
    }

    .profile-stats {
        flex-wrap: wrap;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .profile-container {
        padding: 0.75rem;
        overflow-x: hidden;
        max-width: 100%;
    }

    .profile-header {
        overflow: hidden;
        max-width: 100%;
    }

    .profile-banner {
        height: 140px;
    }

    .profile-top {
        flex-direction: column !important;
        align-items: center;
        text-align: center;
        padding: 0 1rem 1.25rem;
        margin-top: -40px;
        max-width: 100%;
    }

    .profile-pic {
        width: 90px;
        height: 90px;
    }

    .profile-info {
        padding-top: 0.5rem;
        width: 100%;
    }

    .profile-name {
        font-size: 1.25rem;
    }

    .profile-status {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .profile-stats {
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .stat-box {
        min-width: 0;
        padding: 0.5rem 0.65rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .stat-num {
        font-size: 1rem;
    }

    .edit-profile-btn {
        position: static;
        width: 100%;
        margin-top: 0.75rem;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .box-header {
        padding: 0.875rem 1rem;
    }

    .box-header h3 {
        font-size: 0.9rem;
    }

    .box-content {
        padding: 1rem;
    }

    .box-tabs {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .box-tab {
        text-align: center;
        flex: 1;
        min-width: 0;
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }

    .profile-content-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }

    .profile-sidebar,
    .profile-main {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .profile-box {
        max-width: 100%;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .profile-banner {
        height: 110px;
    }

    .mood-selector {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   SOCIAL PAGE
   ============================================================================ */

.social-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.social-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
}

.social-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--kh-primary), var(--kh-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px var(--glow);
    margin-bottom: 0.75rem;
}

.social-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Social Filter Tabs */
.social-filter-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 20px var(--glow);
    flex-wrap: wrap;
}

.social-tab {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: transparent;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Rajdhani', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-tab .tab-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.social-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.social-tab.active {
    background: var(--kh-primary);
    border-color: var(--kh-primary);
    color: var(--bg-main);
    box-shadow: 0 0 20px var(--glow-strong);
}

/* Social Sections */
.social-section {
    margin-bottom: 3rem;
}

.social-section.hidden {
    display: none;
}

.section-header-social {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.section-header-social h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kh-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-count,
.entry-count-social,
.closet-count-social {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Users Grid */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.user-card {
    background: var(--bg-panel);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(135deg, var(--kh-primary-dark), var(--kh-primary));
    opacity: 0.3;
    transition: all 0.3s ease;
}

.user-card:hover {
    border-color: var(--kh-primary);
    box-shadow: 0 0 25px var(--glow);
    transform: translateY(-5px);
}

.user-card:hover::before {
    opacity: 0.5;
}

.user-card-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    border: 4px solid var(--kh-primary);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 0 20px var(--glow);
    position: relative;
    z-index: 1;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.user-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-card-name {
    font-family: 'Orbitron', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--kh-primary);
    margin-bottom: 0.5rem;
}

.user-card-status {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

.user-card-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.user-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.user-stat-num {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--kh-primary);
}

.user-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Entries Social Grid */
.entries-social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.entry-social-card {
    background: var(--bg-panel);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.entry-social-card:hover {
    border-color: var(--kh-primary);
    box-shadow: 0 0 20px var(--glow);
    transform: translateY(-3px);
}

.entry-social-image {
    width: 100%;
    height: 200px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    overflow: hidden;
    position: relative;
}

.entry-social-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.entry-social-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.4rem 0.8rem;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--kh-primary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--kh-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entry-social-content {
    padding: 1rem;
}

.entry-social-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.entry-social-designer {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.entry-social-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.entry-creator {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.entry-creator-icon {
    margin-right: 0.25rem;
}

.entry-tags-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.entry-tag-social {
    padding: 0.25rem 0.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Closets Social Grid */
.closets-social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.closet-social-card {
    background: var(--bg-panel);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.closet-social-card:hover {
    border-color: var(--kh-primary);
    box-shadow: 0 0 20px var(--glow);
    transform: translateY(-3px);
}

.closet-social-image {
    width: 100%;
    height: 180px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
    position: relative;
}

.closet-social-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.closet-social-category {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.3rem 0.6rem;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--kh-primary);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--kh-primary);
    text-transform: uppercase;
}

.closet-social-content {
    padding: 1rem;
}

.closet-social-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.closet-social-brand {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.closet-social-owner {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--border);
    border-top-color: var(--kh-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p {
    font-size: 1rem;
    font-weight: 600;
}

/* Empty State */
.empty-state-social {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-social .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-social .empty-text {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Responsive - Social Page */
@media (max-width: 1024px) {
    .users-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .entries-social-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .closets-social-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .social-container {
        padding: 1rem;
    }

    .social-title {
        font-size: 2rem;
    }

    .social-filter-tabs {
        flex-direction: column;
    }

    .social-tab {
        width: 100%;
    }

    .users-grid,
    .entries-social-grid,
    .closets-social-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .user-card-avatar {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .users-grid,
    .entries-social-grid,
    .closets-social-grid {
        grid-template-columns: 1fr;
    }

    .social-title {
        font-size: 1.5rem;
    }

    .section-header-social {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ============================================================================
   AI FILL BUTTON
   ============================================================================ */

.ai-fill-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.55rem 1rem;
    background: linear-gradient(135deg, rgba(42, 26, 74, 0.6) 0%, rgba(61, 32, 128, 0.6) 100%);
    border: 1px solid rgba(124, 77, 255, 0.5);
    border-radius: var(--radius-md);
    color: #c9b8ff;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.ai-fill-btn:hover:not(:disabled) {
    border-color: #7c4dff;
    background: linear-gradient(135deg, rgba(42, 26, 74, 0.9) 0%, rgba(61, 32, 128, 0.9) 100%);
    box-shadow: 0 0 16px rgba(124, 77, 255, 0.35);
    color: #e8e0ff;
}

.ai-fill-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================================
   AI STYLIST
   ============================================================================ */

.ai-stylist-fab {
    margin-top: 0;
}

.ai-stylist-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #2a1a4a 0%, #3d2080 100%);
    border: 2px solid #7c4dff;
    border-radius: var(--radius-md);
    color: #c9b8ff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 16px rgba(124, 77, 255, 0.35);
    white-space: nowrap;
}

.ai-stylist-btn:hover {
    border-color: #b39dff;
    box-shadow: 0 0 28px rgba(124, 77, 255, 0.65);
    transform: translateY(-2px);
    color: #e8e0ff;
}

.ai-btn-icon {
    font-size: 1rem;
    animation: ai-pulse 2.5s ease-in-out infinite;
}

@keyframes ai-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.85); }
}

/* Modal */
.ai-stylist-modal {
    background: var(--bg-elevated);
    border: 2px solid #7c4dff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(124, 77, 255, 0.4), 0 20px 60px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
}

.ai-stylist-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(124, 77, 255, 0.3);
}

.ai-stylist-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #c9b8ff;
    margin: 0;
}

.ai-title-icon {
    animation: ai-pulse 2.5s ease-in-out infinite;
}

.ai-stylist-form {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-closet-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(124, 77, 255, 0.1);
    border: 1px solid rgba(124, 77, 255, 0.25);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ai-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem;
    background: linear-gradient(135deg, #3d2080 0%, #7c4dff 100%);
    border: 2px solid #7c4dff;
    border-radius: var(--radius-md);
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(124, 77, 255, 0.4);
    margin-top: 0.5rem;
}

.ai-submit-btn:hover:not(:disabled) {
    box-shadow: 0 0 32px rgba(124, 77, 255, 0.7);
    transform: translateY(-1px);
}

.ai-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Result panel */
.ai-result {
    padding: 1.5rem;
    border-top: 1px solid rgba(124, 77, 255, 0.2);
}

.ai-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.ai-result-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #7c4dff;
}

.ai-try-again-btn {
    background: transparent;
    border: 1px solid rgba(124, 77, 255, 0.4);
    border-radius: var(--radius-sm);
    color: #c9b8ff;
    font-family: inherit;
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-try-again-btn:hover {
    border-color: #7c4dff;
    background: rgba(124, 77, 255, 0.1);
}

.ai-result-body {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.ai-result-body strong {
    color: #c9b8ff;
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.ai-result-body strong:first-child {
    margin-top: 0;
}

@media (max-width: 768px) {
    .ai-btn-icon {
        font-size: 1.4rem;
    }
}

/* ============================================================================
   STYLE MATCH BUTTON + MODAL
   ============================================================================ */

.style-match-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #0d2b22 0%, #14a078 100%);
    border: 2px solid #14a078;
    border-radius: var(--radius-md);
    color: #a8f0d8;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 16px rgba(20, 160, 120, 0.3);
    white-space: nowrap;
}

.style-match-btn:hover {
    border-color: #3de8b0;
    box-shadow: 0 0 28px rgba(20, 160, 120, 0.6);
    transform: translateY(-2px);
    color: #d0fff0;
}

/* Style Match Modal overrides */
.style-match-modal {
    border-color: #14a078;
    box-shadow: 0 0 40px rgba(20, 160, 120, 0.35), 0 20px 60px rgba(0,0,0,0.6);
}

.style-match-modal .modal-title { color: #a8f0d8; }

.style-match-hint {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.style-match-upload-area {
    position: relative;
    min-height: 120px;
    border: 2px dashed rgba(20, 160, 120, 0.35);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.style-match-preview {
    position: relative;
    width: 100%;
}

.style-match-preview img {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
}

.style-match-clear-img {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.style-match-upload-btn {
    background: transparent;
    border: none;
    color: rgba(20, 160, 120, 0.8);
}

/* Result item cards */
.sm-result-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(20, 160, 120, 0.05);
    border: 1px solid rgba(20, 160, 120, 0.18);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-result-card:last-child { margin-bottom: 0; }

.sm-result-card:hover {
    background: rgba(20, 160, 120, 0.12);
    border-color: rgba(20, 160, 120, 0.4);
    transform: translateX(2px);
}

.sm-card-img {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-main);
}

.sm-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sm-card-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    opacity: 0.4;
}

.sm-card-info {
    flex: 1;
    min-width: 0;
}

.sm-card-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sm-card-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0.1rem 0 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sm-card-match {
    font-size: 0.72rem;
    color: #6dbfa0;
}

.sm-card-match em {
    font-style: normal;
    color: #a8f0d8;
}

.sm-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    flex-shrink: 0;
}

.sm-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.45rem;
    border-radius: 99px;
}

.sm-badge-closet {
    background: rgba(74, 159, 216, 0.15);
    color: var(--kh-primary-light);
    border: 1px solid rgba(74, 159, 216, 0.3);
}

.sm-badge-db {
    background: rgba(124, 77, 255, 0.15);
    color: #c9b8ff;
    border: 1px solid rgba(124, 77, 255, 0.3);
}

.sm-score {
    font-size: 0.7rem;
    color: #6dbfa0;
    font-weight: 600;
}

/* Empty state */
.sm-empty {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.sm-pieces-identified {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.sm-pieces-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 100%;
    margin-bottom: 0.25rem;
}

.sm-piece-tag {
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    background: rgba(20, 160, 120, 0.1);
    border: 1px solid rgba(20, 160, 120, 0.25);
    border-radius: 99px;
    color: #a8f0d8;
}

/* ============================================================================
   MEMBERSHIP / UPGRADE MODAL
   ============================================================================ */

.upgrade-modal-dialog {
    max-width: 420px;
    width: 90%;
}

.upgrade-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 2rem 2rem;
    gap: 1rem;
}

.upgrade-icon {
    font-size: 2.5rem;
    color: var(--accent);
    line-height: 1;
}

.upgrade-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.upgrade-perks {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

.upgrade-perks li {
    font-size: 0.85rem;
    color: var(--text-primary);
    padding: 0.45rem 0.75rem;
    background: rgba(20, 160, 120, 0.07);
    border: 1px solid rgba(20, 160, 120, 0.18);
    border-radius: 8px;
}

.upgrade-cta-btn {
    position: relative;
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, #14a078, #0d7a5c);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    overflow: hidden;
    transition: opacity 0.2s;
    margin-top: 0.5rem;
}

.upgrade-cta-btn:hover { opacity: 0.88; }

.upgrade-cta-btn .btn-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.upgrade-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* Locked AI button state */
.ai-locked {
    position: relative;
    opacity: 0.65;
    cursor: pointer;
}

.ai-locked::after {
    content: '🔒';
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Admin grant membership button in user profile modal */
.admin-grant-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    background: rgba(20, 160, 120, 0.1);
    border: 1px solid rgba(20, 160, 120, 0.3);
    border-radius: 8px;
    color: #14a078;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.admin-grant-btn:hover {
    background: rgba(20, 160, 120, 0.18);
    border-color: rgba(20, 160, 120, 0.5);
}

.admin-grant-btn.revoke {
    background: rgba(220, 80, 80, 0.1);
    border-color: rgba(220, 80, 80, 0.3);
    color: #e05555;
}

.admin-grant-btn.revoke:hover {
    background: rgba(220, 80, 80, 0.18);
    border-color: rgba(220, 80, 80, 0.5);
}

.admin-controls-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.75rem 0 0;
    flex-wrap: wrap;
}

.vp-role-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(20, 160, 120, 0.12);
    border: 1px solid rgba(20, 160, 120, 0.25);
    color: #14a078;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.vp-role-badge.admin { background: rgba(180,120,255,0.12); border-color: rgba(180,120,255,0.3); color: #b47cff; }
.vp-role-badge.member, .vp-role-badge.verified { background: rgba(20,160,120,0.12); border-color: rgba(20,160,120,0.3); color: #14a078; }
.vp-role-badge.unverified, .vp-role-badge.guest { background: rgba(140,140,140,0.1); border-color: rgba(140,140,140,0.2); color: var(--text-muted); }
