/* 全体のスタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

/* ヘッダー */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: bounceIn 1s ease-out;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

/* ゲームグリッド */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* ゲームカード */
.game-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

.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.5s;
}

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

.game-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 1);
}

.game-card:active {
    transform: translateY(-5px) scale(1.02);
}

/* ゲームアイコン */
.game-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.game-card:hover .game-icon {
    transform: scale(1.2) rotate(10deg);
    animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: scale(1.2) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    75% { transform: scale(1.2) rotate(10deg); }
}

/* ゲームタイトル */
.game-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    text-align: center;
    color: #2c3e50;
    font-weight: 600;
}

/* ゲーム説明 */
.game-card p {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    header h1 {
        font-size: 2.5rem;
    }

    .game-card {
        padding: 20px;
    }

    .game-icon {
        font-size: 2.5rem;
    }

    .game-card h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2rem;
    }

    .container {
        padding: 15px;
    }
}

/* スクロールバー */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}
