:root {
    --world-blue: #003366;
    --hover-gold: #f1c40f;
    --bg-color: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 20px;
    text-align: center;
}

header {
    margin-bottom: 40px;
}

.filter-controls {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 10px 20px;
    border: none;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn.active {
    background: var(--world-blue);
    color: white;
}

.world-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.country-card {
    background: white;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.country-card a {
    display: flex;
    flex-direction: column;
    padding: 20px;
    text-decoration: none;
    color: #333;
}

.country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.flag {
    font-size: 3rem;
    margin-bottom: 10px;
}

.name {
    font-weight: bold;
}

/* 非表示アニメーション用 */
.country-card.hidden {
    display: none;
}