
:root {
    --bg: #eef6ff;
    --card: rgba(255, 255, 255, 0.92);
    --text: #172033;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-soft: #dbeafe;
    --line: #cbd5e1;
    --ok: #16a34a;
    --warn: #f59e0b;
    --danger: #dc2626;
    --shadow: 0 18px 60px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, "Microsoft JhengHei", "Noto Sans TC", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 32rem),
        linear-gradient(135deg, #f8fbff, var(--bg));
    line-height: 1.7;
}

a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    padding: 72px 0 34px;
}

.hero-card {
    background: var(--card);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 34px;
    padding: 42px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.hero-card::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 800;
    font-size: 14px;
}

h1 {
    font-size: clamp(32px, 6vw, 58px);
    line-height: 1.12;
    margin: 18px 0 14px;
    letter-spacing: -0.04em;
}

.subtitle {
    color: var(--muted);
    font-size: 19px;
    max-width: 780px;
    margin: 0;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 30px;
}

.meta-item {
    background: rgba(248, 250, 252, 0.86);
    border: 1px solid rgba(203, 213, 225, 0.7);
    border-radius: 20px;
    padding: 16px;
}

.meta-label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.meta-value {
    display: block;
    margin-top: 4px;
    font-weight: 900;
    word-break: break-word;
}

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(14px);
    background: rgba(248, 251, 255, 0.84);
    border-bottom: 1px solid rgba(203, 213, 225, 0.7);
}

.nav .container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 12px 0;
}

.nav a {
    white-space: nowrap;
    color: #334155;
    background: white;
    border: 1px solid rgba(203, 213, 225, 0.85);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
}

.section {
    padding: 34px 0;
}

.card {
    background: var(--card);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.section-title {
    margin: 0 0 18px;
    font-size: 30px;
    letter-spacing: -0.03em;
}

.section-title span {
    color: var(--primary);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.feature {
    background: #f8fafc;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 22px;
    padding: 20px;
}

.feature h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.feature p {
    margin: 0;
    color: #475569;
}

.screen-tag {
    color: var(--primary);
    font-weight: 900;
}

.code {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 18px;
    padding: 18px;
    overflow-x: auto;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 18px;
    overflow: hidden;
}

th, td {
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #eff6ff;
    color: #1e40af;
    font-weight: 900;
}

tr:last-child td {
    border-bottom: 0;
}

.screenshot {
    margin: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.screenshot img {
    display: block;
    width: 100%;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.screenshot figcaption {
    color: #475569;
    font-size: 14px;
    padding: 10px 4px 0;
    font-weight: 700;
}

.flow {
    display: grid;
    gap: 14px;
}

.flow-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    align-items: stretch;
}

.box {
    border: 2px solid #93c5fd;
    background: #eff6ff;
    color: #1e3a8a;
    border-radius: 18px;
    padding: 14px;
    text-align: center;
    font-weight: 900;
    min-height: 78px;
    display: grid;
    place-items: center;
}

.arrow {
    display: grid;
    place-items: center;
    color: var(--primary);
    font-weight: 900;
}

.diagram-note {
    color: var(--muted);
    margin-top: 12px;
}

.class-diagram {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.class-box {
    background: white;
    border: 2px solid #bfdbfe;
    border-radius: 18px;
    overflow: hidden;
}

.class-box h3 {
    background: #2563eb;
    color: white;
    margin: 0;
    padding: 12px 14px;
}

.class-box ul {
    margin: 0;
    padding: 14px 18px 18px 32px;
}

.timeline {
    counter-reset: step;
    display: grid;
    gap: 14px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    align-items: start;
}

.timeline-item::before {
    counter-increment: step;
    content: counter(step);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.footer {
    padding: 34px 0 60px;
    color: var(--muted);
    text-align: center;
}

.print-note {
    display: none;
}

@media (max-width: 900px) {
    .meta-grid,
    .grid-2,
    .grid-3,
    .class-diagram {
        grid-template-columns: 1fr;
    }

    .flow-row {
        grid-template-columns: 1fr;
    }

    .arrow {
        transform: rotate(90deg);
    }

    .hero-card {
        padding: 28px;
    }
}

@media print {
    body {
        background: white;
    }

    .nav {
        display: none;
    }

    .section {
        padding: 16px 0;
        page-break-inside: avoid;
    }

    .card, .hero-card {
        box-shadow: none;
    }

    .print-note {
        display: block;
    }
}
