body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #ffffff;
    color: #333;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.iframe-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.iframe-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -1;
	overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
    z-index: 2;
    pointer-events: none; /* 오버레이 클릭/스크롤 가능하되, 클릭만 iframe으로 넘어가게 설정 */
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #fff;
    text-align: center;
    padding: 0 20px;
    pointer-events: none; /* Hero content는 클릭 가능 */
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
}

.hero-button {
    font-size: 1.2rem;
    padding: 10px 20px;
    background-color: orangered;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    pointer-events: auto; /* Hero content는 클릭 가능 */
}

.hero-button:hover {
    background-color: orange;
    transform: scale(1.05);
}

/* Game Gallery */
#game-gallery {
    text-align: center;
    position: relative;
    padding: 50px 0;
    background-color: #ffffff;
    color: #333;
}

.gallery-grid {
    display: grid;
    gap: 40px;
    padding: 0 20px;
}

/* 모바일: 2열 */
@media (max-width: 767px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 5px;
    }
}

/* 태블릿~PC (768px 이상 ~ 1279px 이하): 3열 */
@media (min-width: 768px) and (max-width: 1279px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 0 10px;
    }
}

/* FHD (1280px 이상 ~ 1919px 이하): 4열 */
@media (min-width: 1280px) and (max-width: 1919px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
        padding: 0 15px;
    }
}

/* QHD 이상 (1920px 이상): 5열 */
@media (min-width: 1920px) {
    .gallery-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 40px;
        padding: 0 20px;
    }
}


.gallery-item {
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.game-card {
    position: relative;
    background-color: #ffffff;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #ddd;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.game-image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: #000;
}

.game-image-container img,
.video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease, transform 0.5s ease; /* 애니메이션 효과 추가 */
}

.video-preview {
    opacity: 0;
    transform: scale(1.1); /* 약간의 확대 효과 추가 */
}

.game-card:hover .video-preview {
    opacity: 1;
    transform: scale(1); /* 확대 효과 제거 */
}

.game-card:hover .game-image-container .game-image {
    opacity: 0;
    transform: scale(1.1); /* 약간의 확대 효과 추가 */
}

.video-preview:hover {
    cursor: pointer;
    display: block;
}

.game-body {
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 32px;
    padding-top: 16px;
    text-align: left;
}

.game-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
	text-align: center;
}

.game-description {
    font-size: 1rem;
    color: #666;
	padding-left: 8px;
	padding-right: 8px;
    overflow-x: hidden;
    overflow-y:hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;         /* 최대 n줄까지 표시 */
    -webkit-box-orient: vertical;
}

.game-footer {
    display: flex;
    flex-direction: row;
    padding: 0;
    margin: 0;
    height: 56px;
    align-items: end;;
}

.icon-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    color: white;
    cursor: pointer;
    height: 100%;
    padding: 0;
    margin: 0;
    /* ❌ 이거 지워야 함:
    position: absolute;
    width: 100%;
    bottom: 0;
    left: 0;
    */
}

.icon-link i {
    margin-right: 8px;
}

.icon-link:hover {
    background-color: orange;
    transform: scale(1.05);
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: 10;
    align-items: center;
    justify-content: center;
}

.overlay.active {
    display: flex;
}

.overlay-video {
    width: 80%;
    height: auto;
    max-height: 80%;
    border: none;
}

@media only screen and (max-width: 768px) {
    .overlay-video {
        width: 99%;
    }
}


/* Footer Section */
.footer-section {
    background-color: #111;
    color: #ccc;
    padding: 40px 0;
    position: relative;
}

.footer-section .footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-section .footer-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #fff;
}

.footer-section .footer-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #bbb;
    line-height: 1.5;
}

.footer-section .footer-text i {
    margin-right: 10px;
}

.footer-section .footer-text i:first-child {
    color: #f39c12;
}

.footer-section .footer-text i:nth-child(2) {
    color: #f39c12;
}

.footer-section .footer-text i:last-child {
    color: #f39c12;
}

.footer-section .footer-text span {
    display: block;
    margin-bottom: 5px;
}

.footer-section .footer-text.lightning:before {
    content: "⚡";
    color: #f39c12;
    margin-right: 10px;
}

.footer-section .footer-copyright {
    font-size: 0.9rem;
    color: #888;
    margin-top: 20px;
}

.footer-section .footer-copyright:before {
    /* content: "©"; */
    margin-right: 5px;
    color: #f39c12;
}

.game-number-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: orangered;
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 999px;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}


/* 테두리 및 배경 색상 다양화 (8가지 조합) */
.gallery-item:nth-child(8n+1) .game-card {
    border-color: #ff7043;
    background-color: #fffaf0;
    border-width: 2px;
}

.gallery-item:nth-child(8n+2) .game-card {
    border-color: #42a5f5;
    background-color: #f0f8ff;
    border-width: 2px;
}

.gallery-item:nth-child(8n+3) .game-card {
    border-color: #66bb6a;
    background-color: #f5fff5;
    border-width: 2px;
}

.gallery-item:nth-child(8n+4) .game-card {
    border-color: #ab47bc;
    background-color: #faf5ff;
    border-width: 2px;
}

.gallery-item:nth-child(8n+5) .game-card {
    border-color: #ffa726;
    background-color: #fff5ec;
    border-width: 2px;
}

.gallery-item:nth-child(8n+6) .game-card {
    border-color: #26c6da;
    background-color: #e0f7fa;
    border-width: 2px;
}

.gallery-item:nth-child(8n+7) .game-card {
    border-color: #ef5350;
    background-color: #fff0f0;
    border-width: 2px;
}

.gallery-item:nth-child(8n+8) .game-card {
    border-color: #7e57c2;
    background-color: #f3e5f5;
    border-width: 2px;
}

.game-footer.d-flex {
    display: flex;
    padding: 0;
    margin: 0;
}


.icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    color: white;
    cursor: pointer;
    height: 100% !important;
}

.icon-link.play-button {
    flex: 6.5;
    background-color: orangered;
}

.icon-link.share-button {
    flex: 3.5;
    background-color: #26c6da; /* 채도 낮은 하늘색 */
}

.icon-link.play-button:hover {
    background-color: orange;
    transform: scale(1.02);
}

.icon-link.share-button:hover {
    background-color: #555;
    transform: scale(1.02);
}