/* app.css - UJ Connect CSS Design System */


/* ==========================================================================
   DESIGN TOKENS & VARIABLES
   ========================================================================== */
:root {
    /* Color Palette (Default Slate-based Light Theme) */
    --bg-dark-obsidian: #F1F5F9;
    --bg-space-slate: #FFFFFF;
    --bg-slate-light: #E2E8F0;
    
    --accent-orange: #FF6B00; /* UJ Cyber Orange remains vibrant */
    --accent-orange-glow: rgba(255, 107, 0, 0.15);
    --accent-orange-hover: #E05E00;
    
    --accent-violet: #7C3AED; /* Wallet and Games deep violet */
    --accent-violet-glow: rgba(124, 58, 237, 0.2);
    
    --accent-cyan: #0891B2; /* Library / Scholarships deep cyan */
    --accent-cyan-glow: rgba(8, 145, 178, 0.2);
    
    --accent-emerald: #059669;
    
    --text-white: #0F172A; /* Invert white/silver colors */
    --text-silver: #334155;
    --text-muted: #64748B;
    --text-dark: #FFFFFF;
    
    /* Surfaces (Glassmorphism Light Mode) */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --glass-blur: blur(16px);
    
    /* Fonts */
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Plus Jakarta Sans', sans-serif;
    
    /* System Sizes */
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 10px;
    --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Obsidian Space Theme (Body dark mode toggle class) */
body.dark-theme {
    --bg-dark-obsidian: #080B11;
    --bg-space-slate: #0E1420;
    --bg-slate-light: #161F30;
    
    --accent-orange: #FF6B00;
    --accent-orange-glow: rgba(255, 107, 0, 0.4);
    --accent-orange-hover: #E05E00;
    
    --accent-violet: #8B5CF6;
    --accent-violet-glow: rgba(139, 92, 246, 0.35);
    
    --accent-cyan: #06B6D4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.35);
    
    --accent-emerald: #10B981;
    
    --text-white: #FFFFFF;
    --text-silver: #E2E8F0;
    --text-muted: #64748B;
    --text-dark: #0F172A;
    
    --glass-bg: rgba(22, 31, 48, 0.55);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 12px 32px 0 rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   RESET & SYSTEM WRAPPER
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-primary);
}

body {
    background: var(--bg-dark-obsidian);
    color: var(--text-silver);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   GLASSMORPHISM & DECORATIONS
   ========================================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 20px;
    box-shadow: var(--glass-shadow);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* Input Fields */
.glass-input-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.glass-input-group label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.glass-input {
    background: rgba(8, 11, 17, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    color: var(--text-white);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.glass-input:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.2);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-orange), #FF8C33);
    color: var(--text-white);
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 14px 20px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-shadow: 0 6px 20px var(--accent-orange-glow);
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 3px 10px var(--accent-orange-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-silver);
    border-radius: var(--border-radius-sm);
    padding: 12px 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.btn-secondary:active {
    background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   TOAST NOTIFICATION ENGINE
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    max-width: 400px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.custom-toast {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--border-radius-sm);
    padding: 12px 18px;
    color: #0F172A;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: top center;
}

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

.custom-toast.toast-success {
    border-left: 4px solid var(--accent-emerald);
}

.custom-toast.toast-error {
    border-left: 4px solid #EF4444;
}

.custom-toast.toast-info {
    border-left: 4px solid var(--accent-orange);
}

/* ==========================================================================
   SKELETON LOADING PLACEHOLDERS
   ========================================================================== */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 14px;
    width: 80%;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    width: 55%;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--border-radius-md);
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.image-skeleton-frame {
    position: relative;
    background: var(--bg-slate-light);
}

.image-skeleton-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.08) 25%,
        rgba(255, 255, 255, 0.24) 50%,
        rgba(255, 255, 255, 0.08) 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

body.dark-theme .image-skeleton-frame::before {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.13) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
}

.image-skeleton-frame.image-loaded::before {
    opacity: 0;
    visibility: hidden;
}

.image-skeleton-frame img {
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.35s ease;
}

/* ==========================================================================
   SKELETON LOADING PLACEHOLDERS
   ========================================================================== */
@keyframes skeletonPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.skeleton-text {
    animation: skeletonPulse 1.5s ease-in-out infinite;
    color: transparent !important;
    background: var(--bg-slate-light);
    border-radius: 6px;
}

.skeleton-card {
    min-height: 176px;
    padding: 10px;
    border-radius: var(--border-radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-card-image {
    width: 100%;
    aspect-ratio: 1.35 / 1;
    border-radius: 13px;
    margin-bottom: 9px;
    background: var(--bg-slate-light);
}

.skeleton-card-line {
    height: 10px;
    border-radius: 6px;
    background: var(--bg-slate-light);
    margin-bottom: 6px;
}

.skeleton-card-line.short {
    width: 45%;
}

.skeleton-card-line.medium {
    width: 70%;
}

.skeleton-card-line.long {
    width: 90%;
}

.home-book-skeleton {
    min-height: 220px;
    padding: 10px;
    border-radius: var(--border-radius-md);
    background: linear-gradient(180deg, var(--glass-bg), rgba(255, 255, 255, 0.42));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

body.dark-theme .home-book-skeleton {
    background: linear-gradient(180deg, rgba(22, 31, 48, 0.7), rgba(8, 11, 17, 0.62));
}

.home-book-skeleton .skeleton-card-image {
    aspect-ratio: 2 / 2.55;
    border-radius: 12px;
}

.image-skeleton-frame img.is-loaded {
    opacity: 1;
}

.image-skeleton-frame .home-product-price,
.image-skeleton-frame .product-price-badge {
    z-index: 2;
}

/* ==========================================================================
   EXTRA UTILITIES & GAME STYLINGS
   ========================================================================== */
.confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1200;
}

/* ==========================================================================
   RIPPLE EFFECT ON TAP
   ========================================================================== */
.ripple-host {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0);
    animation: rippleExpand 0.5s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    0% { transform: scale(0); opacity: 0.6; }
    100% { transform: scale(4); opacity: 0; }
}

/* ==========================================================================
   LIGHT MODE INPUT OVERRIDES
   ========================================================================== */
select.glass-input {
    background-color: var(--bg-space-slate);
    color: var(--text-white);
}

body.dark-theme select.glass-input {
    background-color: #0E1420;
}

/* Light mode glass input background */
.glass-input {
    background: var(--bg-space-slate);
}

body.dark-theme .glass-input {
    background: rgba(8, 11, 17, 0.5);
}

/* Light mode glass card overlay fix */
.glass-card::before {
    background: radial-gradient(circle, rgba(0,0,0,0.01) 0%, transparent 70%);
}

body.dark-theme .glass-card::before {
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
}

/* Light mode scrollbar colors */
.chat-messages-container {
    scrollbar-color: rgba(0,0,0,0.08) transparent;
}

body.dark-theme .chat-messages-container {
    scrollbar-color: rgba(255,255,255,0.05) transparent;
}

.chat-messages-container::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.08);
}

body.dark-theme .chat-messages-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.05);
}

/* Light mode btn-primary text always white */
.btn-primary {
    color: #FFFFFF;
}

/* Light mode brand logo circle text always white */
.brand-logo-circle {
    color: #FFFFFF;
}

/* Full-screen app shell */
.phone-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-dark-obsidian);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

@media (max-width: 480px) {
    body {
        background: var(--bg-dark-obsidian);
    }
}

/* ==========================================================================
   APP HEADER & NOTIFICATION LAYOUT
   ========================================================================== */
.app-header {
    height: 70px;
    flex-shrink: 0;
    padding: 0 20px;
    background: linear-gradient(to bottom, var(--bg-dark-obsidian) 70%, transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    position: relative;
}

.app-header.page-nav-active {
    background: linear-gradient(to bottom, var(--bg-dark-obsidian) 84%, transparent);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.header-back-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: var(--glass-bg);
    color: var(--text-white);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-bounce);
    flex: 0 0 auto;
}

.header-back-btn:active {
    transform: scale(0.9);
}

.app-header.page-nav-active .header-back-btn {
    display: flex;
}

.app-header.page-nav-active .brand-logo-circle {
    display: none;
}

.brand-logo-circle {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-violet));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 14px;
    color: var(--text-white);
    box-shadow: 0 0 12px var(--accent-orange-glow);
}

.brand-title {
    font-family: var(--font-secondary);
    font-weight: 800;
    font-size: 19px;
    letter-spacing: 0;
    background: linear-gradient(to right, var(--text-white), var(--text-silver));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-title span {
    color: var(--accent-orange);
    -webkit-text-fill-color: var(--accent-orange);
}

.header-actions {
    display: flex;
    gap: 12px;
    flex: 0 0 auto;
}

.icon-btn {
    width: 36px;
    height: 36px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-silver);
    cursor: pointer;
    transition: var(--transition-bounce);
    position: relative;
}

.icon-btn:active {
    transform: scale(0.9);
}

.icon-btn .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--accent-orange);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-orange);
}

.icon-btn[aria-label="Open profile"] span {
    font-size: 0;
}

.icon-btn[aria-label="Open profile"] span::before {
    content: '\1F464';
    font-size: 17px;
    color: var(--text-silver);
}

/* ==========================================================================
   SPA PANELS SLIDER CONTAINER
   ========================================================================== */
.app-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.spa-view-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0 20px 90px 20px;
    overflow-y: auto;
    scrollbar-width: none; /* Hide scrollbar for premium iOS/Android look */
    transition: var(--transition-smooth);
    opacity: 0;
    transform: translateX(100px);
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.spa-view-panel::-webkit-scrollbar {
    display: none; /* Webkit scrollbar hidden */
}

/* Active State */
.spa-view-panel.active-view {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Prev state for sliding transitions */
.spa-view-panel.prev-view {
    transform: translateX(-100px);
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR LAYOUT & DYNAMICS
   ========================================================================== */
.app-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 12px;
    z-index: 500;
    transition: transform 0.35s cubic-bezier(0.25,0.8,0.25,1);
}

.app-nav-bar.hidden {
    transform: translateY(100%);
}

.phone-shell.chat-screen-active .app-nav-bar {
    display: none;
}

.nav-tab-item[data-view="wallet"],
.nav-tab-item[data-view="profile"] {
    display: none;
}

.nav-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    flex: 1;
    height: 100%;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-tab-icon {
    font-size: 20px;
    transition: var(--transition-bounce);
}

.nav-tab-label {
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-secondary);
    transition: var(--transition-smooth);
}

.nav-icon-img { width: 20px; height: 20px; display: block; }
.quick-icon-img { width: 24px; height: 24px; display: block; }

/* Active Nav Tab Style with floating circle indicator effect */
.nav-tab-item.active-tab {
    color: var(--accent-orange);
}

.nav-tab-item.active-tab .nav-tab-icon {
    transform: translateY(-5px) scale(1.15);
    color: var(--accent-orange);
}

.nav-tab-item::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    background: var(--accent-orange);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition-smooth);
    box-shadow: 0 0 6px var(--accent-orange);
}

.nav-tab-item.active-tab::after {
    opacity: 1;
}

/* ==========================================================================
   SPLASH / LOADING SCREEN
   ========================================================================== */
.splash-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark-obsidian);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    animation: splashPulse 2s ease-in-out infinite alternate;
}

@keyframes splashPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.03); }
}

.splash-logo {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px auto;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-violet));
    border-radius: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 0 40px rgba(255, 107, 0, 0.5), 0 0 80px rgba(139, 92, 246, 0.3);
    animation: splashLogoGlow 2.5s ease-in-out infinite alternate;
}

@keyframes splashLogoGlow {
    0% { box-shadow: 0 0 40px rgba(255, 107, 0, 0.5), 0 0 80px rgba(139, 92, 246, 0.3); }
    100% { box-shadow: 0 0 60px rgba(255, 107, 0, 0.7), 0 0 120px rgba(139, 92, 246, 0.5); }
}

.splash-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(to right, #fff, var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.splash-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-weight: 500;
}

.splash-loader {
    width: 120px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.splash-loader-bar {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-violet), var(--accent-cyan));
    border-radius: 3px;
    animation: splashBarSlide 1.2s ease-in-out infinite;
}

@keyframes splashBarSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* ==========================================================================
   AMBIENT FLOATING ORBS
   ========================================================================== */
.ambient-orb {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
    animation: orbFloat 8s ease-in-out infinite alternate;
}

@keyframes orbFloat {
    0% { transform: translateY(0) translateX(0); }
    33% { transform: translateY(-20px) translateX(10px); }
    66% { transform: translateY(10px) translateX(-15px); }
    100% { transform: translateY(-15px) translateX(5px); }
}

.orb-orange { background: var(--accent-orange); }
.orb-violet { background: var(--accent-violet); }
.orb-cyan { background: var(--accent-cyan); }

/* ==========================================================================
   DESKTOP APP LAYOUT
   ========================================================================== */
@media (min-width: 900px) {
    body {
        align-items: stretch;
        height: 100vh;
        overflow: hidden;
        justify-content: center;
    }

    .phone-shell {
        display: flex;
        flex-direction: column;
        width: 70%;
        max-width: 1400px;
        padding-left: 92px;
    }

    .app-header {
        height: auto;
        padding: 22px 34px 14px;
        background: linear-gradient(to bottom, var(--bg-dark-obsidian) 0%, rgba(255, 255, 255, 0));
        border-bottom: 1px solid var(--glass-border);
    }

    .brand-logo-circle {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 16px;
    }

    .brand-title {
        font-size: 25px;
    }

    .header-actions .icon-btn {
        width: 42px;
        height: 42px;
    }

    .app-content {
        min-width: 0;
    }

    .app-nav-bar {
        position: absolute;
        left: 0;
        right: auto;
        top: 0;
        bottom: 0;
        width: 92px;
        height: auto;
        flex-direction: column;
        justify-content: flex-start;
        gap: 8px;
        padding: 22px 12px;
        border-top: 0;
        border-right: 1px solid var(--glass-border);
        background: rgba(255, 255, 255, 0.58);
    }

    body.dark-theme .app-nav-bar {
        background: rgba(14, 20, 32, 0.72);
    }

    .nav-tab-item {
        width: 100%;
        height: 72px;
        flex: 0 0 auto;
        border-radius: 20px;
    }

    .nav-tab-item:hover {
        background: var(--glass-bg);
        color: var(--text-white);
    }

    .nav-tab-item.active-tab {
        background: linear-gradient(135deg, rgba(255, 107, 0, 0.16), rgba(124, 58, 237, 0.12));
    }

    .nav-tab-item.active-tab .nav-tab-icon {
        transform: translateY(0) scale(1.08);
    }

    .nav-tab-item::after {
        right: 6px;
        bottom: auto;
        width: 4px;
        height: 24px;
        border-radius: 999px;
    }

    .spa-view-panel {
        padding: 24px 34px 34px;
        scrollbar-width: thin;
        scrollbar-color: rgba(100, 116, 139, 0.35) transparent;
    }

    .spa-view-panel::-webkit-scrollbar {
        display: block;
        width: 8px;
    }

    .spa-view-panel::-webkit-scrollbar-thumb {
        background: rgba(100, 116, 139, 0.28);
        border-radius: 999px;
    }

    .phone-shell.chat-screen-active .app-header,
    .phone-shell.chat-screen-active .app-content {
        grid-column: 1 / -1;
    }

    .auth-overlay {
        align-items: center;
        justify-content: center;
        padding: 48px;
    }

    .auth-overlay > * {
        width: min(520px, 100%);
        position: relative;
        z-index: 2;
    }

    .auth-header {
        margin-bottom: 26px;
    }

    .auth-form.active-form {
        padding: 24px;
        border-radius: 24px;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        box-shadow: var(--glass-shadow);
    }

    #viewHome.active-view {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding-right: 34px;
    }

    #viewHome .home-carousel {
        margin-bottom: 0;
    }

    #viewHome .quick-links-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 14px;
        margin-bottom: 0;
    }

    #viewHome .quick-link-item {
        min-height: 100px;
        justify-content: center;
        border-radius: 18px;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        box-shadow: var(--glass-shadow);
    }

    #viewHome .quick-icon-circle {
        background: transparent;
        border: 0;
    }

    #viewHome .widget-checkin-banner {
        min-height: 158px;
        margin-bottom: 0;
    }

    #viewHome .home-product-grid,
    #viewHome .home-book-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
        margin-bottom: 0;
    }

    #viewHome > .section-header:not(.dashboard-section-header) {
        margin: 12px 0 -8px;
    }

    #viewHome .news-cards-list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .home-carousel-slide {
        min-height: 274px;
        padding: 30px;
    }

    .home-carousel-slide h2 {
        max-width: 620px;
        font-size: 34px;
    }

    .home-carousel-slide p {
        max-width: 560px;
        font-size: 15px;
    }

    .home-product-card,
    .home-book-card {
        min-height: 0;
    }

    .news-row-card {
        min-height: 116px;
    }

    .library-grid,
    .market-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }

    .rss-feed-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .games-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .game-card {
        min-height: 170px;
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .chat-messages-container {
        max-width: 980px;
        width: 100%;
        margin: 0 auto;
        padding-inline: 18px;
    }

    .chat-input-form {
        max-width: 980px;
        width: 100%;
        margin-inline: auto;
    }

    .profile-card {
        min-height: 320px;
        margin-bottom: 0;
    }

    .profile-edit-card {
        margin-bottom: 0;
    }

    .book-detail-page,
    .product-detail-page {
        display: grid;
        grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
        gap: 24px;
        align-items: start;
        max-width: 1120px;
        margin: 0 auto;
    }

    .book-detail-cover {
        max-width: none;
        margin: 0;
    }

    .product-detail-image {
        aspect-ratio: 1 / 0.86;
    }

    .book-detail-content,
    .product-detail-content {
        padding: 28px;
    }

    .phone-shell.standalone-detail-body {
        display: flex;
        flex-direction: column;
    }
}

@media (min-width: 1200px) {
    .library-grid,
    .market-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .rss-feed-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==========================================================================
   AUTHENTICATION OVERLAY
   ========================================================================== */
.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark-obsidian);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    transition: var(--transition-smooth);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-violet));
    border-radius: 22px;
    margin: 0 auto 15px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    color: var(--text-white);
    font-weight: 800;
    box-shadow: 0 0 25px rgba(255, 107, 0, 0.5);
    transform: rotate(-10deg);
    animation: authLogoFloat 4s ease-in-out infinite alternate;
}

@keyframes authLogoFloat {
    0% { transform: translateY(0) rotate(-10deg); }
    100% { transform: translateY(-8px) rotate(5deg); }
}

.auth-header h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

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

.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 24px;
}

.auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.auth-tab-btn.active {
    background: var(--glass-bg);
    color: var(--text-white);
    border: 1px solid var(--glass-border);
}

.auth-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-form.active-form {
    display: block;
}

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

/* ==========================================================================
   AUTH OVERLAY BACKGROUND DECORATION
   ========================================================================== */
.auth-overlay::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.auth-overlay::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   MODULE: HOME (DASHBOARD) VIEW
   ========================================================================== */
.home-carousel {
    position: relative;
    margin-bottom: 24px;
}

.home-carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-radius: var(--border-radius-lg);
}

.home-carousel-track::-webkit-scrollbar {
    display: none;
}

.home-carousel-slide {
    min-height: 196px;
    padding: 24px;
    position: relative;
    scroll-snap-align: start;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius-lg);
    color: #FFFFFF;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
}

.home-carousel-slide::before {
    content: '';
    position: absolute;
    inset: auto -70px -90px auto;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    pointer-events: none;
}

.carousel-orange {
    background: linear-gradient(135deg, #FF6B00, #7C3AED);
}

.carousel-violet {
    background: linear-gradient(135deg, #5B21B6, #0891B2);
}

.carousel-cyan {
    background: linear-gradient(135deg, #0E7490, #059669);
}

.carousel-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 10px;
}

.home-carousel-slide h2 {
    max-width: 280px;
    font-size: 26px;
    line-height: 1.02;
    font-weight: 800;
    margin-bottom: 8px;
}

.home-carousel-slide p {
    max-width: 300px;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
}

.carousel-meta-row {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.76);
}

.carousel-meta-row strong {
    color: #FFFFFF;
    font-size: 13px;
}

.carousel-action-btn {
    position: absolute;
    left: 24px;
    bottom: 22px;
    border: 0;
    border-radius: 999px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    font-weight: 800;
    cursor: pointer;
}

.home-carousel-dots {
    position: absolute;
    right: 18px;
    bottom: 16px;
    display: flex;
    gap: 6px;
}

.home-carousel-dots button {
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.home-carousel-dots button.active {
    width: 20px;
    border-radius: 999px;
    background: #FFFFFF;
}

.student-card {
    display: none;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.15), rgba(139, 92, 246, 0.15));
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    position: relative;
    margin-bottom: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.student-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.student-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.std-title {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--accent-orange);
}

.std-num {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
}

.student-card-body h3 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.student-card-body p {
    font-size: 13px;
    color: var(--text-muted);
}

.student-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 24px;
}

.coin-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coin-chip img, .coin-chip .coin-icon {
    font-size: 18px;
}

.coin-balance-val {
    font-weight: 800;
    font-size: 16px;
    color: #FFD700; /* Gold */
}

/* Home Quick Links Grid */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.quick-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: transparent;
}

.quick-icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-silver);
    font-size: 20px;
    transition: var(--transition-bounce);
}

.quick-link-item:hover .quick-icon-circle {
    transform: translateY(-4px);
    background: var(--bg-slate-light);
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    box-shadow: 0 8px 15px rgba(255, 107, 0, 0.2);
}

.quick-link-item span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-silver);
    text-align: center;
}

/* Dashboard Check-in Banner Widget */
.widget-checkin-banner {
    position: relative;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    align-items: center;
    min-height: 116px;
    margin-bottom: 24px;
    padding: 22px 18px 18px;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 107, 0, 0.18), rgba(124, 58, 237, 0.16) 46%, rgba(8, 145, 178, 0.18)),
        var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.widget-checkin-banner.checkin-completed-hidden {
    display: none;
}

.checkin-glow-orbit {
    position: absolute;
    right: -44px;
    top: -64px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.45), transparent 64%);
    pointer-events: none;
}

.checkin-icon-box {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--accent-violet);
    font-size: 24px;
    box-shadow: 0 10px 22px rgba(124, 58, 237, 0.16);
}

.checkin-banner-left {
    position: relative;
    flex: 1;
    min-width: 0;
}

.checkin-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--accent-orange);
    font-size: 10px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.checkin-banner-left h4 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 3px;
}

.checkin-banner-left p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.35;
    max-width: 190px;
}

.checkin-progress-track {
    width: 100%;
    max-width: 170px;
    height: 7px;
    margin-top: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.09);
}

.checkin-progress-track span {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-violet));
}

.btn-checkin-claim {
    position: relative;
    background: linear-gradient(135deg, var(--accent-violet), #A78BFA);
    box-shadow: 0 4px 15px var(--accent-violet-glow);
    padding: 10px 14px;
    font-size: 13px;
    border-radius: var(--border-radius-sm);
    width: auto;
    min-width: 78px;
    white-space: nowrap;
}

.btn-checkin-claim:active {
    box-shadow: 0 2px 5px var(--accent-violet-glow);
}

.dashboard-section-header {
    margin-top: 2px;
}

.home-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.home-product-card {
    min-height: 176px;
    padding: 10px;
    border-radius: var(--border-radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: var(--glass-shadow);
}

.home-product-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-orange);
    box-shadow: 0 12px 28px rgba(15,23,42,0.12), 0 4px 10px rgba(15,23,42,0.08);
}
body.dark-theme .home-product-card:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

.home-product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1.35 / 1;
    overflow: hidden;
    border-radius: 13px;
    margin-bottom: 9px;
    background: var(--bg-slate-light);
    border: 1px solid rgba(15,23,42,0.04);
}

.home-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s cubic-bezier(0.25,0.8,0.25,1);
}
.home-product-card:hover .home-product-image img {
    transform: scale(1.05);
}
.home-product-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
    pointer-events: none;
}

.home-product-price {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #FFD700;
    font-size: 10px;
    font-weight: 800;
}

.home-product-card h4 {
    color: var(--text-white);
    font-size: 12px;
    line-height: 1.25;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-product-card span {
    color: var(--accent-orange);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

/* Campus Feed Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.3px;
    position: relative;
    padding-bottom: 5px;
}
.section-header h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 28px;
    height: 3px;
    background: var(--accent-orange);
    border-radius: 999px;
}

.section-header .see-all {
    font-size: 12px;
    color: var(--accent-orange);
    font-weight: 700;
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(15,23,42,0.08);
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(15,23,42,0.06);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.section-header .see-all::after {
    content: '→';
    font-size: 12px;
    transition: transform 0.2s ease;
}
.section-header .see-all:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 4px 12px rgba(255,107,0,0.15);
    transform: translateY(-1px);
}
.section-header .see-all:hover::after {
    transform: translateX(2px);
}
body.dark-theme .section-header .see-all {
    background: var(--bg-space-slate);
    border-color: var(--glass-border);
    box-shadow: none;
}

/* News Cards list */
.news-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.news-row-card {
    display: flex;
    gap: 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.news-row-card:hover {
    background: var(--bg-slate-light);
    border-color: rgba(255, 255, 255, 0.15);
}

.news-row-image {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    flex: 0 0 80px;
}

.news-row-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-row-category {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 0.5px;
}

.news-row-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-row-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.rss-feed-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding-bottom: 22px;
}

.rss-feed-card {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 13px;
    padding: 14px;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    cursor: pointer;
    transition: var(--transition-bounce);
}

.rss-feed-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-orange);
}

.rss-feed-visual {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    object-fit: cover;
    align-self: stretch;
}

.rss-visual-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 0, 0.12);
    color: var(--accent-orange);
    font-size: 22px;
}

.rss-scholarship .rss-visual-fallback {
    background: rgba(16, 185, 129, 0.12);
    color: #10B981;
}

.rss-feed-content {
    min-width: 0;
}

.rss-feed-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.rss-feed-card h4 {
    color: var(--text-white);
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 6px;
}

.rss-feed-card p {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   ENHANCED QUICK LINK ITEMS (BOUNCE ON TAP)
   ========================================================================== */
.quick-link-item:active .quick-icon-circle {
    transform: scale(0.88);
    transition: transform 0.1s ease;
}

/* ==========================================================================
   COIN BALANCE GLOW ON UPDATE
   ========================================================================== */
@keyframes coinGlow {
    0% { text-shadow: none; }
    50% { text-shadow: 0 0 12px rgba(255, 215, 0, 0.8); }
    100% { text-shadow: none; }
}

.coin-balance-val.updated {
    animation: coinGlow 1s ease;
}

/* ==========================================================================
   MODULE: E-LIBRARY VIEW
   ========================================================================== */
.search-bar-container {
    margin-bottom: 16px;
    position: relative;
}

.search-input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

.search-bar-input {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 14px 16px 14px 44px;
    color: var(--text-white);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.search-bar-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Category Filter Capsules Scrollable Row */
.filter-capsules-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 20px;
    padding-bottom: 4px;
}

.filter-capsules-row::-webkit-scrollbar {
    display: none;
}

.filter-capsule {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.filter-capsule.active {
    background: var(--accent-cyan);
    color: var(--text-white);
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 12px var(--accent-cyan-glow);
}

/* Library Grid */
.library-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.book-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.book-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.15);
}

.book-cover-container {
    width: 100%;
    aspect-ratio: 2.2 / 3;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.book-card:hover .book-cover {
    transform: scale(1.05);
}

.book-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-tag {
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--accent-cyan);
    margin-bottom: 4px;
}

.book-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.home-book-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.home-book-card {
    position: relative;
    min-height: 220px;
    padding: 10px;
    border-radius: var(--border-radius-md);
    background: linear-gradient(180deg, var(--glass-bg), rgba(255, 255, 255, 0.42));
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: var(--glass-shadow);
}

body.dark-theme .home-book-card {
    background: linear-gradient(180deg, rgba(22, 31, 48, 0.7), rgba(8, 11, 17, 0.62));
}

.home-book-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.15);
}

.home-book-cover {
    width: 100%;
    aspect-ratio: 2 / 2.55;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 9px;
    background: var(--bg-slate-light);
    position: relative;
}

.home-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-book-card span {
    color: var(--accent-cyan);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.home-book-card h4 {
    margin-top: 4px;
    color: var(--text-white);
    font-size: 12px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-book-card p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-book-free-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.9);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

/* ==========================================================================
   MODULE: MARKETPLACE VIEW
   ========================================================================== */
.market-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.product-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-orange);
    box-shadow: 0 8px 20px var(--accent-orange-glow);
}

.product-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    background: #000;
}

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

.product-price-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(8, 11, 17, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFD700;
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    font-weight: 800;
    font-size: 12px;
}

.product-details {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-cat {
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-orange);
    margin-bottom: 4px;
}

.product-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.product-seller {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-muted);
}

.product-seller-avatar {
    width: 16px;
    height: 16px;
    background: var(--bg-slate-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 8px;
    color: var(--text-white);
    font-weight: 700;
}

/* Post Item Floating Action Button */
.floating-fab {
    position: absolute;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-orange), #FF8D3B);
    color: var(--text-white);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    box-shadow: 0 8px 25px var(--accent-orange-glow);
    cursor: pointer;
    z-index: 90;
    border: none;
    transition: var(--transition-bounce);
}

.floating-fab:active {
    transform: scale(0.9) rotate(90deg);
}

/* ==========================================================================
   ENHANCED PRODUCT CARD IMAGE HOVER ZOOM
   ========================================================================== */
.product-card:hover .product-img {
    transform: scale(1.08);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.product-img {
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   MODULE: WALLET VIEW
   ========================================================================== */
.wallet-carousel {
    position: relative;
    margin-bottom: 14px;
}

.wallet-carousel::before {
    content: '';
    position: absolute;
    inset: 16px 10px auto;
    height: 72px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 107, 0, 0.22), rgba(124, 58, 237, 0.22), rgba(8, 145, 178, 0.22));
    filter: blur(24px);
    opacity: 0.75;
    pointer-events: none;
    animation: walletAuraFloat 4s ease-in-out infinite alternate;
}

.wallet-carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-radius: var(--border-radius-lg);
}

.wallet-carousel-track::-webkit-scrollbar {
    display: none;
}

.wallet-carousel .wallet-card {
    min-height: 210px;
    margin-bottom: 0;
    scroll-snap-align: start;
    transform: translateZ(0);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.wallet-carousel .wallet-card:active {
    transform: scale(0.985);
}

.wallet-card {
    background: linear-gradient(135deg, #1E1B4B 0%, #311042 50%, #030712 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.wallet-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.18) 42%, transparent 62%);
    transform: translateX(-115%);
    animation: walletCardSweep 5.5s ease-in-out infinite;
    pointer-events: none;
}

.wallet-card-naira {
    background: linear-gradient(135deg, #064E3B 0%, #0F766E 42%, #111827 100%);
    background-size: 240% 240%;
    animation: walletNairaShift 9s ease-in-out infinite;
}

.wallet-card-coins {
    background: linear-gradient(135deg, #1E1B4B 0%, #311042 50%, #030712 100%);
    background-size: 300% 300%;
    animation: walletGradientShift 8s ease-in-out infinite;
}

.wallet-card::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.wallet-card-coins::after {
    width: 190px;
    height: 190px;
    background:
        radial-gradient(circle, rgba(255, 215, 0, 0.28) 0%, transparent 60%),
        radial-gradient(circle at 70% 20%, rgba(124, 58, 237, 0.28), transparent 58%);
    animation: walletCoinOrb 4.5s ease-in-out infinite alternate;
}

.wallet-balance-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #A78BFA;
    font-weight: 600;
    margin-bottom: 6px;
}

.wallet-balance-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.wallet-balance-num {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #FFFFFF;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.wallet-card-coins .wallet-balance-num {
    color: #FFD700;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.42), 0 3px 12px rgba(0, 0, 0, 0.45);
}

.wallet-card-coins .coin-balance-val.counting {
    animation: walletCoinCountPulse 0.65s ease-in-out infinite alternate;
}

.wallet-coin-symbol {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border: 2px solid #F59E0B;
    background:
        radial-gradient(circle at 32% 24%, #FFF7AD 0%, #FFE66D 22%, #FBBF24 48%, #B45309 100%);
    box-shadow:
        0 0 18px rgba(255, 215, 0, 0.48),
        inset 0 3px 8px rgba(255, 255, 255, 0.48),
        inset 0 -5px 8px rgba(120, 53, 15, 0.42);
    animation: walletCoinSpin 2.6s linear infinite, walletCoinBob 1.8s ease-in-out infinite alternate;
    transform-style: preserve-3d;
}

.wallet-coin-symbol::before {
    content: 'UJ';
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(120, 53, 15, 0.36);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7C2D12;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(245, 158, 11, 0.18));
}

.wallet-coin-symbol::after {
    content: '';
    position: absolute;
    inset: 7px auto auto 9px;
    width: 8px;
    height: 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transform: rotate(35deg);
}

.wallet-card-meta {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 700;
}

.wallet-card-meta strong {
    color: #FFFFFF;
    font-size: 13px;
}

.wallet-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 12px;
}

.wallet-carousel-dots button {
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.45);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.wallet-carousel-dots button.active {
    width: 22px;
    background: var(--accent-violet);
}

.wallet-deposit-btn {
    width: 100%;
    margin-bottom: 24px;
    border: 0;
    border-radius: 16px;
    padding: 15px 18px;
    background: linear-gradient(135deg, var(--accent-orange), #F97316);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 10px 24px var(--accent-orange-glow);
    transition: var(--transition-bounce);
}

.wallet-deposit-btn:active {
    transform: scale(0.97);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes walletAuraFloat {
    from { transform: translateY(0) scaleX(0.92); opacity: 0.5; }
    to { transform: translateY(18px) scaleX(1.04); opacity: 0.9; }
}

@keyframes walletCardSweep {
    0%, 46% { transform: translateX(-115%); }
    66%, 100% { transform: translateX(115%); }
}

@keyframes walletNairaShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes walletCoinOrb {
    from { transform: translate3d(0, 0, 0) scale(0.95); opacity: 0.75; }
    to { transform: translate3d(28px, -18px, 0) scale(1.08); opacity: 1; }
}

@keyframes walletCoinSpin {
    from { rotate: 0deg; }
    to { rotate: 360deg; }
}

@keyframes walletCoinBob {
    from { translate: 0 0; }
    to { translate: 0 -7px; }
}

@keyframes walletCoinCountPulse {
    from { transform: scale(1); filter: brightness(1); }
    to { transform: scale(1.055); filter: brightness(1.22); }
}

.wallet-actions-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.wallet-action-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
    color: #FFFFFF;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.wallet-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #8B5CF6;
    box-shadow: 0 4px 12px var(--accent-violet-glow);
}

.wallet-action-btn:active {
    transform: scale(0.96);
}

/* Dynamic counter chart */
.expenditure-summary {
    display: flex;
    align-items: center;
    gap: 20px;
}

.circle-progress-container {
    width: 65px;
    height: 65px;
    position: relative;
}

.circle-progress-svg {
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 6;
}

.circle-progress {
    fill: none;
    stroke: var(--accent-violet);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 35;
    transition: stroke-dashoffset 1s ease;
}

/* History logs list */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
}

.tx-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tx-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
}

.tx-icon-wrapper.credit {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
}

.tx-icon-wrapper.debit {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.tx-details h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 2px;
}

.tx-details p {
    font-size: 10px;
    color: var(--text-muted);
}

.tx-amount {
    font-weight: 800;
    font-size: 13px;
}

.tx-amount.credit {
    color: var(--accent-emerald);
}

.tx-amount.debit {
    color: #EF4444;
}
/* ==========================================================================
   ANIMATED WALLET CARD GRADIENT
   ========================================================================== */
.wallet-card {
    background: linear-gradient(135deg, #1E1B4B 0%, #311042 30%, #1a0a2e 60%, #0c1929 100%);
    background-size: 300% 300%;
    animation: walletGradientShift 8s ease-in-out infinite;
}

@keyframes walletGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==========================================================================
   MODULE: GAMES ARCADE VIEW
   ========================================================================== */
.games-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.game-card {
    background: linear-gradient(135deg, rgba(8, 11, 17, 0.9) 0%, rgba(22, 31, 48, 0.6) 100%);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-bounce);
}

.game-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
}

.game-card.game-orange::after { background: var(--accent-orange); }
.game-card.game-violet::after { background: var(--accent-violet); }
.game-card.game-cyan::after { background: var(--accent-cyan); }

.game-card:hover {
    transform: scale(1.02);
    border-color: rgba(255,255,255,0.2);
}

.game-icon-box {
    width: 72px;
    height: 72px;
    border-radius: var(--border-radius-md);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 34px;
}

.game-card.game-orange:hover .game-icon-box {
    border-color: var(--accent-orange);
    box-shadow: 0 0 15px var(--accent-orange-glow);
}

.game-card.game-violet:hover .game-icon-box {
    border-color: var(--accent-violet);
    box-shadow: 0 0 15px var(--accent-violet-glow);
}

.game-card.game-cyan:hover .game-icon-box {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.game-desc {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 2px;
}

.game-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.game-play-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.game-orange .game-play-tag { color: var(--accent-orange); }
.game-violet .game-play-tag { color: var(--accent-violet); }
.game-cyan .game-play-tag { color: var(--accent-cyan); }

.arcade-viewport-frame {
    width: 100%;
    height: 600px;
    background: #000;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
    border: 2px solid var(--glass-border);
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-card:hover .game-play-tag {
    animation: nudgeRight 0.6s ease infinite;
}

@keyframes nudgeRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

/* ==========================================================================
   CHATS HUB & CONVERSATION VISUAL SYSTEM
   ========================================================================== */

/* Segmented Control slider container */
.chats-segment-control {
    display: none;
    background: var(--bg-slate-light);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 4px;
    position: relative;
    margin-bottom: 16px;
    height: 48px;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}



.campus-chat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 20px;
}

.campus-group-row {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 12px;
    align-items: center;
    min-height: 74px;
    padding: 12px;
    border-radius: 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.campus-group-row:hover {
    transform: translateY(-2px);
    border-color: var(--accent-cyan);
    background: var(--bg-slate-light);
}

.campus-group-avatar,
.campus-room-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 900;
    font-size: 16px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    box-shadow: 0 8px 20px var(--accent-cyan-glow);
}

.campus-group-main {
    min-width: 0;
}

.campus-group-title-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.campus-group-title-row h4 {
    color: var(--text-white);
    font-size: 14px;
    font-weight: 800;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.campus-group-time {
    color: var(--text-muted);
    font-size: 10px;
    white-space: nowrap;
}

.campus-group-preview {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.25;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.campus-group-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.campus-group-unread {
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--accent-orange);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
}

.campus-group-members {
    color: var(--text-muted);
    font-size: 10px;
    white-space: nowrap;
}

.campus-chat-room {
    display: none;
    min-height: 100%;
    flex-direction: column;
}

.campus-chat-room.active {
    display: flex;
}

.campus-chat-list.room-open {
    display: none;
}

.campus-room-header {
    display: grid;
    grid-template-columns: 38px 46px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px 0 14px;
}

.campus-room-back {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--glass-bg);
    color: var(--text-white);
    font-size: 18px;
    cursor: pointer;
}

.campus-room-avatar {
    width: 46px;
    height: 46px;
    font-size: 14px;
}

.campus-room-header h4 {
    color: var(--text-white);
    font-size: 15px;
    font-weight: 800;
}

.campus-room-header p {
    color: var(--text-muted);
    font-size: 11px;
}

.segment-btn {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    z-index: 2;
    transition: var(--transition-bounce);
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.segment-btn.active {
    color: var(--text-white);
}

.segment-slider-bar {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 26px;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}



/* Chat viewports slider toggler */
.chat-viewport {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.chat-viewport.active-viewport {
    display: flex;
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px 6px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.05) transparent;
}

.chat-messages-container::-webkit-scrollbar {
    width: 4px;
}

.chat-messages-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

/* Chat bubble aesthetics */
.chat-bubble {
    max-width: 82%;
    padding: 13px 16px 11px;
    border-radius: 22px;
    position: relative;
    animation: bubblePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
    word-wrap: break-word;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    cursor: pointer;
    outline: none;
}

.chat-bubble:hover,
.chat-bubble:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.chat-bubble::before {
    content: '';
    position: absolute;
    bottom: 0;
    width: 14px;
    height: 14px;
    background: inherit;
}

.chat-bubble.bot::before,
.chat-bubble.student::before {
    left: -3px;
    border-bottom-right-radius: 14px;
}

.chat-bubble.user::before {
    right: -3px;
    border-bottom-left-radius: 14px;
}

@keyframes bubblePop {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(15px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Sender & Timestamp */
.chat-bubble-sender {
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 4px;
    text-transform: capitalize;
    letter-spacing: 0;
}

.chat-bubble-content {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-silver);
}

.chat-bubble-time {
    font-size: 9px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 5px;
}

.chat-bubble-reaction {
    position: absolute;
    top: -9px;
    width: 24px;
    height: 24px;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: var(--bg-space-slate);
    color: var(--accent-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    opacity: 0;
    transform: scale(0.82);
    transition: var(--transition-bounce);
    pointer-events: none;
    box-shadow: var(--glass-shadow);
}

.chat-bubble.bot .chat-bubble-reaction,
.chat-bubble.student .chat-bubble-reaction {
    right: -8px;
}

.chat-bubble.user .chat-bubble-reaction {
    left: -8px;
}

.chat-bubble:hover .chat-bubble-reaction,
.chat-bubble:focus-visible .chat-bubble-reaction,
.chat-bubble.bubble-reacted .chat-bubble-reaction {
    opacity: 1;
    transform: scale(1);
}

.chat-bubble.bubble-reacted .chat-bubble-reaction {
    content: '';
    background: var(--accent-orange);
    color: #FFFFFF;
}

.chat-bubble.bubble-reacted .chat-bubble-reaction::before {
    content: '✓';
}

.chat-bubble.bubble-reacted .chat-bubble-reaction {
    font-size: 0;
}

.chat-bubble.bubble-reacted {
    border-color: rgba(255, 107, 0, 0.38);
}

/* Theme variations */
.chat-bubble.bot {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.13), var(--glass-bg));
    border: 1px solid rgba(8, 145, 178, 0.22);
    align-self: flex-start;
    border-bottom-left-radius: 8px;
}

.chat-bubble.bot .chat-bubble-sender {
    color: var(--accent-cyan);
}

.chat-bubble.user {
    background: linear-gradient(135deg, var(--accent-orange), #F97316 52%, var(--accent-violet));
    align-self: flex-end;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom-right-radius: 8px;
    box-shadow: 0 10px 24px var(--accent-orange-glow);
}

.chat-bubble.user .chat-bubble-sender {
    color: var(--text-dark);
    display: none; /* User avatar/initial already context-clear */
}

.chat-bubble.user .chat-bubble-content {
    color: #FFFFFF; /* High contrast reading on orange */
}

.chat-bubble.user .chat-bubble-time {
    color: rgba(255,255,255,0.7);
}

.chat-bubble.student {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), var(--glass-bg));
    border: 1px solid rgba(124, 58, 237, 0.22);
    align-self: flex-start;
    border-bottom-left-radius: 8px;
}

.chat-bubble.student .chat-bubble-sender {
    color: var(--accent-violet);
    display: flex;
    justify-content: space-between;
}

.chat-bubble-major {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: fit-content;
    margin: 8px 0;
    align-self: flex-start;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1.1); opacity: 1; }
}

/* Input Form Controls */
.chat-input-form {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 6px;
    align-items: center;
    box-shadow: var(--glass-shadow);
}

.chat-input-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-white);
    font-size: 14px;
    padding: 8px 12px;
}

.chat-input-field::placeholder {
    color: var(--text-muted);
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-hover));
    color: #FFFFFF;
    border: none;
    outline: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--accent-orange-glow);
    transition: var(--transition-bounce);
}

.chat-send-btn:active {
    transform: scale(0.9);
}

.chat-send-btn svg {
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.chat-send-btn:hover svg {
    transform: translate(1px, -1px);
}

/* ==========================================================================
   STUDENT PROFILE VIEWS
   ========================================================================== */

.profile-card {
    position: relative;
    overflow: hidden;
    min-height: 245px;
    padding: 24px 20px 20px;
    margin-bottom: 18px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background:
        radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.28), transparent 28%),
        linear-gradient(135deg, #FF6B00 0%, #7C3AED 48%, #0891B2 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
    color: #FFFFFF;
}

.profile-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.18) 48%, transparent 64%);
    transform: translateX(-120%);
    animation: profileCardSweep 6s ease-in-out infinite;
    pointer-events: none;
}

.profile-card-orbit {
    position: absolute;
    right: -80px;
    bottom: -80px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    border: 32px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.profile-status-pill {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    z-index: 2;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
    margin: 26px 0 26px;
}

.profile-avatar-large {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.42);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    font-weight: 900;
    color: #FFFFFF;
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
    backdrop-filter: blur(10px);
}

.profile-meta {
    min-width: 0;
    max-width: 220px;
}

.profile-meta h3 {
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
    color: #FFFFFF;
    margin-bottom: 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.profile-meta p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.74);
    margin-bottom: 8px;
}

.major-badge {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #FFFFFF;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stats grid */
.profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.profile-stat-box {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    padding: 13px 12px;
    text-align: left;
    transition: var(--transition-bounce);
    backdrop-filter: blur(10px);
}

.profile-stat-box:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.22);
}

.stat-icon {
    font-size: 18px;
    display: block;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 16px;
    font-weight: 900;
    color: #FFFFFF;
}

.stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.68);
    text-transform: uppercase;
    font-weight: 800;
    margin-top: 2px;
}

/* Premium Obsidian Switcher Slider */
.theme-switcher-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.09), var(--glass-bg));
    box-shadow: var(--glass-shadow);
}

.theme-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 2px;
}

.theme-info p {
    font-size: 11px;
    color: var(--text-muted);
}

.theme-toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.theme-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #E2E8F0;
    transition: .4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    border-radius: 34px;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 6px;
    overflow: hidden;
}

body.dark-theme .theme-toggle-slider {
    background-color: var(--bg-slate-light);
    border-color: var(--glass-border);
}

.theme-toggle-slider::before {
    content: "";
    position: absolute;
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: #FFFFFF;
    transition: .4s cubic-bezier(0.25, 0.8, 0.25, 1.25);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 2;
}

body.dark-theme .theme-toggle-slider::before {
    background-color: #0E1420;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.theme-toggle-switch input:checked + .theme-toggle-slider::before {
    transform: translateX(28px);
}

.slider-icon {
    font-size: 13px;
    z-index: 1;
    user-select: none;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.slider-icon.sun {
    opacity: 1;
    transform: scale(1);
}

.slider-icon.moon {
    opacity: 0.4;
    transform: scale(0.8);
}

body.dark-theme .slider-icon.sun {
    opacity: 0.4;
    transform: scale(0.8);
}

body.dark-theme .slider-icon.moon {
    opacity: 1;
    transform: scale(1);
}

/* Edit profile form customizations */
.profile-edit-card {
    padding: 22px 20px;
    border-radius: 22px;
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
}

.profile-form-heading {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 18px;
}

.profile-form-heading h4 {
    color: var(--text-white);
    font-size: 16px;
    font-weight: 900;
}

.profile-form-heading span {
    color: var(--text-muted);
    font-size: 12px;
}

.profile-edit-card .glass-input-group {
    margin-bottom: 14px;
}

.profile-edit-card .glass-input {
    border-radius: 15px;
    padding: 14px 15px;
}

.profile-edit-card .btn-primary {
    border-radius: 16px;
    margin-top: 4px;
    box-shadow: 0 10px 22px var(--accent-orange-glow);
}

.profile-edit-card select.glass-input {
    background-color: var(--bg-dark-obsidian) !important;
    color: var(--text-white) !important;
}

/* ==========================================================================
   DEDICATED BOOK / PRODUCT DETAIL PAGES
   ========================================================================== */
.detail-page-shell {
    width: 100%;
    padding-bottom: 24px;
}

.book-detail-page,
.product-detail-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.book-detail-cover,
.product-detail-image {
    width: 100%;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.book-detail-cover {
    max-width: 260px;
    aspect-ratio: 2 / 2.8;
    margin: 0 auto;
}

.product-detail-image {
    aspect-ratio: 1.25 / 1;
}

.book-detail-cover img,
.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-detail-content,
.product-detail-content {
    padding: 18px;
    border-radius: 22px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.detail-kicker {
    display: inline-block;
    color: var(--accent-orange);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.book-detail-content .detail-kicker {
    color: var(--accent-cyan);
}

.book-detail-content h2,
.product-detail-content h2 {
    color: var(--text-white);
    font-size: 24px;
    line-height: 1.12;
    margin-bottom: 8px;
}

.detail-subtitle,
.product-detail-content > p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 16px;
}

.detail-price {
    color: #B77900;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 14px;
}

body.dark-theme .detail-price {
    color: #FFD700;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 18px 0;
}

.detail-meta-grid div,
.detail-seller-card {
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid var(--glass-border);
}

body.dark-theme .detail-meta-grid div,
body.dark-theme .detail-seller-card {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-theme .custom-toast {
    background: rgba(22,31,48,0.95);
    border-color: rgba(255,255,255,0.12);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.detail-meta-grid span,
.detail-seller-card span {
    display: block;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.detail-meta-grid strong,
.detail-seller-card strong {
    color: var(--text-white);
    font-size: 13px;
}

.detail-reader-copy h3 {
    color: var(--text-white);
    font-size: 16px;
    margin-bottom: 10px;
}

.detail-reader-copy p {
    color: var(--text-silver);
    font-size: 13px;
    line-height: 1.65;
    margin-bottom: 13px;
}

.detail-end-note {
    color: var(--accent-cyan) !important;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
}

.detail-seller-card {
    margin-bottom: 16px;
}

.detail-seller-card p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 12px;
}

.standalone-detail-body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow: auto;
    align-items: flex-start;
    padding: 24px;
}

.standalone-detail-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.standalone-detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.standalone-detail-nav span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.standalone-back-link {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 800;
}

.standalone-detail-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 22px;
    align-items: start;
}

.standalone-media-card,
.standalone-info-card,
.standalone-empty-state {
    border-radius: 26px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.standalone-media-card {
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.book-standalone-body .standalone-media-card {
    aspect-ratio: 2 / 2.75;
}

.standalone-media-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.standalone-info-card {
    padding: 28px;
}

.standalone-info-card h1,
.standalone-empty-state h1 {
    color: var(--text-white);
    font-size: 32px;
    line-height: 1.1;
    margin-bottom: 10px;
}

.standalone-empty-state {
    padding: 32px;
    text-align: center;
}

.standalone-empty-state p,
.standalone-helper-text {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 12px;
}

@media (max-width: 760px) {
    .standalone-detail-body {
        padding: 14px;
    }

    .standalone-detail-grid {
        grid-template-columns: 1fr;
    }

    .standalone-info-card h1,
    .standalone-empty-state h1 {
        font-size: 25px;
    }
}

/* ==========================================================================
   FAKE ANDROID STATUS BAR
   ========================================================================== */
.status-bar {
    height: 28px;
    padding: 4px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-dark-obsidian);
    z-index: 900;
    position: relative;
}

.status-bar-icons {
    display: flex;
    gap: 6px;
    font-size: 10px;
}

@media (max-width: 480px) {
    .status-bar {
        display: none;
    }
}

/* ==========================================================================
   BOTTOM SHEET DRAG HANDLE
   ========================================================================== */
.drag-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    margin: 0 auto 16px auto;
}

/* ==========================================================================
   APP INSTALL BANNER
   ========================================================================== */



