/* ============================================================
   Nesror Apps · shared site styles
   Used by: ./index.html, ./localai/, ./smarthouse/, ./container/
   Accent is selected per page via body class:
     body.accent-blue  (LocalAI)   body.accent-green (SmartHouse)
     body.accent-cyan  (Droid Containers)
   ============================================================ */

:root {
    color-scheme: dark;
    --font: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    --bg: radial-gradient(circle at top, #0b1c36 0%, #0b1220 48%, #030712 100%);
    --card: rgba(15, 23, 42, 0.62);
    --card-border: rgba(148, 163, 184, 0.22);
    --border-soft: rgba(148, 163, 184, 0.2);
    --text: #e2e8f0;
    --muted: rgba(203, 213, 225, 0.75);
    --title: #f8fafc;
    --link: #7dd3fc;

    /* default accent: blue */
    --accent: #60a5fa;
    --accent-solid: #3b82f6;
    --accent-soft: rgba(59, 130, 246, 0.12);
    --accent-border: rgba(59, 130, 246, 0.42);
    --accent-cta: linear-gradient(135deg, #3b82f6, #2563eb);
    --accent-cta-glow: rgba(37, 99, 235, 0.4);
    --h1-grad: linear-gradient(120deg, #f8fafc 30%, #93c5fd 70%, #67e8f9);
}

body.accent-green {
    --accent: #4ade80;
    --accent-solid: #22c55e;
    --accent-soft: rgba(34, 197, 94, 0.12);
    --accent-border: rgba(34, 197, 94, 0.42);
    --accent-cta: linear-gradient(135deg, #22c55e, #15803d);
    --accent-cta-glow: rgba(22, 163, 74, 0.4);
    --h1-grad: linear-gradient(120deg, #f8fafc 30%, #bbf7d0 70%, #93c5fd);
}

body.accent-cyan {
    --accent: #22d3ee;
    --accent-solid: #06b6d4;
    --accent-soft: rgba(34, 211, 238, 0.12);
    --accent-border: rgba(34, 211, 238, 0.42);
    --accent-cta: linear-gradient(135deg, #06b6d4, #0891b2);
    --accent-cta-glow: rgba(6, 182, 212, 0.4);
    --h1-grad: linear-gradient(120deg, #f8fafc 30%, #a5f3fc 70%, #93c5fd);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---- language visibility ---- */
body.lang-en [lang="zh-CN"],
body.lang-zh [lang="en"] {
    display: none !important;
}

/* ---- aurora background ---- */
.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}
.aurora span {
    position: absolute;
    width: 46vmax;
    height: 46vmax;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.32;
    animation: drift 26s ease-in-out infinite alternate;
}
.aurora .a1 {
    background: radial-gradient(circle, #1d4ed8 0%, transparent 70%);
    top: -18vmax;
    left: -12vmax;
}
.aurora .a2 {
    background: radial-gradient(circle, #0e7490 0%, transparent 70%);
    bottom: -22vmax;
    right: -14vmax;
    animation-delay: -8s;
}
.aurora .a3 {
    background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
    top: 30%;
    left: 55%;
    animation-delay: -16s;
    opacity: 0.22;
}
@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(6vmax, 4vmax, 0) scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
    .aurora span { animation: none; }
}

/* ---- layout ---- */
.wrap {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 20px 56px;
}
.top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--accent);
    border: 1px solid var(--accent-border);
    background: var(--accent-soft);
    padding: 8px 15px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.back-link:hover {
    transform: translateX(-3px);
}
.lang-switch {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-soft);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
.lang-switch button {
    border: none;
    background: transparent;
    color: var(--muted);
    padding: 8px 15px;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}
.lang-switch button.active {
    background: var(--accent-cta);
    color: #ffffff;
}

/* ---- hero ---- */
.hero {
    text-align: center;
    padding: 46px 0 10px;
}
.app-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    border-radius: 24px;
    display: block;
    box-shadow: 0 22px 55px var(--accent-cta-glow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--accent-border);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
h1 {
    margin: 20px 0 0;
    font-size: clamp(2rem, 5.2vw, 3rem);
    line-height: 1.15;
    color: var(--title);
    background: var(--h1-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.tagline {
    margin: 16px auto 0;
    max-width: 660px;
    line-height: 1.85;
    color: var(--muted);
    font-size: 1.08rem;
}
.cta-row {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}
.cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.cta.primary {
    background: var(--accent-cta);
    color: #ffffff;
    border: none;
    box-shadow: 0 16px 40px var(--accent-cta-glow);
}
.cta.primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 55px var(--accent-cta-glow);
}
.cta.ghost {
    border: 1px solid var(--border-soft);
    background: rgba(226, 232, 240, 0.06);
    color: var(--text);
}
.cta.ghost:hover {
    transform: translateY(-4px);
    border-color: var(--accent-border);
}

/* ---- feature sections ---- */
section.block {
    margin-top: 44px;
}
section.block > h2 {
    text-align: center;
    margin: 0 0 22px;
    font-size: 1.5rem;
    color: var(--title);
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.feature {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px 22px;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.feature:hover {
    transform: translateY(-4px);
    border-color: var(--accent-border);
}
.feature .f-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    margin-bottom: 14px;
}
.feature .f-icon svg {
    width: 24px;
    height: 24px;
}
.feature h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: var(--title);
}
.feature p {
    margin: 0;
    line-height: 1.75;
    color: var(--muted);
    font-size: 0.95rem;
}

/* ---- note card (wide banner) ---- */
.note {
    margin-top: 44px;
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 22px 24px;
    background: linear-gradient(140deg, var(--accent-soft), rgba(15, 23, 42, 0.6));
    display: flex;
    gap: 18px;
    align-items: flex-start;
}
.note .f-icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
}
.note h3 {
    margin: 0 0 8px;
    color: var(--title);
    font-size: 1.1rem;
}
.note p {
    margin: 0;
    line-height: 1.8;
    color: var(--muted);
}
.note a {
    color: var(--link);
    text-decoration: none;
    font-weight: 600;
}
.note a:hover {
    text-decoration: underline;
}
.note img {
    border-radius: 12px;
}

/* ---- more links ---- */
.more-links {
    margin-top: 44px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.more-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 18px 20px;
    font-weight: 600;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}
.more-links a:hover {
    transform: translateX(4px);
    border-color: var(--accent-border);
    background: var(--accent-soft);
}
.more-links a span.arrow {
    color: var(--accent);
}

/* ---- footer ---- */
footer.site {
    margin-top: 40px;
    text-align: center;
    color: rgba(226, 232, 240, 0.55);
    font-size: 0.88rem;
    line-height: 1.8;
}
footer.site a {
    color: var(--link);
    text-decoration: none;
}
footer.site a:hover {
    text-decoration: underline;
}

/* ---- responsive ---- */
@media (max-width: 640px) {
    .wrap {
        padding: 16px 14px 44px;
    }
    .hero {
        padding-top: 30px;
    }
    .note {
        flex-direction: column;
    }
}
