:root {
    --font-body: 'Noto Sans SC', sans-serif;
    --font-display: 'ZCOOL KuaiLe', cursive;
    --font-pixel: 'VT323', monospace;
}

body {
    font-family: var(--font-body);
    transition: background-color 0.5s ease, color 0.5s ease;
    scroll-behavior: smooth;
}

.font-display { font-family: var(--font-display); }
.font-pixel { font-family: var(--font-pixel); }

.marquee-container { overflow: hidden; white-space: nowrap; }
.marquee-content { display: inline-block; animation: marquee 30s linear infinite; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.hover-card { transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.hover-card:hover { transform: translateY(-4px); }

.stars {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0));
    background-repeat: repeat; background-size: 200px 200px;
    opacity: 0; transition: opacity 0.5s;
}
.dark-mode .stars { opacity: 0.3; animation: twinkle 4s infinite; }
@keyframes twinkle { 0% { opacity: 0.3; } 50% { opacity: 0.5; } 100% { opacity: 0.3; } }

.dots-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1;
    background-image: radial-gradient(#E5E7EB 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    opacity: 0; transition: opacity 0.5s;
}
.light-mode .dots-bg { opacity: 1; }

.switch-cord {
    position: fixed; top: 0; right: 10%; z-index: 50;
    display: flex; flex-direction: column; align-items: center;
    cursor: pointer; transition: transform 0.2s;
}
.switch-cord:active { transform: translateY(10px); }
.cord-line { width: 2px; height: 80px; background: #999; margin: 0 auto; }
.cord-handle {
    width: 24px; height: 24px; border-radius: 50%;
    transition: all 0.3s;
}
.dark-mode .cord-handle {
    background-color: #333;
    border: 2px solid #FFF;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.light-mode .cord-handle {
    background-color: #F2F0D8;
    border: 2px solid #333;
    box-shadow: none;
}

.btn-retro {
    border-width: 2px; border-style: solid;
    box-shadow: 4px 4px 0px currentColor;
    transition: transform 0.1s, box-shadow 0.1s;
}
.btn-retro:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0px currentColor; }

.btn-terminal {
    border: 2px solid #58A498;
    background: linear-gradient(180deg, #142A2A, #0D1E1E);
    color: #BDF7E6;
    box-shadow: 4px 4px 0 #0A1414;
    transition: all 0.15s ease;
}
.btn-terminal:hover {
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 #0A1414;
}
.btn-terminal:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 #0A1414;
}

.lab-card {
    transition: all 0.25s ease;
}
.lab-card:hover {
    transform: translateY(-3px);
}

.badge-free {
    background: rgba(88,164,152,0.16);
    color: #58A498;
    border: 1px solid #58A498;
}
.badge-pro {
    background: rgba(234,182,149,0.16);
    color: #EAB695;
    border: 1px solid #EAB695;
}
.badge-soon {
    background: rgba(95,113,128,0.14);
    color: #5F7180;
    border: 1px solid #5F7180;
}

.arrow-btn {
    background: #EAB695;
    color: #23211F;
    transition: all 0.18s ease;
    box-shadow: 3px 3px 0 #000;
}
.arrow-btn:hover {
    transform: translate(-1px,-1px);
    box-shadow: 4px 4px 0 #000;
}
.arrow-btn:active {
    transform: translate(1px,1px) scale(0.98);
    box-shadow: 2px 2px 0 #000;
}

.divider-stripe {
    background: repeating-linear-gradient(
        45deg,
        rgba(234, 182, 149, 0.16),
        rgba(234, 182, 149, 0.16) 10px,
        rgba(88, 164, 152, 0.10) 10px,
        rgba(88, 164, 152, 0.10) 20px
    );
}

.tool-card-shell {
    position: relative;
    overflow: hidden;
}
.tool-card-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(234,182,149,0.07), transparent 40%, rgba(88,164,152,0.06));
    pointer-events: none;
}
.tool-card-shell::after {
    content: "";
    position: absolute;
    left: -20%;
    bottom: 0;
    width: 40%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(234,182,149,0.9), transparent);
    transition: transform 0.45s ease;
    transform: translateX(-120%);
}
.tool-card-shell:hover::after {
    transform: translateX(420%);
}

.tool-card-shell .icon-box,
.tool-card-shell .tool-tag,
.tool-card-shell .tool-cta {
    transition: all 0.25s ease;
}
.tool-card-shell:hover .icon-box {
    transform: translateY(-2px) rotate(-2deg);
}
.tool-card-shell:hover .tool-tag {
    transform: translateY(-1px);
    opacity: 1;
}
.tool-card-shell:hover .tool-cta {
    transform: translateY(-1px);
}

.tool-tag {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px dashed currentColor;
    line-height: 1;
    opacity: 0.82;
}

.lab-hero-grid {
    background-image:
      linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
    background-size: 18px 18px;
}

.lab-tab {
    transition: all 0.2s ease;
}
.lab-tab.active {
    transform: translateY(-1px);
    box-shadow: 0 4px 0 rgba(0,0,0,0.12);
}

.mini-console {
    border: 2px solid;
    border-radius: 18px;
    overflow: hidden;
}

.device-shell {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}
.device-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 18%, transparent 82%, rgba(0,0,0,0.05));
}

.complain-screen {
    position: relative;
    background:
      linear-gradient(rgba(255,255,255,0.02), rgba(255,255,255,0.02)),
      repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.04),
        rgba(255,255,255,0.04) 2px,
        transparent 2px,
        transparent 4px
      );
}
.complain-screen.scanning::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 26px;
    background: linear-gradient(180deg, rgba(57,255,20,0), rgba(57,255,20,0.15), rgba(57,255,20,0));
    animation: scan 1s linear infinite;
    pointer-events: none;
}
@keyframes scan {
    0% { top: -30px; }
    100% { top: calc(100% + 30px); }
}

.blink {
    animation: blink 1.2s infinite steps(2, start);
}
@keyframes blink {
    to { opacity: 0.35; }
}

.status-led {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.investment-card {
    transition: all 0.2s ease;
}
.investment-card:hover {
    transform: translateY(-2px);
}

.shake-soft {
    animation: shakeSoft 0.2s ease-in-out;
}
@keyframes shakeSoft {
    0% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    50% { transform: translateX(1px); }
    75% { transform: translateX(-1px); }
    100% { transform: translateX(0); }
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

@media (max-width: 768px) {
    .tool-card-shell:hover .icon-box,
    .tool-card-shell:hover .tool-tag,
    .tool-card-shell:hover .tool-cta {
        transform: none;
    }
}
