/* ═══════════════════════════════════════════════
   AcFun Aika — Global Styles
   Glassmorphism foundations, gradients, animations
   ═══════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─────────────────── */
:root {
    --glass-bg: rgba(30, 30, 45, 0.6);
    --glass-bg-strong: rgba(30, 30, 45, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-strong: rgba(255, 255, 255, 0.12);
    --glass-blur: blur(16px);
    --glass-blur-light: blur(8px);

    --gradient-primary: linear-gradient(135deg, #7e6fff 0%, #4a86ff 100%);
    --gradient-success: linear-gradient(135deg, #3dcb6c 0%, #2ecc71 100%);
    --gradient-warning: linear-gradient(135deg, #ffb545 0%, #ff9800 100%);
    --gradient-danger: linear-gradient(135deg, #ff3f5f 0%, #e74c3c 100%);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Glassmorphism Cards ───────────────────── */
.glass-card {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur) saturate(180%);
    -webkit-backdrop-filter: var(--glass-blur) saturate(180%);
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-lg) !important;
}

.glass-card-strong {
    background: var(--glass-bg-strong) !important;
    backdrop-filter: var(--glass-blur) saturate(180%);
    -webkit-backdrop-filter: var(--glass-blur) saturate(180%);
    border: 1px solid var(--glass-border-strong) !important;
    border-radius: var(--radius-lg) !important;
}

/* ─── App Bar Glass ─────────────────────────── */
.appbar-glass {
    background: rgba(26, 26, 39, 0.6) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2) !important;
}

/* ─── Drawer Glass ──────────────────────────── */
.drawer-glass {
    background: rgba(26, 26, 39, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: hidden;
}

/* ─── Footer Glass ──────────────────────────── */
.footer-glass {
    background: rgba(26, 26, 39, 0.4) !important;
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
    height: 32px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* ─── Gradient Accents ──────────────────────── */
.gradient-primary {
    background: var(--gradient-primary) !important;
    color: #ffffff !important;
}

.gradient-success {
    background: var(--gradient-success) !important;
    color: #ffffff !important;
}

.gradient-danger {
    background: var(--gradient-danger) !important;
    color: #ffffff !important;
}

/* ─── Login Overlay ─────────────────────────── */
.login-overlay {
    background: rgba(26, 26, 39, 0.92) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.login-card {
    background: rgba(30, 30, 45, 0.7) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--radius-xl) !important;
}

/* ─── Terminal / Console Glass ──────────────── */
.terminal-glass {
    background: rgba(15, 15, 25, 0.85) !important;
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: var(--radius-md) !important;
}

.terminal-inner {
    background: rgba(15, 15, 25, 0.5);
    font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ─── Status Indicators ─────────────────────── */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot-connected {
    background: #3dcb6c;
    box-shadow: 0 0 8px rgba(61, 203, 108, 0.5);
}

.status-dot-reconnecting {
    background: #ffb545;
    box-shadow: 0 0 8px rgba(255, 181, 69, 0.5);
    animation: pulse-dot 1.5s infinite;
}

.status-dot-disconnected {
    background: #ff3f5f;
    box-shadow: 0 0 8px rgba(255, 63, 95, 0.5);
}

/* ─── Animations ────────────────────────────── */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.08) 37%,
        rgba(255, 255, 255, 0.04) 63%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn var(--transition-normal) ease-out;
}

/* ─── Page Wrapper ──────────────────────────── */
.page-wrapper {
    padding-bottom: 40px; /* space for fixed footer */
}

/* ─── Breadcrumbs ───────────────────────────── */
.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 6px;
    font-size: 14px;
}

/* ─── Utility ───────────────────────────────── */
.text-mono {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
