/* AAPS Site - 简洁科技感设计 */
:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #111638;
    --bg-card: #1a1f4e;
    --text-primary: #e8eaf6;
    --text-secondary: #9fa8da;
    --accent-blue: #448aff;
    --accent-cyan: #00e5ff;
    --accent-green: #69f0ae;
    --gradient-main: linear-gradient(135deg, #448aff, #00e5ff);
    --gradient-hero: linear-gradient(135deg, #0a0e27 0%, #1a237e 50%, #0a0e27 100%);
    --danger: #ff5252;
    --warning: #ffd740;
    --success: #69f0ae;
    --border: rgba(68, 138, 255, 0.2);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* === Navigation === */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-cyan);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* === Hero Section === */
.hero {
    min-height: 100vh;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(68, 138, 255, 0.08), transparent 70%);
    top: -200px;
    right: -200px;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.06), transparent 70%);
    bottom: -100px;
    left: -100px;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero .en-title {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--accent-cyan);
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.hero .cn-title {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.hero .subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 15px rgba(68, 138, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(68, 138, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
}

.btn-secondary:hover {
    background: rgba(0, 229, 255, 0.1);
    transform: translateY(-2px);
}

/* === Sections === */
section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* === Product Cards === */
.products {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.product-card {
    display: flex;
    align-items: center;
    gap: 40px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 36px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.product-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 8px 30px rgba(68, 138, 255, 0.1);
    transform: translateY(-3px);
}

.product-card.reverse {
    flex-direction: row-reverse;
}

.product-image {
    flex: 0 0 220px;
    height: 180px;
    background: var(--bg-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    flex: 1;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--accent-cyan);
}

.product-info .tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 10px;
    background: rgba(68, 138, 255, 0.15);
    color: var(--accent-blue);
    margin-bottom: 10px;
}

.product-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.product-arrow {
    color: var(--accent-cyan);
    font-size: 1.5rem;
    font-weight: 700;
}

/* === Features Grid === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-3px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* === Target Audience === */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.audience-item {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--border);
}

.audience-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.audience-item h4 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.audience-item p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* === Security Section === */
.security {
    text-align: center;
    padding: 60px 20px;
}

.security-box {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(105, 240, 174, 0.2);
}

.security-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.security-box h3 {
    color: var(--accent-green);
    margin-bottom: 8px;
}

.security-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* === Footer === */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 20px 20px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-col h4 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.footer-col p,
.footer-col a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
}

.footer-col a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* === Guide Page === */
.steps {
    counter-reset: step;
    max-width: 700px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    align-items: flex-start;
}

.step-num {
    flex: 0 0 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* === FAQ === */
.faq-item {
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-question {
    padding: 18px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 500;
    user-select: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--accent-cyan);
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    padding: 0 24px 18px;
    max-height: 300px;
}

/* === Download Page === */
.download-list {
    display: grid;
    gap: 16px;
    max-width: 700px;
    margin: 0 auto;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid var(--border);
    transition: all 0.3s;
    gap: 16px;
}

.download-item:hover {
    border-color: var(--accent-blue);
}

.download-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.download-info .meta {
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.download-info .meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-download {
    flex-shrink: 0;
    padding: 8px 20px;
    border-radius: 20px;
    background: var(--gradient-main);
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(68, 138, 255, 0.4);
}

.loading-downloads {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* === Dashboard === */
.dashboard {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border);
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.kpi-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Rules list */
.rules-list {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.rules-list h3 {
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--accent-cyan);
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rule-item:last-child {
    border-bottom: none;
}

.rule-name {
    min-width: 100px;
    font-size: 0.88rem;
}

.rule-bar-bg {
    flex: 1;
    height: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.rule-bar {
    height: 100%;
    background: var(--gradient-main);
    border-radius: 10px;
    transition: width 0.5s;
}

.rule-count {
    min-width: 40px;
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* BG Trend Chart */
.chart-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.chart-container h3 {
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--accent-cyan);
}

/* User table */
.user-table-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    overflow-x: auto;
    margin-bottom: 30px;
}

.user-table-container h3 {
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--accent-cyan);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: var(--text-secondary);
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-active {
    background: rgba(105, 240, 174, 0.15);
    color: var(--success);
}

.status-trial {
    background: rgba(255, 215, 64, 0.15);
    color: var(--warning);
}

.status-dry_run {
    background: rgba(68, 138, 255, 0.15);
    color: var(--accent-blue);
}

.status-offline {
    background: rgba(255, 82, 82, 0.15);
    color: var(--danger);
}

/* Logs */
.log-list {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}

.log-list h3 {
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--accent-cyan);
}

.log-entry {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    gap: 12px;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: var(--text-secondary);
    flex-shrink: 0;
    font-family: monospace;
}

.log-action {
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.log-detail {
    color: var(--text-secondary);
    word-break: break-all;
}

/* Auth error */
.auth-error {
    text-align: center;
    padding: 60px 20px;
}

.auth-error h2 {
    color: var(--danger);
    margin-bottom: 12px;
}

.auth-error p {
    color: var(--text-secondary);
}

/* === Responsive === */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(10, 14, 39, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .product-card,
    .product-card.reverse {
        flex-direction: column;
    }

    .product-image {
        flex: none;
        width: 100%;
        height: 160px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    section {
        padding: 60px 16px;
    }

    .download-item {
        flex-direction: column;
        text-align: center;
    }

    .download-info .meta {
        justify-content: center;
    }

    .step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .step-num {
        flex: none;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 260px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 80px 16px 40px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .products {
        gap: 24px;
    }

    .product-card {
        padding: 20px;
    }
}
