/* 引入可爱字体 */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;600;800&display=swap');

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Baloo 2', 'Microsoft YaHei', 'Comic Sans MS', Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    cursor: default;
}

/* 容器 - 柔和天空渐变 */
.container {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(180deg, #87CEEB 0%, #B8E6FF 30%, #E8F8FF 60%, #FFF9E6 100%);
}

/* ====== 浮动云朵 ====== */
.cloud {
    position: fixed;
    color: white;
    font-size: 4rem;
    opacity: 0.85;
    pointer-events: none;
    z-index: 0;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

.cloud-1 { top: 5%; left: -10%; animation: cloudFloat 25s linear infinite; font-size: 5rem; }
.cloud-2 { top: 12%; left: -10%; animation: cloudFloat 35s linear infinite 8s; font-size: 3.5rem; }
.cloud-3 { top: 25%; left: -10%; animation: cloudFloat 30s linear infinite 15s; font-size: 4.5rem; }
.cloud-4 { top: 8%; left: -10%; animation: cloudFloat 28s linear infinite 20s; font-size: 3rem; }

@keyframes cloudFloat {
    0% { left: -10%; }
    100% { left: 110%; }
}

/* ====== 浮动装饰（小星星、爱心）====== */
.floating-deco {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    animation: decoFloat 8s ease-in-out infinite;
}

.floating-deco:nth-child(1) { top: 20%; right: 8%; animation-delay: 0s; font-size: 1.8rem; }
.floating-deco:nth-child(2) { top: 45%; left: 5%; animation-delay: 2s; font-size: 1.5rem; }
.floating-deco:nth-child(3) { top: 70%; right: 12%; animation-delay: 4s; font-size: 2rem; }
.floating-deco:nth-child(4) { top: 35%; right: 3%; animation-delay: 1s; font-size: 1.6rem; }
.floating-deco:nth-child(5) { top: 80%; left: 8%; animation-delay: 3s; font-size: 1.4rem; }
.floating-deco:nth-child(6) { top: 15%; left: 15%; animation-delay: 5s; font-size: 1.7rem; }

@keyframes decoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    25% { transform: translateY(-15px) rotate(10deg); opacity: 0.9; }
    50% { transform: translateY(-25px) rotate(-5deg); opacity: 0.7; }
    75% { transform: translateY(-10px) rotate(8deg); opacity: 0.85; }
}

/* ====== 头部样式 ====== */
.header {
    position: relative;
    text-align: center;
    padding: 30px 20px 20px;
    z-index: 1;
}

.header-content {
    position: relative;
    display: inline-block;
}

/* 彩虹弧线装饰 */
.rainbow-arc {
    width: 320px;
    height: 80px;
    margin: 0 auto 15px;
    background: linear-gradient(90deg, #FF6B6B, #FF9F43, #FECA57, #48DBFB, #A29BFE, #FF6B9D);
    border-radius: 160px 160px 0 0;
    opacity: 0.8;
    animation: rainbowShimmer 3s ease-in-out infinite;
}

@keyframes rainbowShimmer {
    0%, 100% { opacity: 0.7; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.05); }
}

.title {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    display: flex;
    gap: 4px;
    justify-content: center;
}

.title-letter {
    display: inline-block;
    animation: letterBounce 2s ease-in-out infinite;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.08);
    -webkit-text-stroke: 1px rgba(0,0,0,0.05);
}

.title-letter:nth-child(1) { color: #FF6B6B; animation-delay: 0s; }
.title-letter:nth-child(2) { color: #FF9F43; animation-delay: 0.15s; }
.title-letter:nth-child(3) { color: #FECA57; animation-delay: 0.3s; }
.title-letter:nth-child(4) { color: #48DBFB; animation-delay: 0.45s; }
.title-letter:nth-child(5) { color: #A29BFE; animation-delay: 0.6s; }
.title-letter:nth-child(6) { color: #FF6B9D; animation-delay: 0.75s; }
.title-letter:nth-child(7) { color: #26DE81; animation-delay: 0.9s; }

@keyframes letterBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-12px) scale(1.1); }
    50% { transform: translateY(-6px) scale(1.05); }
}

.subtitle {
    font-size: 1.4rem;
    color: #FF6B9D;
    font-weight: 600;
    letter-spacing: 2px;
}

/* 气球装饰 */
.balloon {
    position: absolute;
    font-size: 2.5rem;
    animation: balloonBob 3s ease-in-out infinite;
}

.balloon-1 { top: -10px; left: 20px; animation-delay: 0s; }
.balloon-2 { top: -15px; right: 20px; animation-delay: 1s; }
.balloon-3 { bottom: -5px; left: 50%; transform: translateX(-50%); animation-delay: 2s; font-size: 2rem; }

@keyframes balloonBob {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-12px) rotate(3deg); }
}

/* ====== 主内容区 ====== */
.main {
    position: relative;
    padding: 20px 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
    z-index: 1;
}

/* 游戏网格 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    padding: 10px;
}

/* ====== 游戏卡片 - 糖果风格 ====== */
.game-card {
    border-radius: 30px;
    padding: 28px 24px 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,0.8);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* 每张卡片不同的糖果色 */
.game-card:nth-child(1) {
    background: linear-gradient(145deg, #FFF0F3, #FFE0E6);
    border-color: #FFB8C6;
}
.game-card:nth-child(2) {
    background: linear-gradient(145deg, #E8FFF5, #D0F5E0);
    border-color: #90E8B0;
}
.game-card:nth-child(3) {
    background: linear-gradient(145deg, #EBF5FF, #D6ECFF);
    border-color: #8ED0FF;
}
.game-card:nth-child(4) {
    background: linear-gradient(145deg, #F3EDFF, #E4D8FF);
    border-color: #C4A8FF;
}
.game-card:nth-child(5) {
    background: linear-gradient(145deg, #FFFDE8, #FFF5C2);
    border-color: #FFE566;
}

/* 卡片光泽扫过效果 */
.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.game-card:hover::before {
    left: 100%;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.game-card:nth-child(1):hover { box-shadow: 0 15px 40px rgba(255,107,107,0.2); }
.game-card:nth-child(2):hover { box-shadow: 0 15px 40px rgba(78,205,196,0.2); }
.game-card:nth-child(3):hover { box-shadow: 0 15px 40px rgba(69,183,209,0.2); }
.game-card:nth-child(4):hover { box-shadow: 0 15px 40px rgba(162,155,254,0.2); }
.game-card:nth-child(5):hover { box-shadow: 0 15px 40px rgba(255,217,61,0.2); }

/* 卡片图标 - 更大更有趣 */
.card-icon {
    font-size: 4.5rem;
    text-align: center;
    margin-bottom: 10px;
    animation: iconWiggle 3s ease-in-out infinite;
}

@keyframes iconWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg) scale(1.05); }
    75% { transform: rotate(5deg) scale(1.05); }
}

/* 卡片评分星星 - 去掉闪烁 */
.card-stars {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.card-title {
    font-size: 1.7rem;
    color: #2d3436;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 800;
}

.card-description {
    font-size: 1.05rem;
    color: #636e72;
    text-align: center;
    margin-bottom: 18px;
    line-height: 1.7;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 15px;
}

/* 标签 - 圆润可爱 */
.tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

.game-card:nth-child(1) .tag { background: linear-gradient(135deg, #FF9AA2, #FF6B6B); }
.game-card:nth-child(2) .tag { background: linear-gradient(135deg, #77DD77, #4CAF50); }
.game-card:nth-child(3) .tag { background: linear-gradient(135deg, #89CFF0, #4EA8DE); }
.game-card:nth-child(4) .tag { background: linear-gradient(135deg, #C3A6FF, #9B72CF); }
.game-card:nth-child(5) .tag { background: linear-gradient(135deg, #FFD966, #F0B429); }

.card-difficulty {
    text-align: center;
    margin-bottom: 18px;
    font-size: 1rem;
    color: #636e72;
    font-weight: 600;
}

.difficulty-stars {
    font-size: 1.2rem;
    letter-spacing: 2px;
}

/* ====== 开始游戏按钮 - 糖果按钮 ====== */
.play-button {
    width: 100%;
    padding: 16px 30px;
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 3px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

/* 每张卡片的按钮颜色 */
.game-card:nth-child(1) .play-button {
    background: linear-gradient(135deg, #FF9AA2, #FF6B6B);
    box-shadow: 0 6px 20px rgba(255,107,107,0.4);
}
.game-card:nth-child(2) .play-button {
    background: linear-gradient(135deg, #77DD77, #4CAF50);
    box-shadow: 0 6px 20px rgba(76,175,80,0.4);
}
.game-card:nth-child(3) .play-button {
    background: linear-gradient(135deg, #89CFF0, #4EA8DE);
    box-shadow: 0 6px 20px rgba(78,168,222,0.4);
}
.game-card:nth-child(4) .play-button {
    background: linear-gradient(135deg, #C3A6FF, #9B72CF);
    box-shadow: 0 6px 20px rgba(155,114,207,0.4);
}
.game-card:nth-child(5) .play-button {
    background: linear-gradient(135deg, #FFD966, #F0B429);
    box-shadow: 0 6px 20px rgba(240,180,41,0.4);
}

.play-button:hover {
    transform: translateY(-3px) scale(1.05);
}

.game-card:nth-child(1) .play-button:hover { box-shadow: 0 10px 30px rgba(255,107,107,0.5); }
.game-card:nth-child(2) .play-button:hover { box-shadow: 0 10px 30px rgba(76,175,80,0.5); }
.game-card:nth-child(3) .play-button:hover { box-shadow: 0 10px 30px rgba(78,168,222,0.5); }
.game-card:nth-child(4) .play-button:hover { box-shadow: 0 10px 30px rgba(155,114,207,0.5); }
.game-card:nth-child(5) .play-button:hover { box-shadow: 0 10px 30px rgba(240,180,41,0.5); }

.play-button:active {
    transform: translateY(0) scale(0.98);
}

/* ====== 页脚波浪 ====== */
.footer-wave {
    position: relative;
    z-index: 1;
    margin-top: 20px;
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: auto;
}

.footer {
    position: relative;
    text-align: center;
    padding: 20px 20px 30px;
    background: linear-gradient(180deg, #FFF9E6, #FFF0D4);
    color: #B08850;
    font-size: 1rem;
    font-weight: 600;
    z-index: 1;
}

.footer p {
    margin: 6px 0;
}

.footer-tip {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ====== 响应式 ====== */
@media (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2.2rem;
    }
    .subtitle {
        font-size: 1.1rem;
    }
    .rainbow-arc {
        width: 220px;
        height: 55px;
    }
    .games-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .card-icon {
        font-size: 3.5rem;
    }
    .cloud {
        font-size: 2.5rem;
    }
    .floating-deco {
        display: none;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    .game-card {
        padding: 20px 18px 18px;
    }
    .card-title {
        font-size: 1.4rem;
    }
}
