:root {
    --bg-color: #fbf8cc;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    /* 欢快的彩色圆点背景 */
    background-image: 
        radial-gradient(#ffd166 2px, transparent 2px), 
        radial-gradient(#ef476f 2px, transparent 2px),
        radial-gradient(#118ab2 2px, transparent 2px);
    background-size: 60px 60px;
    background-position: 0 0, 20px 20px, 40px 40px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

header {
    margin-bottom: 60px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 4px dashed #ef476f;
    position: relative;
}

header::before, header::after {
    content: '🎉';
    position: absolute;
    font-size: 3rem;
    top: 50%;
    transform: translateY(-50%);
}

header::before {
    left: 20px;
}

header::after {
    right: 20px;
}

.title {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 3.8rem;
    color: #ef476f;
    margin: 0 0 15px 0;
    text-shadow: 3px 3px 0px #ffd166;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.6rem;
    color: #118ab2;
    margin: 0;
    font-weight: bold;
    font-family: 'ZCOOL KuaiLe', cursive;
}

.countries-grid {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 40px;
}

.country-card {
    background: white;
    border-radius: 30px;
    padding: 40px 20px;
    width: 320px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.country-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15px;
    background-color: var(--theme-color, #118ab2);
}

.country-card:hover {
    transform: translateY(-20px);
    box-shadow: 0 25px 45px rgba(0,0,0,0.2);
}

.flag-img {
    width: 120px;
    height: 80px; /* 固定高度确保所有国旗一样大 */
    object-fit: cover; /* 保证图片不变形，多余部分裁切 */
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.country-card:hover .flag-img {
    transform: scale(1.1);
}

.country-info h3 {
    font-size: 2.5rem;
    margin: 10px 0;
    font-family: 'ZCOOL KuaiLe', cursive;
    color: var(--theme-color, #118ab2);
}

.food-desc {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-weight: bold;
}

.vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: auto;
}

.vote-btn {
    border: none;
    border-radius: 50%;
    width: 90px;
    height: 90px;
    font-size: 2.8rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    outline: none;
    background-color: var(--theme-color, #118ab2);
}

.vote-btn:hover {
    transform: scale(1.15) rotate(-15deg);
}

.vote-btn:active {
    transform: scale(0.95);
}

.score {
    font-size: 4.5rem;
    font-weight: bold;
    font-family: 'ZCOOL KuaiLe', cursive;
    line-height: 1;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
    color: var(--theme-color, #118ab2);
}

/* 分数增加动画效果 */
@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.score-animate {
    animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 重置按钮样式 */
.reset-section {
    margin-top: 50px;
    text-align: center;
}

.reset-btn {
    background-color: #ef476f;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.4rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'ZCOOL KuaiLe', cursive;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(239, 71, 111, 0.3);
    letter-spacing: 2px;
}

.reset-btn i {
    margin-right: 10px;
}

.reset-btn:hover {
    background-color: #d9385e;
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(239, 71, 111, 0.5);
}

.reset-btn:active {
    transform: translateY(1px);
    box-shadow: 0 5px 15px rgba(239, 71, 111, 0.3);
}

/* 响应式设计 */
@media (max-width: 900px) {
    header::before, header::after {
        display: none; /* 在小屏幕隐藏表情以节省空间 */
    }
    .title {
        font-size: 2.8rem;
    }
    .subtitle {
        font-size: 1.3rem;
    }
    .country-card {
        width: 100%;
        max-width: 400px;
    }
}