/* =========================================================
   Global Theme Variables (SINGLE SOURCE OF TRUTH)
   ========================================================= */

:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --primary: #000000;
    --primary-text: #ffffff;
    --border: rgba(0, 0, 0, 0.1);
    --muted: rgba(0, 0, 0, 0.6);
}

body.theme-dark {
    --bg: #0b0b0b;
    --text: #f5f5f5;
    --primary: #ffffff;
    --primary-text: #000000;
    --border: rgba(255, 255, 255, 0.15);
    --muted: rgba(255, 255, 255, 0.6);
}

/* =========================================================
   Base Reset
   ========================================================= */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

/* =========================================================
   Dot Background
   ========================================================= */

.dot-pattern {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-size: 20px 20px;
}

body.theme-light .dot-pattern {
    background-image: radial-gradient(
        circle,
        rgba(0, 0, 0, 0.7) 1px,
        transparent 1px
    );
}

body.theme-dark .dot-pattern {
    background-image: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.4) 1px,
        transparent 1px
    );
}

/* =========================================================
   Layout
   ========================================================= */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.container.narrow {
    max-width: 720px;
}

.site-main {
    min-height: calc(100vh - 200px);
}

/* =========================================================
   Header / Navigation
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

body.theme-light .site-header {
    background: rgba(255, 255, 255, 0.75);
    border-bottom: 1px solid var(--border);
}

body.theme-dark .site-header {
    background: rgba(10, 10, 10, 0.75);
    border-bottom: 1px solid var(--border);
}

.nav {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    text-decoration: none;
    color: inherit;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    font-size: 0.95rem;
    color: inherit;
    opacity: 0.85;
}

.nav-links a:hover {
    opacity: 1;
}

/* Mobile toggle hidden by default */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 1rem;
    cursor: pointer;
}

/* =========================================================
   Toggle Buttons (Theme / Lang)
   ========================================================= */

.toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle:hover {
    background: var(--primary);
    color: var(--primary-text);
    border-color: var(--primary);
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
    margin-top: 120px;
    padding: 40px 0;
    font-size: 0.85rem;
    opacity: 0.75;
}

body.theme-light .site-footer {
    border-top: 1px solid var(--border);
}

body.theme-dark .site-footer {
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* footer link reset */
.site-footer a {
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
}

.site-footer a:hover {
    opacity: 1;
}

.footer-beian {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-beian img {
    width: 16px;
    height: 16px;
}

/* =========================================================
   Hero Section
   ========================================================= */

.hero {
    padding: 120px 0;
    text-align: center;
}

.hero-orb {
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
    border-radius: 50%;
    background: var(--primary);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    color: var(--muted);
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-text);
}

.btn-primary:hover {
    opacity: 0.85;
}

/* =========================================================
   Features
   ========================================================= */

.features {
    padding: 80px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* =========================================================
   Page / Pricing
   ========================================================= */

.page {
    padding: 80px 0;
}

.center {
    text-align: center;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.pricing-card {
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.pricing-card.featured {
    border: 2px solid var(--primary);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .nav-links {
        gap: 12px;
    }
    
}

@media (max-width: 768px) {

    /* Show hamburger */
    .nav-toggle {
        display: block;
    }

    /* Collapse nav */
    .nav-links {
        position: absolute;
        top: 64px;
        right: 0%;


        flex-direction: column;
        align-items: flex-start;
        gap: 12px;

        padding: 16px 20px;
        background: var(--bg);
        border-bottom: 1px solid var(--border);

        display: none;
    }

    /* When open */
    .nav-links.open {
        display: flex;
    }
}





/* =========================================================
   Product Section
   ========================================================= */

.product-section {
    padding: 5px 0;
    text-align: center;
}

.section-title {
    font-size: 2.4rem;
    margin-bottom: 5px;
}

/* =========================================================
   Pillar System (3D Cylinder)
   ========================================================= */

.pillar-wrapper {
    position: relative;
    width: 100%;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    overflow: hidden;
}

/* Core rotating system */
.pillar-inner {
    --w: clamp(160px, 32vw, 240px);
    --h: 180px;
    --radius: clamp(90px, 22vw, 180px);
    --rotateX: -14deg;
    --perspective: 1200px;

    position: relative;
    width: var(--w);
    height: var(--h);

    transform-style: preserve-3d;
    transform: perspective(var(--perspective)) rotateX(var(--rotateX));
    animation: pillar-rotate 26s linear infinite;
}

/* Rotation animation */
@keyframes pillar-rotate {
    from {
        transform:
            perspective(var(--perspective))
            rotateX(var(--rotateX))
            rotateY(0deg);
    }
    to {
        transform:
            perspective(var(--perspective))
            rotateX(var(--rotateX))
            rotateY(360deg);
    }
}

/* Each card */
.pillar-card {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;

    transform:
        rotateY(calc((360deg / var(--quantity)) * var(--index)))
        translateZ(var(--radius));
}

/* Card face */
.pillar-face {
    width: 100%;
    height: 100%;
    padding: 20px;

    border-radius: 16px;
    border: 1px solid var(--border);

    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;

    transform: translateZ(1px);
}

body.theme-dark .pillar-face {
    background: rgba(20, 20, 20, 0.35);
}

/* Text inside */
.pillar-face h3 {
    margin: 0;
    font-size: 1.2rem;
}

.pillar-face p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted);
}

/* =========================================================
   Product Description
   ========================================================= */

.product-desc {
    max-width: 680px;
    margin: 40px auto 32px;
    color: var(--muted);
}

/* =========================================================
   Responsive Adjustments
   ========================================================= */

@media (max-width: 768px) {
    .pillar-wrapper {
        height: 320px;
    }

    .pillar-inner {
        --w: clamp(140px, 60vw, 180px);
        --radius: clamp(70px, 30vw, 120px);
        --rotateX: -10deg;
    }

    .pillar-face {
        padding: 16px;
    }
}



/* =========================================================
   About Page
   ========================================================= */

.about-page h1 {
    font-size: 2.4rem;
    margin-bottom: 16px;
}

.about-intro {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--muted);
}

.about-header {
    margin-bottom: 64px;
}

.about-section {
    margin-bottom: 64px;
}

.about-section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
}

/* Principles */

.principles-list {
    list-style: none;
    padding-left: 0;
}

.principles-list li {
    margin-bottom: 12px;
    font-size: 1rem;
}

/* =========================================================
   Timeline (Core)
   ========================================================= */

.timeline {
    position: relative;
    padding-left: 120px;
    margin-top: 32px;
}

/* Vertical line */
.timeline::before {
    content: "";
    position: absolute;
    left: 72px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

/* Row */
.timeline-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 36px;
}

/* Time (left) */
.timeline-time {
    width: 72px;
    text-align: right;
    padding-right: 20px;
    font-size: 0.85rem;
    color: var(--muted);
    flex-shrink: 0;
}

/* Content (right) */
.timeline-content {
    font-size: 1rem;
    line-height: 1.6;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 640px) {
    .timeline {
        padding-left: 0;
    }

    .timeline::before {
        display: none;
    }

    .timeline-row {
        flex-direction: column;
        gap: 6px;
    }

    .timeline-time {
        width: auto;
        text-align: left;
        padding-right: 0;
        font-size: 0.8rem;
    }
}


/* =========================================================
   Auth Pages (Login / Register)
   ========================================================= */

.auth-page {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg);
}

body.theme-dark .auth-card {
    background: rgba(20, 20, 20, 0.85);
}

.auth-title {
    font-size: 1.8rem;
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--muted);
    text-align: center;
    margin-bottom: 32px;
}

/* Form */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-form label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    gap: 8px;
}

.auth-form input {
    padding: 12px 14px;
    font-size: 0.95rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: inherit;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Alerts */

.auth-alert {
    font-size: 0.9rem;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.auth-alert-error {
    background: rgba(200, 60, 60, 0.12);
    color: #c43c3c;
}

/* Footer */

.auth-footer {
    margin-top: 32px;
    font-size: 0.9rem;
    text-align: center;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Mobile */

@media (max-width: 480px) {
    .auth-card {
        padding: 32px 24px;
    }
}


