/* 최적화된 스타일시트 - 메인 페이지 레이아웃과 사용자 경험 향상을 위한 추가 스타일 */

/* 헤더 최적화 */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.install-button {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    color: white;
    text-decoration: none;
}

.install-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.install-button i {
    margin-right: 6px;
    font-size: 1rem;
}

/* 히어로 섹션 최적화 */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.quick-search-button {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.quick-search-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.quick-search-button i {
    margin-left: 8px;
}

/* 검색 모달 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.search-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.search-container {
    width: 90%;
    max-width: 600px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #8e44ad;
    color: white;
}

.search-header h3 {
    margin: 0;
    font-family: 'Jua', sans-serif;
}

.close-search {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.search-body {
    padding: 20px;
}

#gameSearch {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 15px;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f5f0f9;
}

.search-result-item i {
    margin-right: 10px;
    color: #8e44ad;
    font-size: 1.2rem;
}

/* 게임 카드 향상 */
.game-card {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease, box-shadow 0.3s, transform 0.3s;
}

.game-card.visible, .game-card:hover {
    transform: translateY(0);
    opacity: 1;
}

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

/* 앱 설치 배너 최적화 */
.install-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 99;
    text-align: center;
    animation: fadeInUp 0.5s;
    display: none;
}

.install-banner p {
    margin: 0 0 10px;
    font-weight: bold;
}

.install-banner-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.install-btn {
    background-color: white;
    color: #8e44ad;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}

.install-btn:hover {
    background-color: #f5f5f5;
}

.dismiss-btn {
    background-color: transparent;
    color: white;
    border: 1px solid white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dismiss-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 상단 이동 버튼 */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #8e44ad;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0;
    pointer-events: none;
    z-index: 99;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-to-top:hover {
    background-color: #7d32a8;
    transform: translateY(-5px);
}

.scroll-to-top i {
    font-size: 1.2rem;
}

/* 푸터 최적화 */
.footer-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.footer-menu a {
    color: white;
    margin: 5px 15px;
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.2s;
}

.footer-menu a:hover {
    opacity: 0.8;
}

.copyright-container {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    background-color: #8e44ad;
}

/* 추가 애니메이션 효과 */
.cta-button.highlight {
    animation: pulse-highlight 1s;
}

@keyframes pulse-highlight {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 8px 25px rgba(255, 152, 0, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    }
}

.page-loaded .game-card {
    transition-delay: calc(var(--index, 0) * 0.1s);
}

/* 반응형 디자인 추가 최적화 */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button, .quick-search-button {
        width: 100%;
        max-width: 300px;
    }
    
    /* 모바일에서 설치 버튼 아이콘만 숨기기 */
    .install-button i {
        display: none !important;
    }
    
    .search-container {
        width: 95%;
        max-height: 90vh;
    }

    .search-results {
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    .section-header {
        margin-bottom: 15px;
    }
    
    .game-card {
        margin-bottom: 15px;
    }
    
    .quick-search-button {
        font-size: 1rem;
        padding: 10px 20px;
    }
    
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }
}