/* ========================================================
   AI NEURAL COMMAND - Sci-Fi Dark Theme
   用户管理系统 科幻指挥中心风格
   ======================================================== */

/* Google Fonts: Orbitron + ZCOOL KuaiLe */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;900&family=ZCOOL+KuaiLe&display=swap');

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Core palette */
    --bg-deep:        #030b1a;
    --bg-panel:      #060f24;
    --bg-card:       #081632;
    --bg-card-hover: #0a1e3d;
    --glass-bg:      rgba(8, 22, 50, 0.65);
    --glass-border:  rgba(0, 245, 255, 0.15);
    --glass-border-hover: rgba(0, 245, 255, 0.4);

    /* Primary: Cyan/Teal (primary actions, highlights) */
    --cyan:          #00e5ff;
    --cyan-dim:      #00b8cc;
    --cyan-glow:     rgba(0, 229, 255, 0.35);
    --cyan-subtle:   rgba(0, 229, 255, 0.08);

    /* Secondary: Violet (admin, special) */
    --violet:        #8b5cf6;
    --violet-dim:    #7c3aed;
    --violet-glow:   rgba(139, 92, 246, 0.35);
    --violet-subtle: rgba(139, 92, 246, 0.1);

    /* Accent: Amber/Orange (warnings, costs) */
    --amber:         #ffb020;
    --amber-dim:     #f59e0b;
    --amber-glow:    rgba(255, 176, 32, 0.3);

    /* Semantic */
    --success:       #00e676;
    --success-dim:   #00c853;
    --success-glow:  rgba(0, 230, 118, 0.3);
    --danger:        #ff3d57;
    --danger-dim:    #e91e63;
    --danger-glow:   rgba(255, 61, 87, 0.3);
    --danger-subtle: rgba(255, 61, 87, 0.1);

    /* Text */
    --text-primary:  #c8d8f0;
    --text-secondary: #6b85ab;
    --text-muted:    #3a5278;
    --text-bright:   #e8f4ff;

    /* Layout */
    --header-h:      56px;
    --sidebar-w:     220px;

    /* Radius */
    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     16px;
}

/* ==================== GLOBAL RESET ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
.hidden { display: none !important; }
body {
    font-family: 'ZCOOL KuaiLe', -apple-system, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-deep);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==================== BACKGROUND: NEURAL GRID ==================== */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        /* Cyan grid */
        linear-gradient(rgba(0,229,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,229,255,0.04) 1px, transparent 1px),
        /* Violet accent grid (offset) */
        linear-gradient(rgba(139,92,246,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139,92,246,0.03) 1px, transparent 1px);
    background-size:
        60px 60px,
        60px 60px,
        120px 120px,
        120px 120px;
    pointer-events: none;
    z-index: 0;
}

/* Scanline overlay */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.08) 3px,
        rgba(0,0,0,0.08) 4px
    );
    pointer-events: none;
    z-index: 0;
}

/* Ambient glow orbs */
#app { position: relative; z-index: 1; }

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4 {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-bright);
    letter-spacing: 0.05em;
}
h3 { font-size: 16px; font-weight: 600; }
h4 { font-size: 13px; font-weight: 500; color: var(--cyan); }

/* ==================== GLASS PANEL BASE ==================== */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 0 20px rgba(0, 229, 255, 0.04),
        inset 0 1px 0 rgba(255,255,255,0.05);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.glass-panel:hover {
    border-color: var(--glass-border-hover);
    box-shadow:
        0 0 30px rgba(0, 229, 255, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Neon text glow effect */
.neon-text {
    font-family: 'Orbitron', sans-serif;
    color: var(--cyan);
    text-shadow:
        0 0 8px var(--cyan),
        0 0 20px var(--cyan-glow),
        0 0 40px var(--cyan-glow);
}

/* Neon border */
.neon-border {
    border: 1px solid var(--cyan);
    box-shadow:
        0 0 8px var(--cyan-glow),
        inset 0 0 8px rgba(0,229,255,0.05);
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--cyan-dim);
    border-radius: 3px;
    opacity: 0.5;
}
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* ==================== LOGIN PAGE ==================== */
#login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

/* Radial glow behind login box */
#login-page::before {
    content: '';
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -60%);
    width: 600px; height: 500px;
    background: radial-gradient(ellipse, rgba(0,229,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 40px 36px;
    background: rgba(6, 15, 36, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 0 60px rgba(0, 229, 255, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.08);
    position: relative;
    z-index: 1;
}

/* Corner accents */
.login-container::before,
.login-container::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
}
.login-container::before {
    top: -1px; left: -1px;
    border-top: 2px solid var(--cyan);
    border-left: 2px solid var(--cyan);
    border-radius: var(--radius-lg) 0 0 0;
    box-shadow: -3px -3px 8px var(--cyan-glow);
}
.login-container::after {
    bottom: -1px; right: -1px;
    border-bottom: 2px solid var(--violet);
    border-right: 2px solid var(--violet);
    border-radius: 0 0 var(--radius-lg) 0;
    box-shadow: 3px 3px 8px var(--violet-glow);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--cyan);
    text-shadow: 0 0 20px var(--cyan-glow), 0 0 40px var(--cyan-glow);
    letter-spacing: 0.15em;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 32px;
    font-family: 'Orbitron', monospace;
}

/* Form groups */
.login-container .form-group { margin-bottom: 18px; }
.login-container .form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--cyan-dim);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-family: 'Orbitron', monospace;
}

.login-container .form-group input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(0, 229, 255, 0.04);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    outline: none;
}
.login-container .form-group input:focus {
    border-color: var(--cyan);
    background: rgba(0, 229, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(0,229,255,0.12), 0 0 12px rgba(0,229,255,0.15);
}
.login-container .form-group input::placeholder { color: var(--text-muted); }

/* Login links */
.login-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,229,255,0.08);
}
.toggle-form-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.toggle-form-link:hover { color: var(--cyan); }

/* ==================== BUTTONS ==================== */
.btn-primary {
    background: linear-gradient(135deg, var(--cyan-dim), #00c4d4);
    color: #020c18;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.08em;
    transition: all 0.2s;
    box-shadow: 0 0 16px rgba(0,229,255,0.2);
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.4s;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover {
    box-shadow: 0 0 28px rgba(0,229,255,0.4);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
    background: var(--text-muted);
    color: rgba(255,255,255,0.3);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-warning {
    background: linear-gradient(135deg, var(--amber-dim), #e08c00);
    color: #1a0a00;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.08em;
    transition: all 0.2s;
    box-shadow: 0 0 12px rgba(255,176,32,0.2);
}
.btn-warning:hover {
    box-shadow: 0 0 24px rgba(255,176,32,0.4);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #c2185b);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.08em;
    transition: all 0.2s;
    box-shadow: 0 0 12px rgba(255,61,87,0.2);
}
.btn-danger:hover {
    box-shadow: 0 0 24px rgba(255,61,87,0.4);
    transform: translateY(-1px);
}

.btn-info {
    background: linear-gradient(135deg, var(--violet), #6d28d9);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.08em;
    transition: all 0.2s;
    box-shadow: 0 0 12px var(--violet-glow);
}
.btn-info:hover {
    box-shadow: 0 0 24px var(--violet-glow);
    transform: translateY(-1px);
}

.btn-text {
    background: none;
    border: none;
    color: var(--cyan);
    cursor: pointer;
    padding: 5px 10px;
    font-size: 13px;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.05em;
    transition: color 0.2s, text-shadow 0.2s;
}
.btn-text:hover {
    color: var(--text-bright);
    text-shadow: 0 0 8px var(--cyan-glow);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    margin-right: 5px;
}

/* Generic form inputs */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 12px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 9px 12px;
    background: rgba(0, 229, 255, 0.03);
    border: 1px solid rgba(0, 229, 255, 0.12);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--cyan);
    background: rgba(0,229,255,0.06);
    box-shadow: 0 0 0 2px rgba(0,229,255,0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}
.form-control {
    width: 100%;
    padding: 9px 12px;
    background: rgba(0, 229, 255, 0.03);
    border: 1px solid rgba(0, 229, 255, 0.12);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
}
.form-inline .form-group {
    display: inline-block;
    margin-right: 12px;
    margin-bottom: 12px;
}
.form-inline .form-group label {
    display: inline-block;
    margin-right: 6px;
    margin-bottom: 0;
}
.form-inline .form-group input { width: auto; }

/* ==================== MAIN LAYOUT ==================== */
#main-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==================== HEADER ==================== */
.header {
    height: var(--header-h);
    background: rgba(3, 11, 26, 0.95);
    border-bottom: 1px solid rgba(0, 229, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.4), 0 1px 0 rgba(0,229,255,0.08);
}

/* Header left */
.header-left { display: flex; align-items: center; gap: 12px; }
.header-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.12em;
    text-shadow: 0 0 12px var(--cyan-glow);
    margin: 0;
}

/* Live clock in header */
.header-clock {
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border: 1px solid rgba(0,229,255,0.1);
    border-radius: var(--radius-sm);
    background: rgba(0,229,255,0.03);
}

/* Header right */
.header-right { display: flex; align-items: center; gap: 14px; }
#user-info { font-size: 13px; color: var(--text-secondary); }
.role-badge {
    background: linear-gradient(135deg, var(--violet), var(--violet-dim));
    color: #fff;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.1em;
    box-shadow: 0 0 10px var(--violet-glow);
    animation: rolePulse 3s ease-in-out infinite;
}
@keyframes rolePulse {
    0%, 100% { box-shadow: 0 0 8px var(--violet-glow); }
    50% { box-shadow: 0 0 18px var(--violet-glow); }
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: var(--sidebar-w);
    background: rgba(3, 11, 26, 0.8);
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    border-right: 1px solid rgba(0, 229, 255, 0.08);
    overflow-y: auto;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Sidebar top accent line */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0.4;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 13px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    font-size: 13px;
    border-left: 2px solid transparent;
}
.nav-item:hover {
    background: rgba(0, 229, 255, 0.05);
    color: var(--text-primary);
    border-left-color: rgba(0,229,255,0.3);
}
.nav-item.active {
    background: linear-gradient(90deg, rgba(0,229,255,0.1), rgba(0,229,255,0.03));
    color: var(--cyan);
    border-left: 2px solid var(--cyan);
    font-weight: 600;
    text-shadow: 0 0 10px var(--cyan-glow);
}
.nav-item .icon { margin-right: 10px; font-size: 16px; }
.nav-item .badge {
    background: linear-gradient(135deg, var(--danger), var(--danger-dim));
    color: #fff;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: auto;
    font-weight: 700;
    box-shadow: 0 0 8px var(--danger-glow);
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.nav-divider {
    padding: 14px 20px 6px;
    font-size: 10px;
    color: var(--violet);
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border-top: 1px solid rgba(139,92,246,0.15);
    margin-top: 8px;
    position: relative;
}
.nav-divider::after {
    content: '';
    position: absolute;
    top: 0; left: 20px; right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139,92,246,0.4), transparent);
}

/* Hamburger (mobile) */
.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border: none;
    background: rgba(0,229,255,0.06);
    border: 1px solid rgba(0,229,255,0.15);
    border-radius: var(--radius-sm);
    font-size: 18px;
    cursor: pointer;
    color: var(--cyan);
    transition: all 0.2s;
}
.hamburger-btn:hover { background: rgba(0,229,255,0.12); }

/* Mobile sidebar overlay */
.sidebar-overlay {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 998;
    backdrop-filter: blur(4px);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-left: var(--sidebar-w);
    margin-top: var(--header-h);
    padding: 20px;
    min-height: calc(100vh - var(--header-h));
}

.content-page {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}
.content-page h3 {
    font-size: 15px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,229,255,0.08);
    color: var(--cyan);
    letter-spacing: 0.1em;
}
.content-page h4 {
    margin: 24px 0 14px;
    color: var(--text-secondary);
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.admin-page { min-height: 500px; }

/* ==================== PROFILE CARD ==================== */
.profile-card {
    display: flex;
    gap: 28px;
    padding: 24px;
    background: rgba(0,229,255,0.03);
    border: 1px solid rgba(0,229,255,0.08);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.profile-avatar {
    width: 90px; height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan-dim), var(--violet));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 20px var(--cyan-glow), 0 0 40px rgba(139,92,246,0.2);
    border: 2px solid rgba(0,229,255,0.3);
}
.avatar-text {
    font-size: 32px;
    color: #020c18;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
}
.profile-info { flex: 1; }
.info-row {
    display: flex;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0,229,255,0.05);
    font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-row label {
    width: 90px;
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
}
.info-row .points {
    color: var(--amber);
    font-weight: 700;
    font-size: 18px;
    font-family: 'Orbitron', monospace;
    text-shadow: 0 0 10px var(--amber-glow);
}

/* ==================== TABLES ==================== */
.table-container { overflow-x: auto; margin-top: 16px; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th {
    padding: 10px 14px;
    text-align: left;
    background: rgba(0,229,255,0.04);
    color: var(--cyan-dim);
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(0,229,255,0.15);
    white-space: nowrap;
}
.data-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(0,229,255,0.05);
    color: var(--text-primary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.data-table tr:hover td {
    background: rgba(0,229,255,0.04);
}
.data-table tr:last-child td { border-bottom: none; }

/* Status cells */
.status-normal { color: var(--success); font-weight: 600; }
.status-banned { color: var(--danger); font-weight: 600; }
.role-admin {
    color: var(--violet);
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    letter-spacing: 0.05em;
}
.status-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.status-pending { background: rgba(255,176,32,0.12); color: var(--amber); border: 1px solid rgba(255,176,32,0.2); }
.status-processing { background: rgba(0,229,255,0.1); color: var(--cyan); border: 1px solid rgba(0,229,255,0.2); }
.status-success { background: rgba(0,230,118,0.1); color: var(--success); border: 1px solid rgba(0,230,118,0.2); }
.status-failed { background: rgba(255,61,87,0.1); color: var(--danger); border: 1px solid rgba(255,61,87,0.2); }

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}
.pagination .btn-text {
    padding: 6px 14px;
    border: 1px solid rgba(0,229,255,0.15);
    border-radius: var(--radius-sm);
    font-size: 12px;
}
.pagination .btn-text:hover {
    border-color: var(--cyan);
    background: rgba(0,229,255,0.06);
}
#pl-page-info, #log-page-info, #au-page-info,
#ap-page-info, #al-page-info, #all-page-info,
#vd-admin-page-info {
    color: var(--text-muted);
    font-size: 12px;
    font-family: 'Orbitron', monospace;
}

/* ==================== ADMIN TOOLBAR ==================== */
.admin-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.search-input {
    padding: 8px 12px;
    background: rgba(0,229,255,0.03);
    border: 1px solid rgba(0,229,255,0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    flex: 1;
    max-width: 300px;
    transition: border-color 0.2s;
}
.search-input:focus {
    border-color: var(--cyan);
    background: rgba(0,229,255,0.06);
    box-shadow: 0 0 0 2px rgba(0,229,255,0.08);
}
.search-select {
    padding: 8px 12px;
    background: rgba(0,229,255,0.03);
    border: 1px solid rgba(0,229,255,0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}
.search-select option { background: var(--bg-panel); }

/* ==================== MODALS ==================== */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: rgba(6, 15, 36, 0.98);
    border: 1px solid rgba(0,229,255,0.2);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 0 40px rgba(0,229,255,0.15),
        0 20px 60px rgba(0,0,0,0.6);
}
.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,229,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.modal-header h3 {
    margin: 0;
    font-size: 14px;
    color: var(--cyan);
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.1em;
}
.modal-close {
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    transition: color 0.2s;
    background: none;
    border: none;
    font-family: sans-serif;
}
.modal-close:hover { color: var(--danger); }
.modal-body {
    padding: 20px;
    overflow-y: auto;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid rgba(0,229,255,0.08);
    flex-shrink: 0;
}

.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }
.search-results { margin-top: 12px; max-height: 280px; overflow-y: auto; }
.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(0,229,255,0.08);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    gap: 10px;
    background: rgba(0,229,255,0.02);
    transition: border-color 0.2s;
}
.search-result-item:hover { border-color: rgba(0,229,255,0.2); }
.search-result-item .avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan-dim), var(--violet));
    color: #020c18;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 0 10px var(--cyan-glow);
}
.search-result-item .info { flex: 1; }
.search-result-item .username { font-weight: 600; font-size: 13px; color: var(--text-bright); }
.search-result-item .nickname { font-size: 12px; color: var(--text-muted); }
.search-result-item .btn-chat {
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--cyan-dim), #00c4d4);
    color: #020c18;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: box-shadow 0.2s;
}
.search-result-item .btn-chat:hover { box-shadow: 0 0 12px var(--cyan-glow); }
.search-no-result { text-align: center; color: var(--text-muted); padding: 20px; font-size: 13px; }

/* Security section */
.security-section {
    background: rgba(0,229,255,0.02);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0,229,255,0.07);
    margin-bottom: 20px;
}
.security-section h4 {
    margin-top: 0;
    color: var(--violet);
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.security-desc { color: var(--text-muted); font-size: 12px; margin-bottom: 14px; }
.status-enabled { color: var(--success); font-weight: 600; }
.status-disabled { color: var(--danger); font-weight: 600; }

/* ==================== CHAT ==================== */
.chat-container {
    display: flex;
    gap: 16px;
    height: 420px;
    margin-bottom: 20px;
}
.chat-list {
    width: 200px;
    border: 1px solid rgba(0,229,255,0.1);
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0,229,255,0.02);
}
.chat-list h4 {
    padding: 12px 14px;
    background: rgba(0,229,255,0.04);
    margin: 0;
    font-size: 11px;
    color: var(--cyan-dim);
    border-bottom: 1px solid rgba(0,229,255,0.08);
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.1em;
}
#chat-user-list { overflow-y: auto; height: calc(100% - 45px); }
.chat-user-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,229,255,0.04);
    transition: background 0.2s;
    font-size: 13px;
}
.chat-user-item:hover { background: rgba(0,229,255,0.05); }
.chat-user-item.active { background: rgba(0,229,255,0.1); color: var(--cyan); }
.chat-window {
    flex: 1;
    border: 1px solid rgba(0,229,255,0.1);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(0,229,255,0.01);
}
.chat-header {
    padding: 12px 16px;
    background: rgba(0,229,255,0.03);
    border-bottom: 1px solid rgba(0,229,255,0.08);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-header::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success-glow);
    animation: liveDot 2s ease-in-out infinite;
}
@keyframes liveDot { 0%,100%{opacity:1} 50%{opacity:0.4} }
.chat-empty { text-align: center; color: var(--text-muted); padding: 50px; font-size: 13px; }
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: rgba(0,0,0,0.2);
}
.chat-message { margin-bottom: 14px; display: flex; flex-direction: column; }
.chat-message.mine { align-items: flex-end; }
.chat-message .msg-content {
    max-width: 70%;
    padding: 9px 14px;
    border-radius: var(--radius-md);
    background: rgba(0,229,255,0.08);
    border: 1px solid rgba(0,229,255,0.12);
    font-size: 13px;
    line-height: 1.5;
}
.chat-message.mine .msg-content {
    background: linear-gradient(135deg, rgba(0,229,255,0.2), rgba(139,92,246,0.15));
    border-color: rgba(0,229,255,0.25);
    color: var(--text-bright);
}
.chat-message .msg-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.chat-message.mine .msg-time { text-align: right; }
.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid rgba(0,229,255,0.08);
    background: rgba(0,229,255,0.02);
}
.chat-input-area input {
    flex: 1;
    padding: 9px 14px;
    background: rgba(0,229,255,0.04);
    border: 1px solid rgba(0,229,255,0.12);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 13px;
    font-family: inherit;
    outline: none;
}
.chat-input-area input:focus { border-color: var(--cyan); }

.system-messages {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid rgba(0,229,255,0.08);
    border-radius: var(--radius-md);
    background: rgba(0,229,255,0.02);
}
.system-message { padding: 10px 14px; border-bottom: 1px solid rgba(0,229,255,0.05); }
.system-message:last-child { border-bottom: none; }
.system-message .msg-title { font-weight: 600; margin-bottom: 4px; font-size: 13px; color: var(--text-bright); }
.system-message .msg-content { color: var(--text-secondary); font-size: 12px; }
.system-message .msg-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-family: 'Orbitron', monospace; }

/* Chat tabs */
.chat-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0,229,255,0.08);
    padding-bottom: 0;
}
.chat-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all 0.2s;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.05em;
}
.chat-tab:hover { color: var(--cyan); background: rgba(0,229,255,0.04); }
.chat-tab.active { color: var(--cyan); border-bottom-color: var(--cyan); font-weight: 700; }

/* ==================== CONTACTS ==================== */
#contacts-list { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-card {
    background: rgba(0,229,255,0.03);
    border: 1px solid rgba(0,229,255,0.08);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    width: 150px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    transition: all 0.25s;
}
.contact-card:hover {
    border-color: rgba(0,229,255,0.25);
    box-shadow: 0 4px 20px rgba(0,229,255,0.1);
    transform: translateY(-2px);
}
.contact-avatar {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan-dim), var(--violet));
    color: #020c18;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0 auto 10px;
    box-shadow: 0 0 12px var(--cyan-glow);
}
.contact-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.contact-actions { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }

/* ==================== FRIEND REQUESTS ==================== */
.fr-section { margin-bottom: 20px; }
.fr-section h4 { margin-bottom: 12px; font-size: 12px; }
.fr-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid rgba(0,229,255,0.08);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    background: rgba(0,229,255,0.02);
    gap: 12px;
}
.fr-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.fr-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), #6d28d9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 0 10px var(--violet-glow);
}
.fr-name { font-weight: 600; font-size: 13px; color: var(--text-bright); }
.fr-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; font-family: 'Orbitron', monospace; }
.fr-remark { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.fr-actions { display: flex; gap: 6px; flex-shrink: 0; }
.fr-status { font-size: 12px; color: var(--text-muted); }
.fr-badge {
    background: linear-gradient(135deg, var(--danger), var(--danger-dim));
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 0 8px var(--danger-glow);
}

/* ==================== TOAST ==================== */
#toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    background: rgba(6, 15, 36, 0.97);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-size: 13px;
    color: var(--text-bright);
    pointer-events: auto;
    animation: toastIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border-left: 3px solid var(--cyan);
    backdrop-filter: blur(12px);
    max-width: 320px;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==================== VIDEO GENERATION PAGE ==================== */
#page-video-generate {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
}
#page-video-generate > h3 { display: none; }

.vd-gen-container {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 16px;
    height: calc(100vh - var(--header-h) - 40px);
    min-height: 500px;
}

.vd-gen-form-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    backdrop-filter: blur(12px);
    height: calc(100vh - var(--header-h) - 40px);
    box-sizing: border-box;
}
.vd-gen-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-family: 'Orbitron', sans-serif;
    color: var(--cyan);
    letter-spacing: 0.1em;
    text-shadow: 0 0 12px var(--cyan-glow);
}
.vd-form-group { display: flex; flex-direction: column; gap: 6px; }
.vd-form-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--cyan-dim);
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.vd-required { color: var(--danger); }
.vd-optional { font-weight: 400; color: var(--text-muted); }
.vd-form-input.vd-url-input-field { pointer-events: auto !important; z-index: 10 !important; position: relative; }
/* 强制让 vd-image-url 可以输入 */
input#vd-image-url.vd-form-input {
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.vd-form-select, .vd-form-input {
    padding: 8px 12px;
    background: rgba(0,229,255,0.03);
    border: 1px solid rgba(0,229,255,0.12);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.vd-form-select:focus, .vd-form-input:focus { border-color: var(--cyan); }
.vd-form-textarea {
    padding: 10px 12px;
    background: rgba(0,229,255,0.03);
    border: 1px solid rgba(0,229,255,0.12);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    line-height: 1.6;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.vd-form-textarea:focus { border-color: var(--cyan); background: rgba(0,229,255,0.05); }
.vd-model-info {
    font-size: 11px;
    color: var(--text-muted);
    padding: 6px 10px;
    background: rgba(0,229,255,0.03);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,229,255,0.06);
    min-height: 20px;
}

/* Upload area */
.vd-upload-area {
    position: relative;
    border: 2px dashed rgba(0,229,255,0.2);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    background: rgba(0,229,255,0.02);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vd-upload-area:hover, .vd-upload-area.drag-over {
    border-color: var(--cyan);
    background: rgba(0,229,255,0.06);
    box-shadow: 0 0 20px rgba(0,229,255,0.1);
}
.vd-upload-placeholder { color: var(--text-muted); }
.vd-upload-icon { font-size: 28px; margin-bottom: 8px; }
.vd-upload-placeholder p { margin: 4px 0; font-size: 12px; }
.vd-upload-link { color: var(--cyan); cursor: pointer; }
.vd-upload-hint { font-size: 11px !important; color: var(--text-muted) !important; }
.vd-upload-preview { max-width: 100%; max-height: 160px; border-radius: var(--radius-sm); object-fit: contain; }
.vd-upload-remove {
    position: absolute;
    top: 6px; right: 6px;
    background: rgba(255,61,87,0.8);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px; height: 24px;
    font-size: 14px;
    cursor: pointer;
    line-height: 24px;
    transition: background 0.2s;
}
.vd-upload-remove:hover { background: var(--danger); }
.vd-url-upload { display: flex; align-items: center; gap: 6px; }
.vd-url-prefix { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.vd-url-btn {
    padding: 6px 12px;
    background: rgba(0,229,255,0.08);
    color: var(--cyan);
    border: 1px solid rgba(0,229,255,0.15);
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'Orbitron', monospace;
    transition: all 0.2s;
}
.vd-url-btn:hover { background: rgba(0,229,255,0.15); border-color: var(--cyan); }

/* Params grid */
.vd-params-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vd-param-item { display: flex; flex-direction: column; gap: 5px; }
.vd-param-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.vd-custom-size { grid-column: 1 / -1; }
.vd-custom-size-row { display: flex; align-items: center; gap: 8px; }
.vd-size-input { width: 80px !important; text-align: center; }
.vd-size-x { color: var(--text-muted); font-size: 13px; }

/* Duration buttons */
.vd-duration-group { display: flex; gap: 6px; }
.vd-duration-btn {
    flex: 1;
    padding: 7px 0;
    border: 1px solid rgba(0,229,255,0.12);
    border-radius: var(--radius-sm);
    background: rgba(0,229,255,0.03);
    font-size: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
}
.vd-duration-btn:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0,229,255,0.06); }
.vd-duration-btn.active {
    background: linear-gradient(135deg, var(--cyan-dim), #00c4d4);
    border-color: var(--cyan);
    color: #020c18;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(0,229,255,0.25);
}

/* Generate button */
.vd-generate-btn {
    padding: 12px;
    background: linear-gradient(135deg, var(--cyan-dim), #00c4d4);
    color: #020c18;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-top: 4px;
    box-shadow: 0 0 20px rgba(0,229,255,0.25);
    position: relative;
    overflow: hidden;
}
.vd-generate-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}
.vd-generate-btn:hover::before { left: 100%; }
.vd-generate-btn:hover { box-shadow: 0 0 36px rgba(0,229,255,0.45); transform: translateY(-1px); }
.vd-generate-btn:active { transform: scale(0.98); }
.vd-generate-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.5;
}
.vd-gen-icon { font-size: 16px; }

/* History panel */
.vd-gen-history-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(12px);
    height: calc(100vh - var(--header-h) - 40px);
    box-sizing: border-box;
}
.vd-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0,229,255,0.08);
    flex-shrink: 0;
}
.vd-history-header h4 {
    margin: 0;
    font-size: 13px;
    color: var(--cyan);
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.08em;
}
.vd-history-refresh {
    background: rgba(0,229,255,0.06);
    border: 1px solid rgba(0,229,255,0.12);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    transition: all 0.2s;
    color: var(--cyan);
}
.vd-history-refresh:hover { background: rgba(0,229,255,0.12); border-color: var(--cyan); }
.vd-history-toggle {
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 11px;
    padding: 3px 8px;
    color: var(--violet);
    transition: all 0.2s;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.05em;
}
.vd-history-toggle:hover {
    background: rgba(139,92,246,0.2);
    border-color: var(--violet);
    box-shadow: 0 0 8px var(--violet-glow);
}
.vd-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.vd-history-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-size: 13px;
}
.vd-history-empty-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.vd-history-card {
    border: 1px solid rgba(0,229,255,0.08);
    border-radius: var(--radius-md);
    background: rgba(0,229,255,0.02);
    transition: border-color 0.25s, box-shadow 0.25s;
    flex-shrink: 0;
    overflow: visible;
}
.vd-history-card:hover {
    border-color: rgba(0,229,255,0.2);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.vd-history-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: rgba(0,229,255,0.03);
    border-bottom: 1px solid rgba(0,229,255,0.06);
    gap: 8px;
}
.vd-history-model { font-size: 11px; color: var(--cyan); font-weight: 700; font-family: 'Orbitron', monospace; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-history-time { font-size: 10px; color: var(--text-muted); flex-shrink: 0; font-family: 'Orbitron', monospace; }
.vd-history-prompt {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow: visible;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: unset;
    -webkit-box-orient: vertical;
    word-break: break-all;
}
.vd-history-result {
    background: rgba(0,0,0,0.2);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: visible;
    justify-content: space-between;
}
.vd-history-result video {
    width: 200px; height: 120px;
    border-radius: var(--radius-sm);
    background: #000;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.vd-history-result video:hover {
    transform: scale(1.03);
    box-shadow: 0 0 12px rgba(139,92,246,0.5);
}
.vd-video-wrap {
    position: relative;
    flex-shrink: 0;
}
.vd-video-wrap video { cursor: pointer; }
.vd-download-btn {
    position: absolute;
    bottom: 4px; right: 4px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.75);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    text-decoration: none;
    z-index: 3;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}
.vd-download-btn:hover { background: rgba(0,0,0,0.9); }
.vd-history-result-info { flex: 1; font-size: 11px; color: var(--text-muted); display: flex; flex-direction: column; gap: 3px; }
.vd-history-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.vd-history-tag { padding: 2px 5px; background: rgba(139,92,246,0.12); color: var(--violet); border-radius: 4px; font-size: 10px; font-family: 'Orbitron', monospace; }
.vd-history-cost { color: var(--amber); font-weight: 700; }
.vd-history-status { display: flex; align-items: center; gap: 4px; }
.vd-history-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); }
.vd-history-status-dot.success { background: var(--success); box-shadow: 0 0 5px var(--success-glow); }
.vd-history-status-dot.failed { background: var(--danger); }
.vd-history-status-dot.processing { background: var(--amber); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* Skeleton loader */
.vd-history-loading { display: flex; flex-direction: column; gap: 10px; }
.vd-skeleton {
    background: linear-gradient(90deg,
        rgba(0,229,255,0.04) 25%,
        rgba(0,229,255,0.08) 50%,
        rgba(0,229,255,0.04) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton-loading { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.vd-skeleton-card { height: 110px; }
.vd-skeleton-line { height: 12px; margin: 4px 0; }
.vd-skeleton-line.short { width: 55%; }

/* ==================== CONTACT ACTIONS ==================== */
.contact-actions { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.btn-add-contact {
    background: rgba(0,229,255,0.08);
    border: 1px solid rgba(0,229,255,0.15);
    border-radius: var(--radius-sm);
    color: var(--cyan);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 10px;
    transition: all 0.2s;
    font-family: 'Orbitron', monospace;
}
.btn-add-contact:hover { background: rgba(0,229,255,0.15); border-color: var(--cyan); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    :root { --sidebar-width: 180px; }
    .sidebar { width: var(--sidebar-width); }
    .sidebar .nav-item span:not(.icon) { font-size: 12px; }
    .main-content { margin-left: var(--sidebar-width); padding: 14px; }
}

@media (max-width: 576px) {
    :root {
        --header-h: 52px;
        --sidebar-width: 250px;
    }
    .header { padding: 0 12px; }
    .header-title { font-size: 13px; letter-spacing: 0.08em; }
    .hamburger-btn { display: flex; }

    .sidebar {
        width: var(--sidebar-width);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        top: var(--header-h);
        bottom: 0;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay { top: var(--header-h); bottom: 0; }
    .sidebar-overlay.hidden { display: none; }

    .main-content {
        margin-left: 0;
        margin-top: var(--header-h);
        padding: 10px;
    }
    .content-page { padding: 16px; border-radius: var(--radius-md); }
    .content-page h3 { font-size: 14px; }

    .login-container { margin: 10px; padding: 28px 20px; }

    .profile-card { flex-direction: column; gap: 16px; padding: 16px; }
    .profile-avatar { width: 70px; height: 70px; }
    .avatar-text { font-size: 26px; }
    .info-row label { width: 70px; font-size: 12px; }

    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding: 8px 8px; white-space: normal; word-break: break-all; }
    .data-table td { max-width: none; }
    .admin-toolbar .search-input { max-width: 100%; width: 100%; }

    #page-video-generate { padding: 0 !important; }
    .vd-gen-container { grid-template-columns: 1fr; height: auto; }
    .vd-gen-history-panel { min-height: 300px; }
    .vd-history-result video { width: 160px; height: 100px; cursor: pointer; }
    .vd-download-btn { opacity: 1; width: 24px; height: 24px; font-size: 12px; bottom: 2px; right: 2px; }

    .modal-content { max-width: 96vw; margin: 10px; border-radius: var(--radius-md); }
    #toast { left: 10px; right: 10px; bottom: 20px; }
    #toast .toast { max-width: 100%; }
}
