:root {
    --primary: #ff0055;
    --secondary: #00f0ff;
    --tertiary: #ffe600;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    background-color: #05050a;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 240, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(255, 0, 85, 0.08) 0%, transparent 50%);
    color: #fff;
    font-family: 'Noto Sans SC', sans-serif;
    min-height: 100vh;
    overflow-y: hidden;
    position: relative;
    user-select: none;
    /* 使用绝对定位替代容易在旧版或特定缩放下失效的Flex居中 */
}


/* 流体彩色背景（极致性能优化版） */
.liquid-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    /* 移除掉帧杀手 filter: blur()，改用径向渐变模拟柔光边缘 */
}

.color-blob {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    will-change: transform;
}

.cb-1 {
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(255,0,85,0.7) 0%, transparent 60%);
    top: -10%; left: -10%;
}

.cb-2 {
    width: 70vw; height: 70vw;
    background: radial-gradient(circle, rgba(0,240,255,0.6) 0%, transparent 60%);
    bottom: -20%; right: -10%;
    animation-delay: -5s;
}

.cb-3 {
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(255,230,0,0.5) 0%, transparent 60%);
    top: 30%; left: 30%;
    animation-delay: -10s;
}

/* --- 顶部怒气仪表盘 --- */
.anger-meter-container {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    padding: 0 5vw;
    box-sizing: border-box;
    max-width: 500px;
    z-index: 100;
    text-align: center;
    pointer-events: none;
    animation: slideDown 0.5s ease-out;
}

.anger-label {
    font-size: 0.95rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(255, 0, 85, 0.8);
    letter-spacing: 2px;
    white-space: nowrap;
}

.anger-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.anger-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00f0ff, #ff0055, #ffe600);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.1s ease-out, box-shadow 0.1s;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.5);
    animation: flowBg 2s linear infinite;
}

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

@keyframes slideDown {
    0% { top: -50px; opacity: 0; }
    100% { top: 20px; opacity: 1; }
}

/* --- 核心赛博玻璃主控台 --- */
.cyber-glass-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    /* 核心3D悬浮透视设置（JS会动态修改 rotateX/Y） */
    transform: translate(-50%, -50%) perspective(1500px) rotateX(0deg) rotateY(0deg);
    width: 92vw;
    max-width: 760px;
    max-height: 85vh; /* 给顶部怒气条留空间 */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    
    /* 极其纯粹的高级玻璃质感 */
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.01) 100%);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 28px;
    box-shadow: 
        0 40px 80px rgba(0,0,0,0.7),
        inset 0 0 20px rgba(255,255,255,0.05),
        inset 0 0 80px rgba(0, 240, 255, 0.05);
        
    z-index: 10;
    padding: 2.5rem 2.5rem;
    text-align: center;
    /* 取消JS接管后的过渡，保证极其丝滑的跟手感 */
    will-change: transform;
}

/* 赛博朋克发光滚动条 */
.cyber-glass-panel::-webkit-scrollbar {
    width: 6px;
}
.cyber-glass-panel::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    margin: 20px 0;
}
.cyber-glass-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.3);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}
.cyber-glass-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.8);
}


.slime-content {
    position: relative;
    z-index: 2;
    padding: 1rem 0; /* 留出一点上下呼吸空间 */
}

.liquid-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 900;
    background: linear-gradient(to right, #fff, #00f0ff, #ff0055);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 5px 15px rgba(0, 240, 255, 0.4));
    letter-spacing: 2px;
}

.sarcastic-subtitle {
    font-size: 1.1rem;
    color: #eee;
    font-weight: bold;
    margin-bottom: 2rem;
}

/* 受理范围声明栏 */
.rules-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 2rem;
    text-align: left;
}

.rule {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    border-left: 4px solid transparent;
}

.rule.reject { border-left-color: #ff3333; }
.rule.accept { border-left-color: var(--secondary); }

.r-head {
    font-size: 1.1rem;
    font-weight: 900;
    margin-bottom: 5px;
}

.rule.reject .icon { color: #ff3333; }
.rule.accept .icon { color: var(--secondary); }

.rule p {
    font-size: 0.95rem;
    color: #ddd;
    line-height: 1.6;
}

.rule span {
    color: #888;
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 4px;
}

/* 高级嘲讽对话框 */
.mocking-chat {
    background: rgba(0,0,0,0.4);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    font-size: 0.9rem;
    color: #aaa;
}

.bot-avatar {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px var(--secondary));
}

.chat-bubble {
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    width: fit-content;
    line-height: 1.5;
}

.chat-bubble.bot {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(255, 0, 85, 0.1));
    border-left: 3px solid var(--secondary);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    color: #fff;
}

.popIn-1 { animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both; }
.popIn-2 { animation: popInAlt 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both; }

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

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

/* 搞怪复选框 */
.gag-checklist {
    text-align: left;
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 2rem;
}

.list-title {
    color: var(--tertiary);
    font-weight: 900;
    margin-bottom: 1rem;
}

.check-item {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #ddd;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.check-item input[type="checkbox"] {
    width: 24px; height: 24px;
    flex-shrink: 0;
}

/* 高级定制化复选框 */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 26px !important; height: 26px !important;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 6px;
    background: rgba(0,0,0,0.3);
    position: relative;
    outline: none;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.custom-checkbox:checked {
    background: var(--tertiary);
    border-color: var(--tertiary);
    box-shadow: 0 0 15px rgba(255, 230, 0, 0.5);
    transform: scale(1.1);
}

.custom-checkbox:checked::after {
    content: '✔';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 18px;
    font-weight: 900;
}

#dodge-container {
    transition: transform 0.1s;
    display: inline-block;
}

/* 操作区 */
.action-box {
    margin-top: 2rem;
    position: relative;
}

.hint {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 1rem;
}

.liquid-btn {
    background: linear-gradient(45deg, var(--primary), #ff6600);
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    color: #fff;
    font-weight: 900;
    font-size: 1.2rem;
    box-shadow: 0 10px 20px rgba(255, 0, 85, 0.4);
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    position: relative;
}

.liquid-btn:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

/* 蟑螂分身按钮（散开的假按钮） */
.roach-clone {
    position: fixed;
    background: var(--primary);
    border: 2px solid #fff;
    padding: 10px 20px;
    border-radius: 20px;
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 10000;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    animation: scurry 2s linear infinite;
}

@keyframes scurry {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(10deg) scale(0.9); }
    50% { transform: rotate(-10deg) scale(1.1); }
    75% { transform: rotate(15deg) scale(0.9); }
    100% { transform: rotate(0deg) scale(1); }
}

/* 屏幕裂痕特效 */
.screen-crack {
    position: absolute;
    pointer-events: none;
    z-index: 50;
    font-size: 4rem;
    text-shadow: 0 0 10px rgba(255,255,255,0.8); /* 用 text-shadow 代替极其卡顿的 drop-shadow */
    animation: fadeCrack 2s forwards;
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
}

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

/* 脏话掉落：赛博霓虹故障风 */
.swear-word {
    position: absolute;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 900;
    font-style: italic;
    pointer-events: none;
    z-index: 9999;
    color: #fff;
    /* 红蓝错位故障阴影 */
    text-shadow: 
        -3px -3px 0 rgba(255, 0, 85, 0.8), 
        3px 3px 0 rgba(0, 240, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    will-change: transform, opacity;
}

/* 震动特效（双类名解决回流卡顿） */
.shake-active-1 { animation: shake-smash 0.3s cubic-bezier(.36,.07,.19,.97); }
.shake-active-2 { animation: shake-smash-alt 0.3s cubic-bezier(.36,.07,.19,.97); }

@keyframes shake-smash {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    20% { transform: translate(-15px, -10px) rotate(-3deg); filter: invert(20%); }
    40% { transform: translate(15px, 10px) rotate(2deg); }
    60% { transform: translate(-10px, 15px) rotate(-2deg); filter: blur(2px); }
    80% { transform: translate(10px, -15px) rotate(3deg); }
}

@keyframes shake-smash-alt {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    20% { transform: translate(15px, 10px) rotate(3deg); filter: invert(20%); }
    40% { transform: translate(-15px, -10px) rotate(-2deg); }
    60% { transform: translate(10px, -15px) rotate(2deg); filter: blur(2px); }
    80% { transform: translate(-10px, 15px) rotate(-3deg); }
}

/* UI破坏特效 */
.breakable {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.knocked {
    transform: rotate(calc(var(--rot) * 1deg)) translate(calc(var(--tx) * 1px), calc(var(--ty) * 1px)) !important;
    opacity: 0.8;
}

/* 连击Combo特效 */
#combo-display {
    position: fixed;
    top: 20%; right: 10%;
    font-family: 'Oswald', 'Noto Sans SC', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 10vw, 5rem);
    color: #ffe600;
    text-shadow: 4px 4px 0 #ff0055, 0 0 20px #ff0055;
    pointer-events: none;
    z-index: 999999;
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
}

.combo-pop-1 { animation: comboPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.combo-pop-2 { animation: comboPopAlt 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }

@keyframes comboPop {
    0% { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    30% { opacity: 1; transform: scale(1.5) rotate(5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes comboPopAlt {
    0% { opacity: 0; transform: scale(0.5) rotate(10deg); }
    30% { opacity: 1; transform: scale(1.5) rotate(-5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* 移动端专属自适应逻辑：解决手机端气泡过小、内容被裁切问题 */
@media (max-width: 768px) {
    .cyber-glass-panel {
        width: 96vw;
        padding: 3rem 2rem;
        border-radius: 20px;
    }
    .anger-label {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }
    .liquid-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }
    .sarcastic-subtitle {
        font-size: 0.9rem;
    }
    .rules-container {
        gap: 8px;
    }
    .rule {
        padding: 12px;
    }
    .rule p {
        font-size: 0.85rem;
    }
    .chat-bubble {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    .gag-checklist {
        padding: 1.2rem;
    }
    .check-item {
        font-size: 0.85rem;
    }
    .custom-checkbox {
        width: 22px !important; 
        height: 22px !important;
    }
    .custom-checkbox:checked::after {
        font-size: 14px;
    }
    .liquid-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}


