/* Game-center.CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', 'Quicksand', 'Comic Sans MS', cursive, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(145deg, #ffe9f4 0%, #f3d9ff 35%, #d4b5ff 70%, #ffcff2 100%);
    background-size: 400% 400%;
    animation: gradientShift 18s ease infinite;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-x: hidden;
}

/* 动态渐变背景 */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---------- 闪闪发光的星星背景 (增强版) ---------- */
.bg-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-stars::before,
.bg-stars::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        radial-gradient(2px 2px at 15% 30%, #fff9b0 100%, transparent),
        radial-gradient(4px 4px at 72% 45%, #ffb3de 90%, transparent),
        radial-gradient(6px 6px at 23% 82%, #ffffff 100%, transparent),
        radial-gradient(3px 3px at 91% 15%, #f5a3ff 100%, transparent),
        radial-gradient(5px 5px at 8% 62%, #ffc8f0 100%, transparent),
        radial-gradient(8px 8px at 44% 93%, #e6b0ff 100%, transparent),
        radial-gradient(10px 10px at 67% 78%, #fff7b0 90%, transparent),
        radial-gradient(7px 7px at 82% 57%, #ffb3d9 100%, transparent),
        radial-gradient(12px 12px at 36% 18%, #ffffff 100%, transparent),
        radial-gradient(9px 9px at 53% 63%, #ffd9b0 100%, transparent);
    background-repeat: repeat;
    opacity: 0.6;
    animation: starMove 28s linear infinite;
}

.bg-stars::after {
    background-image: 
        radial-gradient(3px 3px at 95% 68%, #ffe6ff 100%, transparent),
        radial-gradient(5px 5px at 53% 7%, #fedba0 100%, transparent),
        radial-gradient(7px 7px at 12% 49%, #ffc0e8 100%, transparent),
        radial-gradient(4px 4px at 28% 84%, #dab0ff 100%, transparent),
        radial-gradient(6px 6px at 71% 33%, #fff3c0 100%, transparent);
    opacity: 0.4;
    animation: starMove 22s linear infinite reverse;
}

@keyframes starMove {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(12deg) scale(1.2); }
}

/* 主面板 — 超萌彩虹糖毛玻璃 */
.game-center {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1300px;
    background: rgba(255, 240, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 80px 80px 60px 60px;
    padding: 2.5rem 2rem 2rem 2rem;
    box-shadow: 0 25px 40px rgba(210, 130, 255, 0.4),
                0 10px 20px rgba(255, 180, 230, 0.6),
                inset 0 0 30px rgba(255, 255, 255, 0.8);
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-top-color: #ffe8fd;
    border-left-color: #fff0fe;
    border-right-color: #fad6ff;
    border-bottom-color: #f0bcff;
}

/* 头部文字 闪闪亮 */
.header-text {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.header-text::before {
    content: '✧ ✦ ✧';
    font-size: 2rem;
    color: rgba(255, 200, 240, 0.8);
    position: absolute;
    top: -1.2rem;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: 10px;
    filter: drop-shadow(0 0 6px #fface0);
}

h1 {
    font-size: 3.2rem;
    font-weight: 800;
    background: linear-gradient(145deg, #ff7bcf, #b578ff, #80b3ff, #ff95c8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #ffb8ec, 2px 4px 10px rgba(255, 130, 200, 0.3);
    margin-bottom: 0.25rem;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 100% { transform: skew(0deg, 0deg); opacity: 1; }
    95% { transform: skew(2deg, 1deg); opacity: 0.9; text-shadow: 3px 0 #ffb0fe, -3px 0 #a4e0ff; }
    96% { transform: skew(-2deg, -0.5deg); }
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: #a06fc0;
    background: linear-gradient(90deg, #fff5fd, #ffeef9);
    display: inline-block;
    padding: 0.5rem 2.5rem;
    border-radius: 60px;
    box-shadow: 0 4px 0 #d49eff;
    border: 2px dotted #fcc1f0;
    backdrop-filter: blur(2px);
    letter-spacing: 2px;
    transform: rotate(-1deg);
}

/* 网格布局 — 花团锦簇 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.8rem;
    justify-content: center;
    margin-bottom: 2rem;
}

/* 卡片基本样式 — 每颗都是软糖 */
.card {
    background: rgba(255, 250, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 50px 50px 40px 40px;
    padding: 1.8rem 0.5rem 1.2rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 0 #f5c0e8, 0 18px 25px -8px #cf9eff;
    color: #553c6b;
    text-decoration: none;
    cursor: pointer;
    min-height: 180px;
    position: relative;
    overflow: hidden;
}

/* 卡片表面的亮晶晶圆点 */
.card::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, #fff9d0 5%, transparent 60%);
    opacity: 0.5;
    border-radius: 50%;
    pointer-events: none;
}

.card::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #ffcfef 5%, transparent 70%);
    opacity: 0.4;
    border-radius: 50%;
    pointer-events: none;
}

/* 可点击卡片悬停 — 蹦蹦跳跳 */
a.card:hover {
    transform: translateY(-12px) scale(1.05);
    background: rgba(255, 240, 255, 0.95);
    border-color: #ffe3fc;
    box-shadow: 0 15px 0 #f7abd0, 0 25px 30px -5px #c88eff;
}

a.card:active {
    transform: scale(0.97) translateY(4px);
    box-shadow: 0 5px 0 #f7abd0, 0 15px 20px -5px #c88eff;
}

/* 装饰卡片 — 轻飘飘梦幻风格 */
div.card.decorative {
    background: rgba(245, 225, 255, 0.5);
    border: 3px dashed #ffcce6;
    box-shadow: 0 8px 0 #e7b5dd, 0 12px 20px -8px #cb9bf0;
    cursor: default;
    color: #b48ac7;
    backdrop-filter: blur(4px);
    animation: float 4s ease-in-out infinite;
}

div.card.decorative i {
    opacity: 0.9;
    filter: drop-shadow(0 4px 6px #ffb8ec);
}

div.card.decorative span {
    font-weight: 500;
    background: rgba(255, 235, 255, 0.4);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px) rotate(1deg); }
    100% { transform: translateY(0px); }
}

/* 卡片内图标 — 多彩又闪亮 */
.card i {
    font-size: 4.2rem;
    margin-bottom: 0.7rem;
    filter: drop-shadow(0 8px 12px #feb3ff);
    color: #d68eff;
    transition: 0.2s;
    z-index: 2;
    position: relative;
}

a.card i {
    color: #bb7ae3;
    animation: none;
}

a.card:hover i {
    transform: scale(1.15) rotate(5deg);
    color: #f27ed0;
    filter: drop-shadow(0 0 15px #ffb3f0);
}

/* 个别图标颜色微调 (装饰卡片里不同图标不同色) */
.decorative i.fa-star { color: #fde26b; }
.decorative i.fa-candy-cane { color: #ff9292; }
.decorative i.fa-wand-sparkles { color: #cc8eff; }
.decorative i.fa-heart { color: #ffacc7; }

/* 卡片文字 */
.card span {
    font-size: 1.2rem;
    font-weight: 700;
    word-break: break-word;
    max-width: 100%;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 250, 250, 0.7);
    border-radius: 40px;
    line-height: 1.4;
    border: 1px solid #ffffff;
    box-shadow: 0 2px 0 #efc4f0;
    z-index: 2;
}

/* 脚注 — 更甜 */
.footer-note {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #aa73c7;
    background: rgba(255, 235, 250, 0.9);
    padding: 0.8rem 2rem;
    border-radius: 60px;
    width: fit-content;
    margin: 1.5rem auto 0;
    backdrop-filter: blur(2px);
    border: 3px solid white;
    box-shadow: 0 6px 0 #f4b8e9;
    transform: rotate(0.5deg);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-note i {
    color: #ff8fd0;
    font-size: 1.8rem;
    animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 响应式平板 */
@media (max-width: 800px) {
    .game-center {
        padding: 2rem 1.5rem;
        border-radius: 60px;
    }
    h1 {
        font-size: 2.5rem;
    }
    .subtitle {
        font-size: 1.3rem;
    }
    .games-grid {
        gap: 1.3rem;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
    .card i {
        font-size: 3.5rem;
    }
    .card span {
        font-size: 1rem;
    }
}

/* 手机小屏 */
@media (max-width: 500px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .card {
        padding: 1.5rem 0.3rem 1rem;
        min-height: 150px;
    }
    .card i {
        font-size: 3rem;
    }
    .footer-note {
        font-size: 1.1rem;
        padding: 0.6rem 1.2rem;
    }
    h1 {
        font-size: 2rem;
    }
    .subtitle {
        font-size: 1rem;
    }
}

/* 添加几个随机的可爱小装饰 (伪元素) */
.game-center::before {
    content: '🍬 🍭 🎀';
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 2.5rem;
    opacity: 0.5;
    transform: rotate(15deg);
    pointer-events: none;
    z-index: 20;
}

.game-center::after {
    content: '✨ 🌸 ✨';
    position: absolute;
    bottom: -20px;
    left: 10px;
    font-size: 2.5rem;
    opacity: 0.4;
    transform: rotate(-5deg);
    pointer-events: none;
    z-index: 20;
}