/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #8798b2;
    color: #1e293b;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 卡片容器 — 视窗单位与相对单位结合 */
.container { 
    max-width: 800px;
    width: 100%;
    background: rgb(160, 183, 205);
    border-radius: 32px;
    padding: clamp(1.5rem, 5vw, 3rem);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(2px);
}

/* 视窗相关的装饰元素 — 直观展示视口单位 */
.viewport-badge {
    display: inline-block;
    background: #c4c5cd;
    color: #4338ca;
    font-size: rem;
    font-weight: 600;
    padding: 0.3rem 0.9rem;
    border-radius: 100px;
    letter-spacing: 0.3px;
    border: 1px solid #c7d2fe;
    margin-bottom: 1.2rem;
    text-align: center;
}

h1 {
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    background: linear-gradient(145deg, #0f172a, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subhead {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: #475569;
    margin-bottom: 1.8rem;
    border-left: 4px solid #818cf8;
    padding-left: 1rem;
    font-weight: 400;
}

/* 网格卡片 — 使用视窗相对单位 (vw/vh) 做间距 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
    gap: clamp(1rem, 2.5vw, 1.8rem);
    margin: 2rem 0 1.5rem;
}

.feature-item {
    background: #f8fafc;
    border-radius: 20px;
    padding: 1.2rem 1rem;
    text-align: center;
    border: 1px solid #e9edf2;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01);
}
.feature-item:active {
    transform: scale(0.97); /* 点击时轻微缩放，增加反馈感 */
}

.feature-item:hover {
    background: #ffffff;
    border-color: #b9c7ff;
    transform: translateY(-4px);
    box-shadow: 0 8px 18px -8px rgba(79, 70, 229, 0.15);
}

.feature-item .icon {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    display: block;
    margin-bottom: 0.4rem;
}

.feature-item h3 {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    font-weight: 600;
    color: #0f172a;
}

.feature-item p {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.2rem;
}

.feature-item img {
    width: clamp(1.8rem, 4vw, 2.6rem);
    height: clamp(1.8rem, 4vw, 2.6rem);
    display: block;
    margin: 0 auto 0.4rem;
    object-fit: contain;
}

.feature-item .url {
    font-size: 0.85rem;
    color: #99b1d2;
    margin-top: 0.2rem;
    overflow-wrap: break-word;
}


/* 视口信息指示器 — 实时显示视窗尺寸 (用JS更新) */
.viewport-indicator {
    margin-top: 2rem;
    padding: 0.9rem 1.2rem;
    background: #f1f5f9;
    border-radius: 60px;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.2rem 2rem;
    font-size: 0.85rem;
    color: #1e293b;
    border: 1px solid #dce2ec;
    width: 100%;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.viewport-indicator span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.viewport-indicator .label {
    font-weight: 400;
    color: #64748b;
}

.viewport-indicator .value {
    background: #ffffff;
    padding: 0.15rem 0.8rem;
    border-radius: 40px;
    font-feature-settings: "tnum";
    border: 1px solid #d1d9e6;
    font-size: 0.85rem;
    min-width: 3.8rem;
    text-align: center;
}

/* 页脚 */
.footer-note {
    margin-top: 1.8rem;
    font-size: 0.8rem;
    color: #5c5c5c;
    text-align: center;
    border-top: 1px solid #e9edf2;
    padding-top: 1.5rem;
    width: 100%;
}
.footer-note a {
    color: inherit;          /* 继承父级颜色 */
    font-size: inherit;      /* 继承父级字号 */
    font-family: inherit;    /* 继承父级字体 */
    font-weight: inherit;    /* 继承父级字重 */
}


/* 视窗自适应演示小提示 */
.demo-hint {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    background: #f1f4fe;
    padding: 0.5rem 1.2rem;
    border-radius: 60px;
    color: #334155;
    font-size: 0.8rem;
    margin-top: 0.8rem;
    border: 1px solid #d9e2f0;
}

.demo-hint kbd {
    background: #0f172a;
    color: white;
    padding: 0.1rem 0.6rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
}


/* 自签文字 - 继承 footer-note 的样式 */
.soul-sign {
    overflow-wrap: break-word;
    font-size: 0.8rem;        /* 与 .footer-note 一致 */
    color: #747474;            /* 与 .footer-note 一致 */
    font-weight: 400;          /* 常规字重，避免过粗 */
    letter-spacing: 0.3px;     /* 微调字间距，更显精致 */
    display: inline-block;     /* 确保可设置边距 */
    margin-top: 0.2rem;        /* 与上方文字拉开距离 */
}


/* 响应式微调 */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .container {
        border-radius: 24px;
    }

    .viewport-indicator {
        flex-direction: column;
        gap: 0.6rem;
        align-items: stretch;
    }
}
/* 复制反馈动画 */
@keyframes fadeOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.95);
    }
}
