:root {
    --c-primary: #2563eb;
    --c-primary-dark: #1d4ed8;
    --c-primary-light: #eff6ff;
    --c-accent: #f59e0b;
    --c-accent-dark: #d97706;
    --c-text: #1e293b;
    --c-text-muted: #64748b;
    --c-bg: #ffffff;
    --c-bg-gray: #f8fafc;
    --c-border: #e2e8f0;
    --c-success: #10b981;
    --c-danger: #ef4444;
    --radius-sm: 0.5rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: 0.2s ease;
}

* { box-sizing: border-box; }

body, html {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--c-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Banner ===== */
.page .btns > .btn--square:first-child {
    background: #00a4ff;
    border-color: #00a4ff;
}

/* ===== Section Headers ===== */
.sec-header {
    font-size: 2rem;
    font-weight: 700;
    color: var(--c-text);
    text-align: center;
    margin: 0 auto;
    position: relative;
    width: auto;
}
.sec-header::after {
    content: '';
    display: block;
    width: 3rem;
    height: 3px;
    background: var(--c-primary);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* ===== Service Section ===== */
.service {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 5rem 2rem;
    background: #fff;
}
.service__content {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}
.service__content li {
    width: auto;
    margin-right: 0;
    background: var(--c-bg-gray);
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
    border: 1px solid var(--c-border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.service__content li:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.service__content li:before {
    position: static;
    display: inline-block;
    width: 3.5rem;
    height: 3.5rem;
    transform: none;
    margin-bottom: 1rem;
    border-radius: var(--radius);
}
.service__content li header {
    padding: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-text);
}
.service__content li p {
    color: var(--c-text-muted);
    line-height: 1.7;
    height: auto;
    font-size: 0.9rem;
}
.service__content li:nth-child(n+4) { margin-right: 0; }

/* ===== Plan Section ===== */
.plan {
    padding: 5rem 8%;
    background: var(--c-bg-gray);
}
.plan__content {
    width: 100%;
    max-width: 1400px;
    margin: 3rem auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}
.plan-sec {
    width: auto;
    height: auto;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem 2.5rem;
    border: 1px solid var(--c-border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.plan-sec:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.plan-sec:nth-child(2) {
    border-color: var(--c-primary);
    box-shadow: var(--shadow-md);
}
.plan-sec header {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--c-text);
    padding: 0 0 1.5rem;
    text-align: center;
}
.plan-sec div[style] {
    height: auto !important;
    flex: 1;
}
.plan-sec ul { padding-left: 0; }
.plan-sec li {
    color: var(--c-text-muted);
    line-height: 2;
    padding-left: 1.75rem;
    position: relative;
    font-size: 0.9rem;
}
.plan-sec li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 0.35rem;
    height: 0.35rem;
    background: var(--c-primary);
    border-radius: 50%;
    transform: none;
}
.plan-sec p {
    color: var(--c-danger);
    margin: 1.5rem 0 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}
.plan-sec .font--large {
    font-size: 2.25rem;
    font-weight: 800;
}
.plan-sec .btn--round {
    background: var(--c-primary);
    border-radius: var(--radius);
    width: 100%;
    height: 2.75rem;
    line-height: 2.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}
.plan-sec .btn--round:hover {
    background: var(--c-primary-dark);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.plan-sec:nth-child(2) .btn--round {
    background: var(--c-accent);
}
.plan-sec:nth-child(2) .btn--round:hover {
    background: var(--c-accent-dark);
}
.plan-sec .btn--round a { color: #fff; }

/* ===== Comparison Section ===== */
.comparison {
    padding: 5rem 8%;
    background: #fff;
}
.comparison__content {
    margin: 3rem auto 0;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--c-border);
}
.comparison__content li {
    border: none;
    color: var(--c-text-muted);
    font-size: 0.9rem;
}
.comparison__content li header {
    height: 4.5rem;
    line-height: 4.5rem;
    width: auto;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--c-text);
    background: var(--c-bg-gray);
    border-bottom: 1px solid var(--c-border);
}
.comparison__content li:first-child header {
    background: #f1f5f9;
    color: var(--c-text-muted);
    text-align: left;
    padding-left: 1.5rem;
}
.comparison__content li p {
    padding: 1rem 0.75rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--c-border);
    text-align: center;
    margin: 0;
}
.comparison__content li p:nth-child(2n) { background: var(--c-bg-gray); }
.comparison__content li:last-child { border-right: none; }
.comparison__content li:first-child * { border-left: none; }
.comparison__content li:last-child * { border-right: none; }
.comparison__content li:first-child p {
    text-align: left;
    padding-left: 1.5rem;
    font-weight: 600;
    color: var(--c-text-muted);
}
/* Highlight Swoole Compiler column */
.comparison__content li:nth-child(2) {
    box-shadow: none;
    border-top: none;
    border-bottom: none;
    border-left: 2px solid var(--c-accent);
    border-right: 2px solid var(--c-accent);
    background: #fffbeb;
}
.comparison__content li:nth-child(2) * {
    border-left: none;
    border-right: none;
}
.comparison__content li:nth-child(3) *, .comparison__content li:nth-child(4) * {
    border-right: none;
}
.comparison__content li:nth-child(2) header {
    height: 4.5rem;
    line-height: 4.5rem;
    color: var(--c-accent-dark);
    background: #fffbeb;
    font-weight: 700;
    border-bottom: 1px solid #fde68a;
}
.comparison__content li:nth-child(2) header:before {
    content: '推荐';
    background: var(--c-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.7rem;
    width: auto;
    height: auto;
    padding: 0.15rem 0.6rem;
    line-height: 1.6;
    transform: none;
    left: 0.5rem;
    top: 0.5rem;
    border-radius: 3px;
}
.comparison__content li:nth-child(2) p {
    color: #92400e;
    background: #fffbeb;
}
.comparison__content li:nth-child(2) p:nth-child(odd) { background: #fffbeb; }
.comparison__content li:nth-child(2) p:nth-child(2n) { background: #fef3c7; }
.comparison__content li:nth-child(3) header, .comparison__content li:nth-child(4) header, .comparison__content li:nth-child(5) header {
    color: var(--c-text);
}
.comparison__content li:last-child { border-right: none; }

/* ===== Company Footer ===== */
.container--company {
    background: #0f172a;
}
.company {
    padding: 3.5rem 0 3rem;
}
.company__content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
.company__content a { color: #94a3b8; transition: color var(--transition); }
.company__content a:hover { color: #fff; }
.company__content .pros:after { border-color: rgba(255,255,255,0.2); }
.company > p { color: rgba(255,255,255,0.3); opacity: 1; }

/* ===== Responsive: Tablet (≤1024px) ===== */
@media (max-width: 1024px) {
    .service { padding: 4rem 5%; }
    .service__content { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .plan { padding: 4rem 5%; }
    .plan__content { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .comparison { padding: 4rem 5%; }
    .comparison__content { grid-template-columns: repeat(5, 1fr); }
    .comparison__content li header { font-size: 0.8rem; height: 4rem; line-height: 4rem; }
    .comparison__content li p { font-size: 0.75rem; padding: 0.75rem 0.5rem; }
    .comparison__content li:nth-child(2) header { height: 4rem; line-height: 4rem; }
}

/* ===== Responsive: Mobile (≤768px) ===== */
@media (max-width: 768px) {
    .sec-header { font-size: 1.5rem; }
    .service { padding: 3rem 5%; }
    .service__content { grid-template-columns: 1fr; gap: 1rem; }
    .service__content li { padding: 2rem 1.25rem 1.5rem; }
    .plan { padding: 3rem 5%; }
    .plan__content { grid-template-columns: 1fr; gap: 1rem; max-width: 400px; margin-left: auto; margin-right: auto; }
    .comparison { padding: 3rem 2%; }
    .comparison__content {
        display: flex;
        flex-wrap: nowrap;
        border-radius: var(--radius-sm);
    }
    .comparison__content li { flex: 1; min-width: 0; font-size: 0.7rem; }
    .comparison__content li header {
        font-size: 0.7rem;
        height: 3.5rem;
        line-height: 1.3;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.25rem;
        word-break: break-all;
    }
    .comparison__content li:first-child header { justify-content: flex-start; padding-left: 0.5rem; }
    .comparison__content li p { font-size: 0.65rem; padding: 0.5rem 0.25rem; }
    .comparison__content li:nth-child(2) header {
        height: 3.5rem;
        line-height: 1.3;
        font-size: 0.7rem;
    }
    .comparison__content li:nth-child(2) header:before {
        font-size: 0.5rem;
        top: 0.15rem;
        left: 0.15rem;
        padding: 0.1rem 0.35rem;
    }
}

/* ===== Responsive: Small Mobile (≤480px) ===== */
@media (max-width: 480px) {
    .comparison__content li header { font-size: 0.6rem; height: 3rem; line-height: 3rem; }
    .comparison__content li p { font-size: 0.6rem; padding: 0.4rem 0.15rem; }
    .comparison__content li:nth-child(2) header { height: 3rem; line-height: 3rem; font-size: 0.6rem; }
}
