/* ----------------------------------------------------
 * ColorTap 公用 CSS 文件
 * 确保所有主页和子页风格一致 (直角风格、深色主题、紫色背景动效)
 * ---------------------------------------------------- */

/* ---------- 1. Variables & Reset ---------- */
:root {
    --bg: #000;
    --fg: #fff;
    --muted: rgba(255, 255, 255, 0.75);
    --glass: rgba(255, 255, 255, 0.04);
    --accent: #fff;
    --radius: 0; /* 直角风格 */
    --gap: 24px;
    --max-width: 1100px;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: var(--bg);
    color: var(--fg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    scroll-behavior: smooth;
    position: relative;
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    display: block
}

.muted {
    color: var(--muted)
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%
}

/* ---------- 2. Header & Navigation (直角化) ---------- */
header {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    z-index: 60;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3));
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.logo {
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 18px;
}

/* 桌面导航链接 */
nav.desktop {
    display: flex;
    gap: 10px;
    align-items: center
}

nav.desktop a {
    font-size: 14px;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: var(--radius);
}

nav.desktop a:hover {
    color: var(--fg);
    background: var(--glass);
}

/* 按钮 (直角化) */
.cta-primary,
.cta-ghost {
    border-radius: var(--radius);
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: var(--fg)
}

.cta-primary {
    background: var(--fg);
    color: var(--bg);
    padding: 10px 18px
}

.cta-primary:hover {
    opacity: 0.95
}

/* 子导航栏 (仅主页使用) */
.nav-item {
    position: relative;
}

.nav-item > a {
    display: block;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 0;
    min-width: 180px;
    z-index: 100;
    border-radius: var(--radius);
}

.submenu a {
    padding: 8px 16px;
    white-space: nowrap;
    display: block;
    color: var(--muted);
}

.submenu a:hover {
    background: var(--glass);
    color: var(--fg);
}

.nav-item:hover .submenu {
    display: block;
}

/* Mobile toggle */
.mobile-toggle {
    display: none
}

/* ---------- 3. General Content & Typography ---------- */
section {
    padding: 84px 20px
}

.inner {
    max-width: var(--max-width);
    margin: 0 auto
}

h1 {
    font-size: 48px; /* 子页面标题 */
    font-weight: 800;
}

h2 {
    font-size: 28px;
    margin: 0 0 12px 0
}

.lead {
    color: var(--muted);
    margin-bottom: 18px
}

/* 卡片/容器 (直角化) */
.card {
    background: rgba(255, 255, 255, 0.02);
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.03)
}

/* ---------- 4. 主页 - Hero 区域 ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 80px;
}

.hero-inner {
    max-width: 920px
}

.hero h1 {
    margin: 0;
    font-size: clamp(36px, 6.5vw, 72px);
    line-height: 1.02;
    letter-spacing: -1px;
    font-weight: 800;
}

.hero p {
    margin-top: 18px;
    color: var(--muted);
    font-size: 18px;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.hero .actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap
}

/* ---------- 5. 主页 - Features Grid ---------- */
.features {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, 1fr)
}

.feature {
    background: rgba(255, 255, 255, 0.02);
    padding: 18px;
    border-radius: var(--radius); /* 直角化 */
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.feature svg {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    opacity: 0.95
}

.feature h3 {
    margin: 0;
    font-size: 16px
}

.feature p {
    margin: 6px 0 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5
}

/* ---------- 6. 主页 - Dynamic Flow Showcase ---------- */
.dynamic-flow-showcase {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    gap: 24px;
    margin-top: 40px;
}

.media-display {
    background: var(--glass);
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
}

#flow-image-placeholder {
    min-height: 250px;
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}

.qna-card {
    background: var(--glass);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.qna-prompt {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--fg);
}

.qna-response {
    background: rgba(255, 255, 255, 0.02);
    padding: 6px 10px;
    font-size: 14px;
    margin-bottom: 12px;
    border-left: 3px solid var(--accent);
}

.qna-status {
    text-align: center;
    margin-top: 15px;
    font-style: italic;
    font-size: 14px;
}

.flow-steps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: var(--radius);
}

.step-item:hover,
.step-item.active {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--fg);
}

.step-item .num {
    font-weight: 700;
    font-size: 16px;
    display: block;
    margin-bottom: 4px;
}

.step-item p {
    font-size: 13px;
    margin: 0;
    color: var(--muted);
}

/* ---------- 7. 主页 - Organizers & Pricing ---------- */
.row {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 28px;
    align-items: start
}

.price {
    font-size: 24px;
    font-weight: 700
}

/* ---------- 8. 子页面 - Detail Layout ---------- */
.main-content-section {
    padding-top: 100px;
    padding-bottom: 80px;
    min-height: 100vh;
}

.sub-page-title {
    font-size: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-weight: 800;
}

.detail-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.detail-section h2 {
    margin-top: 0;
    font-size: 24px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    padding: 10px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.sidebar li a {
    color: var(--muted);
    display: block;
    padding: 5px 0;
}

.sidebar li a:hover {
    color: var(--fg);
}

/* ---------- 9. Footer ---------- */
footer {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px
}

/* ---------- 10. 背景动画 (紫色浮动圆圈) ---------- */
.purple-bg-animation {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: #544984;
    opacity: 0.2;
    filter: blur(80px);
    animation: float 20s infinite ease-in-out alternate;
}

.c1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-duration: 25s;
}

.c2 {
    width: 450px;
    height: 450px;
    bottom: 15%;
    right: 10%;
    background: #6b5c96;
    animation-duration: 30s;
}

.c3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 40%;
    background: #453a70;
    animation-duration: 18s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-50px, 30px) scale(1.1);
    }

    66% {
        transform: translate(40px, -60px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* ---------- 11. Subtle Animations (主页用) ---------- */
.reveal {
    opacity: 0;
    transform: translateY(8px);
    animation: reveal 700ms ease forwards
}

.reveal.delay-1 {
    animation-delay: 120ms
}

.reveal.delay-2 {
    animation-delay: 240ms
}

.reveal.delay-3 {
    animation-delay: 360ms
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: none
    }
}

/* ---------- 12. Responsive Media Queries ---------- */
@media (max-width:960px) {
    .features {
        grid-template-columns: 1fr
    }

    .row {
        grid-template-columns: 1fr
    }

    nav.desktop {
        display: none
    }

    .mobile-toggle {
        display: block;
        background: transparent;
        border: 0;
        color: var(--fg);
        font-size: 20px
    }

    /* 流程展示适配移动端 */
    .dynamic-flow-showcase {
        grid-template-columns: 1fr;
        grid-template-areas:
      "steps"
      "qna"
      "media";
    }

    .media-display {
        grid-area: media;
    }

    .interactive-qna {
        grid-area: qna;
    }

    .flow-steps-list {
        grid-area: steps;
    }

    /* 子页面布局适配 */
    .detail-section {
        grid-template-columns: 1fr;
    }
    .sub-page-title {
        font-size: 36px;
    }
}

@media (max-width:520px) {
    .hero p {
        font-size: 15px
    }
}

/* ---------- 13. Reduced motion ---------- */
@media (prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important
    }

    .circle {
        animation: none;
    }
}