body {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8efff 50%, #f5f8ff 100%);
    color: #1e293b;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
}

.slide {
    opacity: 0;
    visibility: hidden;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 0.5rem;
    bottom: 5rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    transform: scale(0.95) translateY(30px);
    transform-origin: center bottom;
}

.slide::-webkit-scrollbar { width: 6px; }
.slide::-webkit-scrollbar-track { background: rgba(37,99,235,0.05); border-radius: 10px; }
.slide::-webkit-scrollbar-thumb { background: rgba(37,99,235,0.2); border-radius: 10px; }

@media (min-width: 768px) {
    .slide {
        top: 1rem;
        bottom: 5.5rem;
        left: 4rem;
        right: 4rem;
        padding: 2rem 4rem;
    }
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    z-index: 10;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 2rem;
    box-shadow: 0 20px 60px -15px rgba(37, 99, 235, 0.1), 0 4px 20px rgba(0, 0, 0, 0.05);
}

.gradient-text {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(37, 99, 235, 0.15);
    color: #475569;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav-btn:hover:not(:disabled) {
    background: #2563eb;
    color: #ffffff;
    transform: scale(1.15) translateY(-50%);
    box-shadow: 0 10px 25px -3px rgba(37, 99, 235, 0.4);
    border-color: #2563eb;
}

.nav-btn:active:not(:disabled) {
    transform: scale(0.95) translateY(-50%);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.side-nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 1024px) {
    body:hover .side-nav:not(:disabled) { opacity: 0.5; }
    .side-nav:hover:not(:disabled) { opacity: 1 !important; }
}

@media (max-width: 1023px) {
    .side-nav { display: none !important; }
}

.grid-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: 50px 50px;
    background-image:
        linear-gradient(to right, rgba(37, 99, 235, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
    z-index: -1;
}

.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.45;
    animation: float 10s infinite alternate ease-in-out;
}

@keyframes float {
    0%   { transform: translateY(0) scale(1); }
    100% { transform: translateY(-20px) scale(1.05); }
}

/* Reusable card */
.info-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 1.25rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.info-card:hover {
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

/* Topic tag / pill */
.topic-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Section label above headings */
.section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 0.4rem;
}

/* Dark code block */
.code-block {
    background: #0f172a;
    border-radius: 0.75rem;
    padding: 1.1rem 1.4rem;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.7;
    color: #e2e8f0;
    border: 1px solid #1e293b;
}

.code-key    { color: #60a5fa; }
.code-string { color: #34d399; }
.code-comment { color: #64748b; font-style: italic; }

/* Numbered step circle */
.step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Screenshot placeholder */
.screenshot-ph {
    border: 2px dashed #cbd5e1;
    border-radius: 0.75rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    gap: 0.5rem;
    min-height: 130px;
    text-align: center;
}

/* Best-practice indicators */
.do-item   { border-left: 3px solid #22c55e; }
.dont-item { border-left: 3px solid #ef4444; }

/* Language switcher button */
.lang-btn.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Language content visibility */
body[data-lang="zh"] .en-only { display: none !important; }
body[data-lang="en"] .zh-only { display: none !important; }
