/* flashgamehub.com 홈페이지 스타일 - 반응형 최적화 */

.flashgame-homepage {
    max-width: 100%;
    margin: 0 auto;
}

/* Hero 섹션 */
.hero-section {
    background: #fff;
    padding: 36px 0 26px 0;
    text-align: center;
    box-shadow: 0 2px 24px rgba(102,126,234,0.04);
    margin-bottom: 26px;
    border-radius: 0 0 18px 18px;
}
.hero-content h2 {
    font-size: 1.65em;
    font-weight: 700;
    color: #232346;
    margin: 0 auto 9px auto;
    letter-spacing: -0.5px;
}
.hero-subtitle {
    font-size: 1em;
    color: #73738c;
    letter-spacing: 1px;
    margin: 0;
    font-weight: 500;
}

/* ------------------------
   카테고리 카드 타이틀 가독성 강화
------------------------ */
.category-card-title,
.category-card-title a,
.cluster-title,
.cluster-title a {
    color: #222331 !important;
    background: none !important;
    font-weight: 700;
    font-size: 1.28em;
    letter-spacing: -0.5px;
    line-height: 1.1;
    text-shadow: none !important;
    box-shadow: none !important;
}

.category-card-title a:hover,
.cluster-title a:hover {
    color: #667eea !important;
}

.category-card-title,
.cluster-title,
.category-card-title a,
.cluster-title a {
    text-shadow: none !important;
    background: none !important;
    opacity: 1 !important;
}

/* flashgamehub.com 홈페이지 스타일 - 반응형 최적화 */

.flashgame-homepage {
    max-width: 100%;
    margin: 0 auto;
}


/* 카테고리 클러스터 섹션 */
.category-clusters {
    max-width: 1600px;
    margin: 0 auto 80px;
    padding: 60px 30px;
    background: #ffffff;
}

.section-title {
    font-size: 2.5em;
    color: #1a1a2e;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: #667eea;
    margin: 20px auto 0;
}

/* 클러스터 그리드 - 반응형 */
.clusters-grid {
    display: grid;
    gap: 30px;
}

@media (min-width: 1600px) {
    .clusters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) and (max-width: 1599px) {
    .clusters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .clusters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .clusters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .clusters-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* 클러스터 카드 */
.cluster-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 25px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.cluster-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.cluster-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
}

.cluster-title {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.cluster-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cluster-title a:hover {
    color: #667eea;
}

.cluster-desc {
    color: #6c757d;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 12px;
}

.cluster-meta {
    color: #667eea;
    font-size: 0.85em;
    margin-bottom: 15px;
    font-weight: 600;
    display: none !important;
}

.cluster-games {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

/* 카테고리 게임 그리드 반응형 */
@media (max-width: 767px) {
    .cluster-games {
        grid-template-columns: repeat(2, 1fr);
    }
}

.mini-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.mini-game-item:hover {
    transform: scale(1.05);
}

.mini-game-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 4px;
}

.mini-game-title {
    font-size: 0.7em;
    color: #495057;
    text-align: center;
    line-height: 1.2;
}

.view-all-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.view-all-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* 인기 게임 섹션 */
.popular-games {
    max-width: 1600px;
    margin: 0 auto 0;
    padding: 80px 30px;
    background: #0f0f23;
}

.popular-games .section-title {
    color: #ffffff;
}

.popular-games .section-title::after {
    background: #ff6b6b;
}

.popular-grid {
    display: grid;
    gap: 25px;
}

@media (min-width: 1600px) {
    .popular-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) and (max-width: 1599px) {
    .popular-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .popular-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

.popular-game-card {
    display: block;
    background: #1e1e2f;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.popular-game-card:hover {
    border-color: #ff6b6b;
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(255, 107, 107, 0.3);
}

.popular-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popular-game-card:hover .popular-thumb img {
    transform: scale(1.1);
}

.popular-info {
    padding: 15px;
}

.popular-info h3 {
    color: #ffffff;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.popular-category {
    color: #ff6b6b;
    font-size: 0.85em;
    font-weight: 600;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px;
    }
    
    .hero-content h1 {
        font-size: 2em;
    }
    
    .hero-subtitle {
        font-size: 1em;
        letter-spacing: 1px;
    }
    
    .category-clusters,
    .popular-games {
        padding: 40px 20px;
    }
    
    .cluster-card {
        padding: 20px;
    }
}


/* 썸네일 없을 때 대체 아이콘 */
.no-thumb-mini {
    width: 100%;
    aspect-ratio: 4/3;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    opacity: 0.3;
    border-radius: 6px;
}

.no-thumb-popular {
    width: 100%;
    height: 100%;
    background: #2a2a3e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    opacity: 0.3;
}

/* 조회수 배지 */
.view-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* 인기 게임 그리드 - 8개 최적화 */
.popular-grid {
    display: grid;
    gap: 25px;
}

/* 큰 데스크톱 - 4개씩 (2줄 = 8개) */
@media (min-width: 1600px) {
    .popular-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 일반 데스크톱 - 4개씩 */
@media (min-width: 1200px) and (max-width: 1599px) {
    .popular-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 중간 화면 - 3개씩 */
@media (min-width: 992px) and (max-width: 1199px) {
    .popular-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 태블릿 - 2개씩 */
@media (min-width: 768px) and (max-width: 991px) {
    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* 모바일 - 2개씩 */
@media (max-width: 767px) {
    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* 인기 게임 카드 썸네일 위치 조정 */
.popular-thumb {
    position: relative;  /* 조회수 배지 위치 기준 */
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}


/* ========================================
   Heading 구조 최적화 (2025-11-16)
   ======================================== */

/* Hero Section H1 스타일 (기존 h1, h2 통합 스타일 분리) */
.hero-content h1 {
    font-size: 1.85em;
    font-weight: 700;
    color: #232346;
    margin: 0 auto 9px auto;
    letter-spacing: -0.5px;
}

/* 개별 게임명 스타일 (H3 → p 태그로 변경) */
.popular-game-name {
    color: #ffffff;
    font-size: 1.1em;
    margin-bottom: 8px;
    font-weight: 600;
    display: block;
    line-height: 1.3;
}

/* 모바일 반응형 조정 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 1.5em;
        letter-spacing: -0.3px;
    }

    .popular-game-name {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.3em;
        line-height: 1.3;
    }
}