@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&family=Press+Start+2P&display=swap');

body {
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212; /* 어두운 배경색 */
    color: #e0e0e0;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* 가로 스크롤 방지 */
}

header {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%); /* 강렬한 그라데이션 */
    color: #ffffff;
    padding: 2.5em 1em;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border-bottom: 5px solid #ff4b2b;
}

header h1 {
    font-family: 'Press Start 2P', cursive; /* 픽셀 게임 폰트 */
    font-size: clamp(1.8em, 5vw, 2.8em); /* 반응형 폰트 크기 */
    margin: 0 0 0.2em 0;
    color: #fff;
    text-shadow: 3px 3px #000, 0 0 15px rgba(255,255,255,0.3);
    letter-spacing: 1px;
}

header h1 .home-link {
    text-decoration: none;
    color: inherit;
}

header p {
    font-size: clamp(0.9em, 2.5vw, 1.1em);
    margin-top: 0.5em;
    color: #f0f0f0;
    letter-spacing: 0.5px;
}

main {
    flex: 1;
    padding: 2.5em 1.5em;
    max-width: 1300px;
    margin: 0 auto;
    width: 95%;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* 반응형 그리드 */
    gap: 2em;
}

.game-card {
    background: #1e1e1e; /* 카드 배경 */
    border-radius: 15px;
    padding: 1.8em;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #333;
    overflow: hidden; /* 아이콘 효과를 위해 */
    position: relative;
}

.game-card::before { /* 카드 호버 시 배경 효과 */
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 75, 43, 0.15) 0%, rgba(255, 75, 43, 0) 70%);
    transform: scale(0);
    transition: transform 0.5s ease-out;
    z-index: 0;
    pointer-events: none;
}

.game-card:hover::before {
    transform: scale(1);
}

.game-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 12px 30px rgba(255, 75, 43, 0.3);
}

.game-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.2em;
    border-radius: 50%; /* 동그란 아이콘 배경 */
    background: linear-gradient(145deg, #333, #111);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8em;
    color: #ff4b2b;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 0 15px rgba(255,75,43,0.2);
    position: relative; /* z-index를 위해 */
    z-index: 1;
}

.game-icon .icon-placeholder {
    width: 60%;
    height: 60%;
    object-fit: contain;
    filter: invert(70%) sepia(80%) saturate(5000%) hue-rotate(330deg) brightness(100%) contrast(101%); /* 아이콘 색상 변경 */
}
.game-icon .text-icon { /* 이미지 없을 때 텍스트 아이콘 스타일 */
    line-height: 1;
}


.game-card h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.3em;
    margin: 0.5em 0 0.5em 0;
    color: #fff;
    position: relative; /* z-index를 위해 */
    z-index: 1;
}

.game-card p {
    font-size: 0.9em;
    color: #bbb;
    flex-grow: 1;
    margin-bottom: 1.2em;
    min-height: 50px; /* 내용 길이에 따른 카드 높이 변화 최소화 */
    position: relative; /* z-index를 위해 */
    z-index: 1;
}

.play-button, .status-badge {
    display: inline-block;
    padding: 0.8em 1.8em;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative; /* z-index를 위해 */
    z-index: 1;
}

.play-button {
    background: linear-gradient(135deg, #ff4b2b 0%, #ff416c 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(255, 75, 43, 0.3);
}

.play-button:hover {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    box-shadow: 0 6px 15px rgba(255, 75, 43, 0.5);
    transform: translateY(-2px);
}

.status-badge {
    background-color: #444;
    color: #999;
    cursor: default;
}

.game-card.coming-soon {
    opacity: 0.6;
    filter: grayscale(50%);
}

.game-card.coming-soon:hover { /* 준비중인 카드 호버 효과 약화 */
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

footer {
    text-align: center;
    padding: 2em 1em;
    background-color: #0a0a0a;
    color: #666;
    border-top: 1px solid #222;
    font-size: 0.85em;
}

/* 반응형 조정 */
@media (max-width: 768px) {
    header {
        padding: 2em 1em;
    }
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5em;
    }
    .game-card {
        padding: 1.5em;
    }
    .game-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5em;
    }
    .game-card h2 {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: 1fr; /* 모바일에서는 1열로 */
    }
     header h1 {
        text-shadow: 2px 2px #000, 0 0 10px rgba(255,255,255,0.2);
    }
}