/* ========================================
   NS Studio â€” Premium Modern Design v3.0
   Neo-Swift | Professional Dark Theme
   ======================================== */

/* ===== CSS Variables - Extended Palette ===== */
:root {
    /* Primary Colors */
    --primary-50: #f0f4ff;
    --primary-100: #e0e9ff;
    --primary-200: #c7d6fe;
    --primary-300: #a4bbfd;
    --primary-400: #8095fb;
    --primary-500: #667eea;
    --primary-600: #5a6fd6;
    --primary-700: #4a5bb8;
    --primary-800: #3e4d9e;
    --primary-900: #334084;
    
    /* Accent Colors */
    --accent-cyan: #00d2ff;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --gradient-gold: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    --gradient-cyber: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    
    /* Surface Colors */
    --surface-1: #0a0a12;
    --surface-2: #12121f;
    --surface-3: #1a1a2e;
    --surface-4: #22223a;
    --surface-5: #2a2a46;
    
    /* Glass Effects */
    --glass-bg: rgba(18, 18, 31, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.35);
    
    /* Border & Shadow */
    --border-subtle: 1px solid rgba(255, 255, 255, 0.06);
    --border-medium: 1px solid rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.3);
    
    /* Spacing */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-2xl: 36px;
    --radius-full: 9999px;
    
    /* Animation */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Layout */
    --sidebar-width: 280px;
    --header-height: 70px;
    
    /* Blur */
    --blur-sm: blur(8px);
    --blur-md: blur(12px);
    --blur-lg: blur(20px);
}

/* ===== Dark Theme (Default) ===== */
[data-theme="dark"] {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f1a;
    --bg-card: rgba(18, 18, 31, 0.95);
    --bg-hover: rgba(34, 34, 58, 0.8);
    --bg-sidebar: rgba(10, 10, 15, 0.98);
    --bg-mobile: #0a0a0f;
    --border-color: rgba(255, 255, 255, 0.06);
}

/* ===== Light Theme ===== */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-sidebar: rgba(255, 255, 255, 0.98);
    --bg-mobile: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-tertiary: #475569;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 40%, rgba(102, 126, 234, 0.08), transparent 50%),
        radial-gradient(ellipse at 80% 60%, rgba(168, 85, 247, 0.06), transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(236, 72, 153, 0.04), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.mobile-header-left {
    display: ruby;
}

.mobile-header-right {
    display: ruby;
}

/* ===== Container ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-lg);
    -webkit-backdrop-filter: var(--blur-lg);
    border-bottom: var(--border-subtle);
    padding: 0 32px;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-text span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-base);
    text-decoration: none;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-base);
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

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

.nav-links a.active {
    color: var(--primary-500);
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    width: 40px;
    height: 40px;
    background: var(--bg-hover);
    border: var(--border-subtle);
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.theme-toggle:hover {
    background: var(--primary-500);
    color: #fff;
    transform: scale(1.05);
}

/* ===== User Menu ===== */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px 6px 6px;
    background: var(--bg-hover);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}

.user-menu:hover {
    background: var(--surface-4);
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
    position: relative;
}

.user-avatar.online::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: var(--accent-green);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.user-menu .dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 0;
    min-width: 200px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-base);
    z-index: 50;
    backdrop-filter: var(--blur-md);
}

.user-menu:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu .dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: var(--text-secondary);
    font-size: 13px;
    transition: var(--transition-fast);
    text-decoration: none;
}

.user-menu .dropdown a i {
    width: 18px;
    font-size: 14px;
}

.user-menu .dropdown a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.user-menu .dropdown a:last-child {
    border-top: var(--border-subtle);
    margin-top: 6px;
    padding-top: 12px;
    color: var(--accent-red);
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: var(--blur-lg);
    -webkit-backdrop-filter: var(--blur-lg);
    border-right: var(--border-subtle);
    z-index: 90;
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    transition: transform 0.3s ease;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: var(--border-subtle);
    margin-bottom: 20px;
}

.sidebar-header .logo .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.sidebar-header .logo span {
    font-size: 18px;
}

.edit-sidebar-btn {
    width: 34px;
    height: 34px;
    background: var(--bg-hover);
    border: var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.edit-sidebar-btn:hover {
    background: var(--gradient-primary);
    color: #fff;
    transform: scale(1.05);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    padding: 0 14px 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-base);
    margin-bottom: 4px;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--gradient-primary);
    border-radius: 0 3px 3px 0;
    transition: var(--transition-base);
}

.nav-item:hover::before,
.nav-item.active::before {
    height: 60%;
}

.nav-item i {
    width: 20px;
    font-size: 16px;
    text-align: center;
    transition: var(--transition-base);
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--bg-hover);
    color: var(--primary-500);
}

.nav-item.active i {
    color: var(--primary-500);
}

.cart-badge {
    margin-left: auto;
    background: var(--gradient-gold);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(245, 175, 25, 0.3);
}

/* Sidebar Footer */
.sidebar-footer {
    padding-top: 20px;
    border-top: var(--border-subtle);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: var(--transition-base);
}

.user-info:hover {
    background: var(--surface-4);
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.user-email {
    font-size: 10px;
    color: var(--text-tertiary);
}

.logout-btn,
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition-base);
}

.login-btn {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: var(--border-subtle);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

/* ===== Main Content ===== */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 32px 40px 60px;
    min-height: calc(100vh - var(--header-height));
    position: relative;
    z-index: 1;
    margin-bottom: var(--header-height);
}

/* ===== Footer ===== */
.footer {
    margin-left: var(--sidebar-width);
    padding: 24px 32px;
    border-top: var(--border-subtle);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12px;
}

.footer a {
    color: var(--text-secondary);
    transition: var(--transition-fast);
    text-decoration: none;
}

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

/* ===== Dashboard Styles ===== */
.dashboard-container {
    padding: 0;
}

.page-header-block {
    margin-bottom: 32px;
}

.page-header-block-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
}

.page-header-block-desc {
    color: var(--text-secondary);
    font-size: 16px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.dashboard-card {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: var(--transition-base);
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--blur-sm);
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition-base);
}

.dashboard-card:hover::before {
    transform: scaleX(1);
}

.dashboard-card:hover {
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.dashboard-card-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 28px;
    color: #fff;
    box-shadow: var(--shadow-glow);
}

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

.dashboard-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.dashboard-card .btn {
    width: 100%;
    justify-content: center;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.5);
}

.btn-outline {
    background: transparent;
    border: var(--border-medium);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
    background: rgba(102, 126, 234, 0.1);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: var(--blur-lg);
    -webkit-backdrop-filter: var(--blur-lg);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-xl);
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-bottom: var(--border-subtle);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: var(--bg-hover);
    border: none;
    border-radius: var(--radius-full);
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--accent-red);
    color: #fff;
}

.modal-body {
    padding: 20px 28px;
    max-height: 50vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 28px;
    border-top: var(--border-subtle);
}

/* Edit Sidebar Styles */
.edit-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edit-sidebar-group {
    margin-top: 16px;
}

.edit-sidebar-group:first-child {
    margin-top: 0;
}

.edit-sidebar-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    padding: 0 12px 8px;
}

.edit-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-hover);
    border: var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: grab;
    transition: var(--transition-base);
}

.edit-sidebar-item:active {
    cursor: grabbing;
}

.edit-sidebar-item.dragging {
    opacity: 0.5;
}

.edit-sidebar-item.drag-over {
    border-color: var(--primary-500);
    background: rgba(102, 126, 234, 0.1);
}

.drag-icon {
    color: var(--text-tertiary);
    cursor: grab;
}

/* ===== Mobile Styles ===== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-lg);
    border-bottom: var(--border-subtle);
    padding: 12px 20px;
    z-index: 99;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-hover);
    border: var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
}

.logo-mobile {
    font-size: 18px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-lg);
    border-top: var(--border-subtle);
    /* padding: 10px 16px 20px; */
    z-index: 99;
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: var(--transition-base);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    position: relative;
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.bottom-nav-item.active {
    color: var(--primary-500);
    background: rgba(102, 126, 234, 0.1);
}

.cart-badge-mobile {
    position: absolute;
    top: -2px;
    right: 4px;
    background: var(--gradient-gold);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-full);
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    background: var(--bg-mobile);
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 20px;
    box-shadow: var(--shadow-xl);
}

.mobile-sidebar.open {
    transform: translateX(0);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: var(--blur-sm);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== Notification Container ===== */
#notificationContainer {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
}

.notification {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    backdrop-filter: var(--blur-sm);
}

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

.notification.success {
    border-left: 3px solid var(--accent-green);
}
.notification.error {
    border-left: 3px solid var(--accent-red);
}
.notification.warning {
    border-left: 3px solid var(--accent-orange);
}
.notification.info {
    border-left: 3px solid var(--primary-500);
}

/* ===== Home Page Styles ===== */
.home-wrapper {
    max-width: 1280px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(102, 126, 234, 0.1);
    border: var(--border-subtle);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-500);
    margin-bottom: 24px;
}

.hero-title {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.hero-stat .stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-500);
}

.hero-stat .stat-label {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Hero Animation */
.hero-animation {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-card-3d {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-lg);
    border: var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.floating-shapes .shape {
    position: absolute;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    opacity: 0.15;
    animation: orbit 20s linear infinite;
}

.shape-1 { width: 60px; height: 60px; top: 10%; left: 10%; border-radius: var(--radius-lg); animation-duration: 15s; }
.shape-2 { width: 40px; height: 40px; bottom: 20%; right: 15%; border-radius: 50%; animation-duration: 12s; }
.shape-3 { width: 80px; height: 80px; bottom: 10%; left: 20%; border-radius: var(--radius-md); animation-duration: 18s; }
.shape-4 { width: 30px; height: 30px; top: 30%; right: 25%; border-radius: var(--radius-full); animation-duration: 10s; }

@keyframes orbit {
    from { transform: rotate(0deg) translateX(50px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(50px) rotate(-360deg); }
}

/* About Section */
.about-section {
    padding: 60px 0;
}

.about-header {
    text-align: center;
    margin-bottom: 48px;
}

.about-badge {
    display: inline-block;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--primary-500);
    margin-bottom: 16px;
}

.about-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 12px;
}

.about-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 48px;
}

.about-card {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition-base);
}

.about-card:hover {
    border-color: var(--primary-500);
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.about-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
    color: #fff;
}

.about-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.about-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(102, 126, 234, 0.1), transparent);
    pointer-events: none;
}

.cta-content h3 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
    .main-content {
        padding: 28px 32px 60px;
    }
}

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .hero-description {
        margin: 0 auto;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-stats {
        justify-content: center;
    }
    .hero-animation {
        display: none;
    }
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .header {
        left: 0;
        display: none;
    }
    .main-content {
        margin-left: 0;
        margin-top: 60px;
        padding: 20px 16px 80px;
    }
    .footer {
        margin-left: 0;
        padding: 20px 16px 90px;
    }
    .mobile-header {
        display: flex;
    }
    .bottom-nav {
        display: block;
    }
    .hero-section {
        padding: 40px 0 60px;
    }
    .hero-title {
        font-size: 36px;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-title {
        font-size: 32px;
    }
    .cta-content h3 {
        font-size: 32px;
    }
    .dashboard-grid {
        gap: 16px;
    }
    .dashboard-card {
        padding: 20px 16px;
    }
    #notificationContainer {
        top: 70px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }
    .dashboard-card-icon {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }
    .modal-content {
        border-radius: var(--radius-lg);
    }
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-tertiary); }
.text-gradient { background: var(--gradient-cyber); -webkit-background-clip: text; background-clip: text; color: transparent; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-column { display: flex; flex-direction: column; }

.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.p-4 { padding: 16px; }
.p-6 { padding: 24px; }

.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* Glass Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-lg);
    border: var(--glass-border);
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

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

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

/* ===== Footer ===== */
.footer {
    margin-left: var(--sidebar-width);
    padding: 24px 32px;
    border-top: var(--border-subtle);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12px;
    background: var(--bg-primary);
    position: relative;
    width: calc(100% - var(--sidebar-width));
}

/* Ð¤Ð¸ÐºÑÐ¸Ñ€Ð¾Ð²Ð°Ð½Ð½Ñ‹Ð¹ Ñ„ÑƒÑ‚ÐµÑ€ (ÐµÑÐ»Ð¸ Ð½ÑƒÐ¶Ð½Ð¾ Ð¿Ñ€Ð¸Ð¶Ð°Ñ‚ÑŒ Ðº Ð½Ð¸Ð·Ñƒ) */
.footer.fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

/* Ð”Ð»Ñ ÑÑ‚Ñ€Ð°Ð½Ð¸Ñ† Ñ Ð¿Ð»ÐµÐµÑ€Ð¾Ð¼ - Ð¾Ñ‚ÑÑ‚ÑƒÐ¿ ÑÐ½Ð¸Ð·Ñƒ */
.has-player .footer {
    margin-bottom: 70px;
}

/* ÐœÐ¾Ð±Ð¸Ð»ÑŒÐ½Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ */
@media (max-width: 768px) {
    .footer {
        margin-left: 0;
        padding: 20px 16px 90px;
        width: 100%;
        
    }
    
    .footer.fixed {
        margin-left: 0;
        width: 100%;
        position: relative;
    }
    
    /* ÐžÑ‚ÑÑ‚ÑƒÐ¿ Ð´Ð»Ñ Ð¼Ð¾Ð±Ð¸Ð»ÑŒÐ½Ð¾Ð³Ð¾ Ð¿Ð»ÐµÐµÑ€Ð° */
    .has-player .footer {
        margin-bottom: 130px;
    }
    
    /* ÐžÑ‚ÑÑ‚ÑƒÐ¿ Ð´Ð»Ñ Ð¼Ð¾Ð±Ð¸Ð»ÑŒÐ½Ð¾Ð¹ Ð½Ð°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ð¸ */
    .footer.with-bottom-nav {
        padding-bottom: 90px;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 16px 16px 80px;
        font-size: 11px;
    }
    
    .has-player .footer {
        margin-bottom: 120px;
    }
}

/* Ð”Ð»Ñ ÑÑ‚Ñ€Ð°Ð½Ð¸Ñ† Ð±ÐµÐ· ÑÐ°Ð¹Ð´Ð±Ð°Ñ€Ð° (Ð½Ð°Ð¿Ñ€Ð¸Ð¼ÐµÑ€, Ð°Ð²Ñ‚Ð¾Ñ€Ð¸Ð·Ð°Ñ†Ð¸Ñ) */
.no-sidebar .footer {
    margin-left: 0;
    width: 100%;
}

.dashboard-feed {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.feed-column {
    min-width: 0;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.feed-title {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feed-title i {
    color: var(--primary-500);
}

.feed-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feed-post {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
}

.feed-post:hover {
    border-color: var(--primary-500);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.feed-post.draft-post {
    opacity: 0.8;
    border-left: 3px solid #f59e0b;
}

.post-header {
    /* display: flex; */
    /* justify-content: space-between; */
    /* align-items: center; */
    /* padding: 16px 20px; */
    /* background: var(--bg-hover); */
    /* border-bottom: 1px solid var(--border-color); */
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gradient-primary);
}

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

.author-name {
    font-weight: 600;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.draft-badge {
    font-size: 10px;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
}

.post-date {
    font-size: 11px;
    color: var(--text-tertiary);
}

.post-date i {
    margin-right: 4px;
}

.post-actions {
    display: flex;
    gap: 8px;
}

.post-action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.post-action-btn:hover {
    background: var(--primary-500);
    color: #fff;
    border-color: var(--primary-500);
}

.post-content {
    padding: 20px;
}

.post-image {
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.post-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-base);
}

.post-title a:hover {
    color: var(--primary-500);
}

.post-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--bg-hover);
    border-radius: 20px;
    font-size: 11px;
    color: var(--text-tertiary);
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
}

.read-more {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-500);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-base);
}

.read-more:hover {
    gap: 10px;
}

.post-stats {
    display: flex;
    gap: 16px;
}

.post-stats .stat {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 4px;
}

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

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

.user-avatar-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gradient-primary);
}

.user-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

.user-fullname {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-username {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.user-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.user-stat {
    text-align: center;
}

.user-stat .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-500);
}

.user-stat .stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
}

.tips-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.tips-header i {
    font-size: 24px;
    color: var(--primary-500);
}

.tips-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.tips-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tips-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.tips-footer {
    margin-top: 16px;
    text-align: right;
}

.quick-links-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.quick-links-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.quick-links-header i {
    font-size: 18px;
    color: var(--primary-500);
}

.quick-links-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-base);
}

.quick-link:hover {
    background: var(--primary-500);
    color: #fff;
}

.quick-link i {
    width: 20px;
}

.empty-feed {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.empty-icon {
    font-size: 64px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-feed h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-feed p {
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.new-posts-notification {
    position: sticky;
    top: 20px;
    z-index: 100;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    padding: 12px 20px;
    margin-bottom: 20px;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.new-posts-notification .notification-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
}

.loading-indicator {
    text-align: center;
    padding: 30px;
    color: var(--text-tertiary);
}

.loader {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

.end-of-feed {
    text-align: center;
    padding: 30px;
    color: var(--text-tertiary);
}

.end-of-feed i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
}

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

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

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

@keyframes highlight {
    0% { background: rgba(102, 126, 234, 0.2); }
    100% { background: transparent; }
}

@media (max-width: 1024px) {
    .dashboard-feed { grid-template-columns: 1fr; }
    .sidebar-column { order: -1; }
}

@media (max-width: 768px) {
    .post-header { flex-wrap: wrap; }
    .post-footer { flex-wrap: wrap; gap: 12px; }
    .post-title { font-size: 18px; }
    .quick-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .feed-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .quick-links { grid-template-columns: 1fr; }
}

/* ========================================
   Enhanced Chat Page Styles
   ======================================== */

.chat-page {
    max-width: 1000px;
    margin: 0 auto;
    height: calc(88vh - 100px);
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-hover);
    border-bottom: 2px solid var(--border-color);
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-base);
}

.back-btn:hover {
    background: var(--primary-500);
    color: #fff;
    transform: scale(1.05);
}

.chat-user {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.chat-avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.avatar-placeholder.support {
    background: linear-gradient(135deg, #667eea, #764ba2);
    font-size: 22px;
}

.chat-user-info {
    flex: 1;
}

.chat-user-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 2px;
}

.chat-user-status {
    font-size: 12px;
    color: var(--text-tertiary);
}

.chat-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 13px;
    font-weight: 500;
}

.action-btn:hover {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: #fff;
    transform: translateY(-1px);
}

.status.online {
    color: #22c55e;
    position: relative;
    padding-left: 12px;
}

.status.online::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
    50% { opacity: 0.5; transform: translateY(-50%) scale(1.2); }
}

.close-chat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-full);
    color: #ef4444;
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 13px;
    font-weight: 500;
}

.close-chat-btn:hover {
    background: #ef4444;
    color: #fff;
    transform: translateY(-2px);
}

/* Messages Container */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-card);
}

/* Custom Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.welcome-message h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.welcome-message p {
    font-size: 14px;
}

/* Message Bubbles */
.message {
    display: flex;
    animation: fadeIn 0.3s ease;
}

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

.message.user {
    justify-content: flex-end;
}

.message.admin {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: var(--gradient-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message.admin .message-bubble {
    background: var(--bg-hover);
    border-bottom-left-radius: 4px;
}

.message-text {
    font-size: 14px;
    line-height: 1.5;
}

/* Message Files */
.message-files {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.image-preview {
    max-width: 200px;
    max-height: 150px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.image-preview:hover {
    transform: scale(1.02);
}

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

.file-attachment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 12px;
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.file-attachment:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.message.user .file-attachment {
    background: rgba(255, 255, 255, 0.2);
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #bbb;
}

.message-time {
    font-size: 10px;
    margin-top: 6px;
    opacity: 0.7;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.read-icon {
    font-size: 10px;
    margin-left: 4px;
}

.message.user .read-icon {
    color: rgba(255, 255, 255, 0.7);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    justify-content: flex-start;
    margin-top: 8px;
}

.typing-bubble {
    background: var(--bg-hover);
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-bubble span {
    width: 8px;
    height: 8px;
    background: var(--text-tertiary);
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-bubble span:nth-child(1) { animation-delay: 0s; }
.typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

.typing-text {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-left: 8px;
}

/* Reply Form */
.chat-reply {
    padding: 16px 20px;
    background: var(--bg-hover);
    border-top: 1px solid var(--border-color);
}

.reply-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.reply-input {
    flex: 1;
    padding: 12px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: var(--text-primary);
    font-size: 14px;
    resize: none;
    font-family: inherit;
    max-height: 100px;
    transition: var(--transition-base);
}

.reply-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.reply-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon:hover {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: #fff;
    transform: scale(1.05);
}

.send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Image URL Input */
.image-url-input {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.url-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-500);
}

.add-url-btn, .cancel-url-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition-base);
}

.add-url-btn {
    background: var(--primary-500);
    color: #fff;
}

.add-url-btn:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
}

.cancel-url-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.cancel-url-btn:hover {
    background: var(--bg-hover);
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: 80px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    max-width: 350px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.emoji-list {
    font-size: 24px;
    line-height: 1.8;
    cursor: pointer;
    word-break: break-all;
}

/* File Preview */
.file-preview, .url-preview {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
}

.preview-item .remove-file, .preview-item .remove-url {
    cursor: pointer;
    color: #ef4444;
    margin-left: 8px;
}

/* Chat Closed */
.chat-closed {
    text-align: center;
    padding: 16px;
    background: var(--bg-hover);
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 13px;
}

.chat-closed i {
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-page {
        height: calc(100vh - 60px);
        border-radius: 0;
        margin: 0 -16px;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .chat-user-name {
        font-size: 15px;
    }
    
    .chat-avatar {
        width: 40px;
        height: 40px;
    }
    
    .chat-header {
        padding: 12px 16px;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .chat-reply {
        padding: 12px 16px;
    }
    
    .action-btn span {
        display: none;
    }
    
    .action-btn {
        padding: 8px 12px;
    }
    
    .emoji-picker {
        bottom: 70px;
        right: 10px;
        max-width: 280px;
        max-height: 200px;
    }
    
    .image-preview {
        max-width: 150px;
        max-height: 120px;
    }
}

@media (max-width: 480px) {
    .close-chat-btn span {
        display: none;
    }
    
    .close-chat-btn {
        padding: 8px 12px;
    }
    
    .close-chat-btn i {
        margin: 0;
    }
    
    .image-preview {
        max-width: 120px;
        max-height: 100px;
    }
}