:root {
    --bg: #f5f0eb;
    --text-dark: #3d3226;
    --text-light: #fefefe;
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.16);
    --shadow-expand: 0 12px 36px rgba(0, 0, 0, 0.2);
    --transition-ease: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-out: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 主容器：固定高度，防止内容撑开导致跳动 */
.circles-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    /*gap: 16px;*/
    /*padding: 10px 4px;*/
    /* 固定高度 = 内部wrapper最大高度 + 上下padding，确保不跳动 */
    height: 240px;  /* 180 + 30*2 */
    overflow: visible;
    position: relative;
    z-index: 1;
    transition: none; /* 禁止容器自身高度变化 */
}

/* 每个圆形词语的包裹层：固定宽高，内部圆形居中，展开时不会改变外部尺寸 */
.circle-wrapper {
    position: relative;
    z-index: 1;
    transition: z-index 0.1s step-end;
    display: flex;
    align-items: center;
    justify-content: space-around;
    /* 固定宽高与展开后的最大尺寸匹配，彻底消除跳动 */
    /*height: 200px;*/
    flex-shrink: 0;
    padding: 0 2px;
}
.circle-wrapper:first-of-type {
    padding-left: 0;
}
.circle-wrapper:last-of-type {
    padding-right: 0;
}

.circle-wrapper:hover {
    z-index: 100;
    transition: z-index 0.1s step-start;
}

/* 圆形/胶囊形主体 */
.circle-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition:
            width var(--transition-ease),
            height var(--transition-ease),
            border-radius var(--transition-ease),
            box-shadow var(--transition-ease),
            transform 0.25s ease;
    border: #42919e 2px solid;
}

.circle-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    z-index: 0;
    transition: border-radius var(--transition-ease);
}

.circle-item::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: inherit;
    background: transparent;
    z-index: -1;
    opacity: 0;
    transition:
            opacity 0.35s ease,
            border-radius var(--transition-ease),
            inset 0.35s ease;
    pointer-events: none;
    box-shadow: 0 0 0 0 transparent;
}

.circle-wrapper:hover .circle-item::after {
    opacity: 1;
    inset: -10px;
    box-shadow: 0 0 30px 8px rgba(66, 145, 158, 0.25);
}

/* hover展开状态（圆形变为胶囊） */
.circle-wrapper:hover .circle-item {
    width: 42px;
    height: 220px;
    border-radius: 31px;
    box-shadow: var(--shadow-expand);
    transform: translateY(0);
    transition:
            width var(--transition-ease),
            height var(--transition-ease),
            border-radius var(--transition-ease),
            box-shadow var(--transition-ease),
            transform 0.25s ease;
}

/* 链接主体 */
.word-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 2;
    border-radius: inherit;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    user-select: none;
}

.word-link:focus-visible {
    outline: 2px dashed rgba(66, 145, 158, 0.6);
    outline-offset: 4px;
    border-radius: 50%;
}

.circle-wrapper:hover .word-link:focus-visible {
    border-radius: 31px;
}

/* 单字显示 */
.char-single {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text-light);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    opacity: 1;
    transition: opacity 0.2s ease 0.05s;
    pointer-events: none;
    z-index: 3;
    line-height: 1;
}

.circle-wrapper:hover .char-single {
    opacity: 0;
    transition: opacity 0.15s ease 0s;
}

/* 完整词语竖排显示 */
.chars-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 8px 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.35em;
    color: var(--text-light);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
    opacity: 0;
    transition: opacity 0.2s ease 0s;
    pointer-events: none;
    z-index: 3;
    line-height: 1.35;
    writing-mode: vertical-rl;
    text-orientation: upright;
    gap: 2px;
}

.circle-wrapper:hover .chars-full {
    opacity: 1;
    transition: opacity 0.3s ease 0.12s;
}

.chars-full span {
    display: block;
    line-height: 1.3;
}

.circle-wrapper:hover .word-link {
    cursor: pointer;
}

/* 点击反馈波纹 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple-anim 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes ripple-anim {
    to {
        transform: scale(3.5);
        opacity: 0;
    }
}

.circle-wrapper .circle-item { background: rgba(66, 145, 158, 0.45); }
.circle-wrapper:hover .circle-item { background: rgba(66, 145, 158, 0.75); }
.circle-wrapper:hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(66, 145, 158, 0.75); }

/* ========== 14个圆形各自的配色 ========== */
/*.circle-wrapper:nth-child(1) .circle-item { background: linear-gradient(145deg, #f7a8b8, #e8879a); }
.circle-wrapper:nth-child(1):hover .circle-item { background: linear-gradient(160deg, #f9b5c3, #e67d92); }
.circle-wrapper:nth-child(1):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(240, 140, 160, 0.35); }

.circle-wrapper:nth-child(2) .circle-item { background: linear-gradient(145deg, #7ec8a0, #4ea878); }
.circle-wrapper:nth-child(2):hover .circle-item { background: linear-gradient(160deg, #8dd4ad, #3d9a65); }
.circle-wrapper:nth-child(2):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(90, 175, 120, 0.35); }

.circle-wrapper:nth-child(3) .circle-item { background: linear-gradient(145deg, #f0b87d, #d99050); }
.circle-wrapper:nth-child(3):hover .circle-item { background: linear-gradient(160deg, #f5c692, #d08040); }
.circle-wrapper:nth-child(3):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(210, 140, 70, 0.35); }

.circle-wrapper:nth-child(4) .circle-item { background: linear-gradient(145deg, #a8c8f0, #7a9fd4); }
.circle-wrapper:nth-child(4):hover .circle-item { background: linear-gradient(160deg, #b8d4f6, #6b8fc8); }
.circle-wrapper:nth-child(4):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(120, 155, 210, 0.35); }

.circle-wrapper:nth-child(5) .circle-item { background: linear-gradient(145deg, #c9b8e8, #a48cd0); }
.circle-wrapper:nth-child(5):hover .circle-item { background: linear-gradient(160deg, #d5c6f0, #9378c6); }
.circle-wrapper:nth-child(5):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(155, 130, 200, 0.35); }

.circle-wrapper:nth-child(6) .circle-item { background: linear-gradient(145deg, #f7c8d8, #e8a0b5); }
.circle-wrapper:nth-child(6):hover .circle-item { background: linear-gradient(160deg, #fad4e1, #e290a8); }
.circle-wrapper:nth-child(6):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(230, 150, 175, 0.35); }

.circle-wrapper:nth-child(7) .circle-item { background: linear-gradient(145deg, #d8e8f0, #b0ccde); }
.circle-wrapper:nth-child(7):hover .circle-item { background: linear-gradient(160deg, #e4f0f6, #9fbed4); }
.circle-wrapper:nth-child(7):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(170, 195, 215, 0.35); }

.circle-wrapper:nth-child(8) .circle-item { background: linear-gradient(145deg, #f0d890, #dbbf60); }
.circle-wrapper:nth-child(8):hover .circle-item { background: linear-gradient(160deg, #f5e0a0, #d0b050); }
.circle-wrapper:nth-child(8):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(210, 175, 80, 0.35); }

.circle-wrapper:nth-child(9) .circle-item { background: linear-gradient(145deg, #98c8a0, #68a878); }
.circle-wrapper:nth-child(9):hover .circle-item { background: linear-gradient(160deg, #a8d8b0, #559868); }
.circle-wrapper:nth-child(9):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(100, 160, 115, 0.35); }

.circle-wrapper:nth-child(10) .circle-item { background: linear-gradient(145deg, #88c0d8, #5a9ab5); }
.circle-wrapper:nth-child(10):hover .circle-item { background: linear-gradient(160deg, #98d0e4, #4a8aa5); }
.circle-wrapper:nth-child(10):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(90, 150, 180, 0.35); }

.circle-wrapper:nth-child(11) .circle-item { background: linear-gradient(145deg, #e8d8f0, #c8b0d8); }
.circle-wrapper:nth-child(11):hover .circle-item { background: linear-gradient(160deg, #f0e4f6, #bca0cc); }
.circle-wrapper:nth-child(11):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(190, 160, 210, 0.35); }

.circle-wrapper:nth-child(12) .circle-item { background: linear-gradient(145deg, #a0c8d8, #709eb0); }
.circle-wrapper:nth-child(12):hover .circle-item { background: linear-gradient(160deg, #b0d4e2, #608ea0); }
.circle-wrapper:nth-child(12):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(110, 155, 175, 0.35); }

.circle-wrapper:nth-child(13) .circle-item { background: linear-gradient(145deg, #e0a088, #c87860); }
.circle-wrapper:nth-child(13):hover .circle-item { background: linear-gradient(160deg, #e8b098, #b86850); }
.circle-wrapper:nth-child(13):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(195, 120, 90, 0.35); }

.circle-wrapper:nth-child(14) .circle-item { background: linear-gradient(145deg, #d8a898, #c08068); }
.circle-wrapper:nth-child(14):hover .circle-item { background: linear-gradient(160deg, #e2b8a8, #b07058); }
.circle-wrapper:nth-child(14):hover .circle-item::after { box-shadow: 0 0 32px 10px rgba(185, 120, 95, 0.35); }*/

/* 底部提示 */
.hint-text {
    margin-top: 24px;
    font-size: 0.85rem;
    color: #b0a090;
    letter-spacing: 0.08em;
    text-align: center;
    user-select: none;
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 0.5s;
}

.hint-text .icon-mouse {
    display: inline-block;
    animation: float-icon 2s ease-in-out infinite;
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ========== 响应式设计（同步调整容器高度及wrapper尺寸） ========== */
@media (max-width: 1100px) {
    .circles-container {
        height: 205px;  /* 155 + 25*2 */
        gap: 12px;
        padding: 25px 16px;
    }
    .circle-wrapper {
        width: 54px;
        height: 155px;
    }
    .circle-item {
        width: 50px;
        height: 50px;
    }
    .circle-wrapper:hover .circle-item {
        width: 54px;
        height: 150px;
        border-radius: 27px;
    }
    .char-single {
        font-size: 1.7rem;
    }
    .chars-full {
        font-size: 1.3rem;
        letter-spacing: 0.3em;
        inset: 6px 0;
    }
    .circle-wrapper:hover .circle-item::after {
        inset: -8px;
    }
}

@media (max-width: 768px) {
    .circles-container {
        height: 173px;  /* 133 + 20*2 */
        gap: 10px;
        padding: 20px 10px;
    }
    .circle-wrapper {
        width: 46px;
        height: 133px;
    }
    .circle-item {
        width: 42px;
        height: 42px;
    }
    .circle-wrapper:hover .circle-item {
        width: 46px;
        height: 128px;
        border-radius: 23px;
    }
    .char-single {
        font-size: 1.45rem;
    }
    .chars-full {
        font-size: 1.1rem;
        letter-spacing: 0.25em;
        inset: 5px 0;
    }
    .circle-wrapper:hover .circle-item::after {
        inset: -6px;
    }
    .page-title {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    .hint-text {
        font-size: 0.75rem;
        margin-top: 16px;
    }
}

@media (max-width: 480px) {
    .circles-container {
        height: 145px;  /* 115 + 15*2 */
        gap: 8px;
        padding: 15px 6px;
    }
    .circle-wrapper {
        width: 40px;
        height: 115px;
    }
    .circle-item {
        width: 36px;
        height: 36px;
    }
    .circle-wrapper:hover .circle-item {
        width: 40px;
        height: 110px;
        border-radius: 20px;
    }
    .char-single {
        font-size: 1.2rem;
    }
    .chars-full {
        font-size: 0.95rem;
        letter-spacing: 0.2em;
        inset: 4px 0;
    }
    .circle-wrapper:hover .circle-item::after {
        inset: -5px;
    }
    .page-title {
        font-size: 1.1rem;
        letter-spacing: 0.1em;
    }
    .hint-text {
        font-size: 0.7rem;
    }
}

/* 移动端触摸展开（通过JS添加class模拟hover） */
.circle-wrapper.touch-expanded {
    z-index: 100 !important;
}
.circle-wrapper.touch-expanded .circle-item {
    width: 62px;
    height: 175px;
    border-radius: 31px;
    box-shadow: var(--shadow-expand);
}
.circle-wrapper.touch-expanded .char-single {
    opacity: 0;
    transition: opacity 0.15s ease 0s;
}
.circle-wrapper.touch-expanded .chars-full {
    opacity: 1;
    transition: opacity 0.3s ease 0.12s;
}
.circle-wrapper.touch-expanded .circle-item::after {
    opacity: 1;
    inset: -10px;
    box-shadow: 0 0 30px 8px rgba(180, 150, 120, 0.25);
}

@media (max-width: 1100px) {
    .circle-wrapper.touch-expanded .circle-item {
        width: 54px;
        height: 150px;
        border-radius: 27px;
    }
    .circle-wrapper.touch-expanded .circle-item::after {
        inset: -8px;
    }
}

@media (max-width: 768px) {
    .circle-wrapper.touch-expanded .circle-item {
        width: 46px;
        height: 128px;
        border-radius: 23px;
    }
    .circle-wrapper.touch-expanded .circle-item::after {
        inset: -6px;
    }
}

@media (max-width: 480px) {
    .circle-wrapper.touch-expanded .circle-item {
        width: 40px;
        height: 110px;
        border-radius: 20px;
    }
    .circle-wrapper.touch-expanded .circle-item::after {
        inset: -5px;
    }
}




.cooperation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr; /* 4列布局 */
    gap: 16px;
    max-width: 620px;
    width: 100%;
    margin-top: 24px;
}
.cooperation-grid .module-link {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-decoration: none;
    color: #334155;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px 16px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
}
.cooperation-grid .module-link:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: #42919e;
    background: #ffffff;
    box-shadow: 0 12px 24px -8px rgba(59, 130, 246, 0.25);
    color: #42919e;
}
.cooperation-grid .module-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    transition: height 0.3s ease;
}
.cooperation-grid .module-link:hover::after {
    height: 100%;
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.1), transparent);
    z-index: 0;
}