/* --- 窗口猫咪动画样式 START --- */

/* 引入字体 */
@import url("https://fonts.googleapis.com/css?family=Sanchez");

:root {
    --dark-brown: #2d2623;
    --dark-blue: #22366c;
    --light-blue: #439abf;
    --med-blue: #294679;
    --stars: #e9ae4b;
}

.cat-animation-container {
    /* 重设 cat-animation-container 的样式以适配 sidebar 卡片 */
    padding: 20px 0;
    /* 调整 padding 以包含动画 */
    margin-top: 1.5rem;
    /* 与上一个卡片保持距离 */
}

/* 仅对猫咪动画容器内的 H1 和 P 生效的样式 */
.cat-animation-container h1,
.cat-animation-container p {
    font-family: "Sanchez", serif;
    color: white;
    text-align: center;
    font-weight: 400;
    opacity: 0.7;
}

.cat-animation-container h1 {
    font-size: 30px;
    margin-bottom: 30px;
}

.cat-animation-container p {
    font-size: 14px;
    /* 字体略小，更好地适应侧边栏 */
    line-height: 1.2;
    margin-top: 20px;
    margin-bottom: 0;
}

.cat-animation-container p a:link,
.cat-animation-container p a:active,
.cat-animation-container p a:visited {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted;
    border-bottom-color: inherit;
    opacity: 0.6;
    transition: all 0.1s linear;
}

.cat-animation-container p a:link:hover {
    opacity: 1;
}

/* 窗口主体，进行缩放以适应 300px 侧边栏 */
.cat-animation-container .window {
    /* 缩放窗口以适应侧边栏宽度 */
    transform: scale(0.85);
    transform-origin: top center;
    margin: 0 auto;
    /* 原始样式开始 */
    width: 275px;
    height: 440px;
    background-color: var(--med-blue);
    border: 18px solid var(--dark-brown);
    position: relative;
    border-bottom: none;
}

.cat-animation-container .window:before {
    background-color: var(--dark-brown);
    width: calc(100% + 68px);
    height: 18px;
    left: -34px;
    bottom: 0;
    border-top: 6px solid var(--dark-blue);
}

.cat-animation-container .window:after {
    width: calc(100% + 18px);
    height: 6px;
    background-color: var(--light-blue);
    bottom: 12px;
    left: -9px;
}

.cat-animation-container .window-details {
    position: relative;
    height: 12px;
    width: 100%;
    top: 190px;
    background-color: var(--dark-brown);
}

.cat-animation-container .window-details:before,
.cat-animation-container .window-details:after {
    border: 6px solid var(--light-blue);
    width: 100%;
    border-top: none;
}

.cat-animation-container .window-details:before {
    height: 190px;
    top: -190px;
}

.cat-animation-container .window-details:after {
    height: 208px;
    bottom: -208px;
    border-bottom: none;
}

.cat-animation-container .mountains-left,
.cat-animation-container .mountains-right {
    position: absolute;
    bottom: 18px;
    width: 0;
    height: 0;
    border-bottom: 60px solid var(--dark-blue);
}

.cat-animation-container .mountains-left {
    left: 6px;
    border-right: 22px solid transparent;
}

.cat-animation-container .mountains-right {
    right: 6px;
    border-left: 22px solid transparent;
}

.cat-animation-container .mountains-left:before,
.cat-animation-container .mountains-left:after,
.cat-animation-container .mountains-right:before {
    width: 0;
    height: 0;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-bottom: 60px solid var(--dark-blue);
}

.cat-animation-container .mountains-left:before {
    left: 22px;
}

.cat-animation-container .mountains-right:before {
    right: 0px;
}

.cat-animation-container .moon {
    background-color: var(--stars);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    position: absolute;
    left: 35px;
    top: 35px;
}

.cat-animation-container .moon:before {
    background-color: var(--med-blue);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    position: absolute;
    left: 12px;
    top: 4px;
}

.cat-animation-container .star,
.cat-animation-container .star:before,
.cat-animation-container .star:after {
    background-color: var(--stars);
    position: absolute;
    border-radius: 50%;
}

.cat-animation-container .star-glow {
    animation: glow ease-in-out infinite alternate;
}

.cat-animation-container .star-1 {
    width: 8px;
    height: 8px;
    top: 230px;
    left: 50%;
    animation-duration: 5s;
}

.cat-animation-container .star-1:before {
    width: 4px;
    height: 4px;
    left: -90px;
    top: 60px;
    animation: glow ease-in-out infinite alternate;
    animation-duration: 6s;
}

.cat-animation-container .star-1:after {
    width: 3px;
    height: 3px;
    left: 80px;
    top: 10px;
    animation: glow ease-in-out infinite alternate;
    animation-duration: 2s;
}

.cat-animation-container .star-2 {
    width: 4px;
    height: 4px;
    top: 30px;
    left: 50%;
    animation-duration: 8s;
}

.cat-animation-container .star-2:before {
    width: 4px;
    height: 4px;
    left: 70px;
    top: 80px;
    animation: glow ease-in-out infinite alternate;
    animation-duration: 4s;
}

.cat-animation-container .star-2:after {
    width: 4px;
    height: 4px;
    left: -80px;
    top: 100px;
    animation: glow ease-in-out infinite alternate;
    animation-duration: 3s;
}

.cat-animation-container .star-3 {
    width: 6px;
    height: 6px;
    top: 215px;
    left: 45px;
}

.cat-animation-container .star-3:before {
    width: 3px;
    height: 3px;
    top: 54px;
    left: 75px;
}

.cat-animation-container .star-3:after {
    width: 3px;
    height: 3px;
    top: 10px;
    left: 140px;
}

.cat-animation-container .star-4 {
    width: 3px;
    height: 3px;
    top: 20px;
    left: 100px;
}

.cat-animation-container .star-4:before {
    width: 6px;
    height: 6px;
    top: 32px;
    left: -18px;
}

.cat-animation-container .star-4:after {
    width: 3px;
    height: 3px;
    top: 135px;
    left: -35px;
}

.cat-animation-container .star-5 {
    width: 3px;
    height: 3px;
    top: 40px;
    left: 210px;
}

.cat-animation-container .star-5:before {
    width: 3px;
    height: 3px;
    top: 110px;
    left: 10px;
}

@keyframes glow {

    0%,
    50% {
        box-shadow: 0px 0px 0px 0px var(--stars);
    }

    80%,
    100% {
        box-shadow: 0px 0px 8px 2px var(--stars);
    }
}

.cat-animation-container .clouds {
    background-color: var(--dark-blue);
    width: 180px;
    height: 12px;
    position: absolute;
    left: 25px;
    top: 74px;
    border-radius: 14px;
}

.cat-animation-container .clouds:before,
.cat-animation-container .clouds:after,
.cat-animation-container .clouds span {
    height: inherit;
    border-radius: inherit;
    background-color: inherit;
    position: absolute;
}

.cat-animation-container .clouds:before {
    width: 95px;
    top: 24px;
    left: 35px;
}

.cat-animation-container .clouds:after {
    width: 55px;
    top: -24px;
    left: 100px;
}

.cat-animation-container .clouds span:first-child {
    width: 55px;
    top: -12px;
    left: 100px;
}

.cat-animation-container .clouds span:nth-child(2) {
    width: 70px;
    top: 12px;
    left: 35px;
}

.cat-animation-container .clouds span:before,
.cat-animation-container .clouds span:after {
    height: inherit;
    border-radius: 14px;
    background-color: var(--med-blue);
    width: 40px;
}

.cat-animation-container .clouds span:before {
    left: -20px;
}

.cat-animation-container .clouds span:after {
    right: -25px;
}

.cat-animation-container .cat {
    background-color: var(--dark-brown);
    z-index: 100;
    position: absolute;
    bottom: 0;
    left: 90px;
    animation: breathe-belly 8s ease infinite;
}

.cat-animation-container .cat-body {
    position: absolute;
    width: 45px;
    height: 125px;
    border-top-left-radius: 45px;
    border-top-right-radius: 45px;
    background-color: inherit;
    bottom: 0;
    transform-origin: left bottom;
    animation: breathe-body 8s ease infinite;
}

@keyframes breathe-body {

    0%,
    5%,
    100% {
        height: 125px;
    }

    20%,
    55% {
        height: 125px;
    }

    60%,
    90% {
        height: 88px;
    }
}

.cat-animation-container .cat-belly {
    background-color: inherit;
    position: absolute;
    width: 85px;
    height: 85px;
    bottom: 0;
    border-radius: 50%;
    transform-origin: left bottom;
}

.cat-animation-container .cat-belly:before {
    background-color: inherit;
    width: 12px;
    height: 100px;
    top: 73px;
    right: 14px;
    border-radius: 12px;
}

@keyframes breathe-belly {

    0%,
    20%,
    50%,
    100% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.02);
    }
}

.cat-animation-container .cat-ears:before {
    width: 0;
    height: 0;
    border-bottom: 30px solid var(--dark-brown);
    border-right: 35px solid transparent;
    top: -10px;
}

.cat-animation-container .cat-ears:after {
    width: 0;
    height: 0;
    border-bottom: 30px solid var(--dark-brown);
    border-left: 35px solid transparent;
    top: -10px;
    right: 0;
}

/* --- 窗口猫咪动画样式 END --- */
.cat-animation-container .window {
    /* 缩放窗口以适应侧边栏宽度 */
    transform: scale(0.9); /* ⬅️ 只需修改这里喵！ */
    transform-origin: top center;
    margin: 0 auto;
    /* ... 保持其他样式不变 ... */
}