/**
 * 灯塔DNS拦截响应平台 - 自定义样式
 * 深色科技风格动画
 */

/* ============================================================
 *  基础样式
 * ============================================================ */
* {
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ============================================================
 *  背景粒子效果
 * ============================================================ */
#particles-bg {
    background: radial-gradient(ellipse at 20% 50%, rgba(14, 165, 233, 0.03) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(14, 165, 233, 0.02) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(14, 165, 233, 0.02) 0%, transparent 50%);
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(14, 165, 233, 0.3);
    border-radius: 50%;
    animation: particle-float linear infinite;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* ============================================================
 *  网格背景
 * ============================================================ */
.grid-bg {
    background-image: 
        linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ============================================================
 *  扫描线效果
 * ============================================================ */
.scanline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.3), transparent);
    animation: scanline 4s linear infinite;
}

@keyframes scanline {
    0% { top: 0; }
    100% { top: 100%; }
}

/* ============================================================
 *  发光效果
 * ============================================================ */
.glow-text {
    text-shadow: 0 0 10px rgba(14, 165, 233, 0.5),
                 0 0 20px rgba(14, 165, 233, 0.3),
                 0 0 40px rgba(14, 165, 233, 0.1);
}

.glow-border {
    box-shadow: 0 0 5px rgba(14, 165, 233, 0.2),
                inset 0 0 5px rgba(14, 165, 233, 0.1);
}

.glow-border:hover {
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.3),
                inset 0 0 10px rgba(14, 165, 233, 0.1);
}

/* ============================================================
 *  玻璃拟态效果
 * ============================================================ */
.glass {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.glass-light {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(51, 65, 85, 0.3);
}

/* ============================================================
 *  渐入动画
 * ============================================================ */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

.fade-in-left {
    animation: fadeInLeft 0.5s ease-out;
}

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

.fade-in-right {
    animation: fadeInRight 0.5s ease-out;
}

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

/* ============================================================
 *  脉冲圆环
 * ============================================================ */
.pulse-ring {
    position: relative;
}

.pulse-ring::before,
.pulse-ring::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid rgba(14, 165, 233, 0.3);
    border-radius: 50%;
    animation: pulse-ring 2s ease-out infinite;
}

.pulse-ring::after {
    animation-delay: 1s;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ============================================================
 *  打字机效果
 * ============================================================ */
.typewriter {
    overflow: hidden;
    border-right: 2px solid rgba(14, 165, 233, 0.7);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: rgba(14, 165, 233, 0.7); }
}

/* ============================================================
 *  加载动画
 * ============================================================ */
.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(14, 165, 233, 0.1);
    border-top-color: rgba(14, 165, 233, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================================
 *  聊天气泡
 * ============================================================ */
.chat-bubble-customer {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(14, 165, 233, 0.05));
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 16px 16px 4px 16px;
}

.chat-bubble-admin {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px 16px 16px 4px;
}

.chat-bubble-system {
    background: rgba(51, 65, 85, 0.3);
    border: 1px solid rgba(51, 65, 85, 0.3);
    border-radius: 12px;
}

/* ============================================================
 *  表单样式增强
 * ============================================================ */
.form-input {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    padding: 12px 16px;
    color: #f1f5f9;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: rgba(14, 165, 233, 0.5);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-input::placeholder {
    color: #64748b;
}

/* ============================================================
 *  按钮样式增强
 * ============================================================ */
.btn-primary {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: white;
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0369a1, #0284c7);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.5);
    color: #cbd5e1;
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.5);
    border-color: rgba(14, 165, 233, 0.3);
    color: #f1f5f9;
}

/* ============================================================
 *  状态标签
 * ============================================================ */
.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-expired {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-banned {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-pending {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ============================================================
 *  响应式优化
 * ============================================================ */
@media (max-width: 768px) {
    .glass {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}
