/* ============================
   穴実ゲームショップ - トップページCSS
   ============================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Noto+Sans+JP:wght@400;700;900&display=swap');

/* --- CSS変数 --- */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a1f2e;
    --text-primary: #e0e7ff;
    --text-secondary: #94a3b8;
    --neon-green: #00ff88;
    --neon-green-dim: #00cc6a;
    --neon-blue: #00d4ff;
    --neon-pink: #ff2d95;
    --neon-yellow: #ffe600;
    --neon-purple: #b44dff;
    --glow-green: 0 0 20px rgba(0, 255, 136, 0.4), 0 0 40px rgba(0, 255, 136, 0.1);
    --glow-blue: 0 0 20px rgba(0, 212, 255, 0.4), 0 0 40px rgba(0, 212, 255, 0.1);
    --glow-pink: 0 0 20px rgba(255, 45, 149, 0.4), 0 0 40px rgba(255, 45, 149, 0.1);
    --glow-yellow: 0 0 20px rgba(255, 230, 0, 0.4), 0 0 40px rgba(255, 230, 0, 0.1);
    --glow-purple: 0 0 20px rgba(180, 77, 255, 0.4), 0 0 40px rgba(180, 77, 255, 0.1);
    --card-radius: 16px;
    --transition-speed: 0.3s;
}

/* --- リセット & ベース --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- 背景エフェクト --- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 400px at 20% 20%, rgba(0, 255, 136, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 80% 70%, rgba(0, 212, 255, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 400px 300px at 50% 50%, rgba(180, 77, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* --- グリッドパターン背景 --- */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* --- メインコンテナ --- */
.site-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* --- ヘッダー --- */
.site-header {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 2rem;
}

.site-title {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(1.2rem, 4vw, 2.4rem);
    color: var(--neon-green);
    text-shadow:
        0 0 10px rgba(0, 255, 136, 0.8),
        0 0 30px rgba(0, 255, 136, 0.4),
        0 0 60px rgba(0, 255, 136, 0.2);
    letter-spacing: 0.1em;
    line-height: 1.6;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% {
        text-shadow:
            0 0 10px rgba(0, 255, 136, 0.8),
            0 0 30px rgba(0, 255, 136, 0.4),
            0 0 60px rgba(0, 255, 136, 0.2);
    }
    100% {
        text-shadow:
            0 0 15px rgba(0, 255, 136, 1),
            0 0 40px rgba(0, 255, 136, 0.6),
            0 0 80px rgba(0, 255, 136, 0.3);
    }
}

.site-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    letter-spacing: 0.15em;
    font-weight: 400;
}

/* --- ゲームカードグリッド --- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1100px;
    padding: 0 1rem;
}

/* --- ゲームカード --- */
.game-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--card-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition:
        transform var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow var(--transition-speed) ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

/* カードのネオンボーダー */
.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--card-radius);
    padding: 2px;
    background: linear-gradient(135deg, var(--card-accent), transparent 50%, var(--card-accent));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity var(--transition-speed) ease;
    pointer-events: none;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* カード別アクセントカラー */
.game-card--typing { --card-accent: var(--neon-green); }
.game-card--12th { --card-accent: var(--neon-pink); }
.game-card--wacha { --card-accent: var(--neon-blue); }

.game-card--typing:hover { box-shadow: var(--glow-green); }
.game-card--12th:hover { box-shadow: var(--glow-pink); }
.game-card--wacha:hover { box-shadow: var(--glow-blue); }

/* --- カードヘッダー（アイコンエリア） --- */
.card-header {
    position: relative;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* アイコン背景のグラデーション */
.card-header::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.15;
    transition: opacity var(--transition-speed) ease;
}

.game-card:hover .card-header::before {
    opacity: 0.25;
}

.game-card--typing .card-header::before {
    background: linear-gradient(135deg, var(--neon-green), transparent);
}
.game-card--12th .card-header::before {
    background: linear-gradient(135deg, var(--neon-pink), transparent);
}
.game-card--wacha .card-header::before {
    background: linear-gradient(135deg, var(--neon-blue), transparent);
}

/* カードアイコン */
.card-icon {
    font-size: 3.5rem;
    z-index: 1;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.3));
    transition: transform var(--transition-speed) ease;
}

.game-card:hover .card-icon {
    transform: scale(1.15);
}

/* --- カードボディ --- */
.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 900;
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

.card-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
}

/* --- カードフッター --- */
.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.play-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
    color: var(--card-accent);
    letter-spacing: 0.15em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap var(--transition-speed) ease;
}

.game-card:hover .play-label {
    gap: 0.8rem;
}

.play-arrow {
    display: inline-block;
    transition: transform var(--transition-speed) ease;
}

.game-card:hover .play-arrow {
    transform: translateX(4px);
}

/* --- フッター --- */
.site-footer {
    margin-top: auto;
    padding: 3rem 1rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

/* --- スキャンラインエフェクト --- */
.scanline-overlay {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 999;
}

/* --- レスポンシブ --- */
@media (max-width: 640px) {
    .site-header {
        margin-bottom: 2.5rem;
        padding-top: 1rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card-header {
        height: 110px;
    }

    .card-icon {
        font-size: 2.8rem;
    }
}

@media (min-width: 900px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- フェードインアニメーション --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.25s; }
.game-card:nth-child(3) { animation-delay: 0.4s; }
.game-card:nth-child(4) { animation-delay: 0.55s; }
.game-card:nth-child(5) { animation-delay: 0.7s; }
.game-card:nth-child(6) { animation-delay: 0.85s; }
