/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
    background-color: #1a1a2e;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul, ol {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 상단 알림바 */
.top-bar {
    background-color: #16213e;
    padding: 8px 0;
    border-bottom: 1px solid #0f3460;
}

.top-bar .container {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.top-link {
    font-size: 13px;
    color: #a0a0a0;
}

.top-link:hover {
    color: #00d4ff;
}

.top-link i {
    margin-right: 5px;
}

/* 헤더 */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 20px 0;
    border-bottom: 2px solid #0f3460;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo a {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-box {
    display: flex;
    max-width: 400px;
    width: 100%;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 25px 0 0 25px;
    background-color: #2a2a4a;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.search-box input::placeholder {
    color: #888;
}

.search-box button {
    padding: 12px 20px;
    border: none;
    border-radius: 0 25px 25px 0;
    background: linear-gradient(90deg, #7b2cbf, #00d4ff);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s;
}

.search-box button:hover {
    opacity: 0.8;
}

/* 인기 검색어 */
.popular-keywords {
    background-color: #16213e;
    padding: 12px 0;
    border-bottom: 1px solid #0f3460;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: center;
    counter-reset: keyword;
}

.keyword-list li {
    counter-increment: keyword;
    display: flex;
    align-items: center;
    font-size: 13px;
}

.keyword-list li::before {
    content: counter(keyword) ".";
    color: #00d4ff;
    font-weight: bold;
    margin-right: 6px;
    min-width: 20px;
}

.keyword-list a {
    color: #d0d0d0;
}

.keyword-list a:hover {
    color: #00d4ff;
}

/* 메인 네비게이션 */
.main-nav {
    background-color: #0f3460;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-list li a {
    display: block;
    padding: 15px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #d0d0d0;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.nav-list li a:hover,
.nav-list li a.active {
    color: #00d4ff;
    background-color: rgba(0, 212, 255, 0.1);
    border-bottom-color: #00d4ff;
}

/* 메인 광고 배너 */
.banner-area {
    padding: 20px 0 10px;
    background-color: #1a1a2e;
}

.main-banner {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.main-banner a {
    display: block;
}

.big-banner {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ffcc00 100%);
    position: relative;
}

.big-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="15" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="60" r="25" fill="rgba(255,255,255,0.08)"/></svg>');
    background-size: cover;
    pointer-events: none;
}

.banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    min-height: 100px;
    position: relative;
    z-index: 1;
}

.banner-logo {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.banner-text-wrap {
    flex: 1;
    margin: 0 25px;
    text-align: center;
}

.banner-title {
    display: block;
    font-size: 26px;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    margin-bottom: 5px;
}

.banner-desc {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.banner-cta {
    background: #fff;
    color: #ff6b35;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.big-banner:hover .banner-cta {
    transform: scale(1.05);
}

/* 서브 배너 그리드 */
.sub-banner-area {
    padding: 10px 0 20px;
    background-color: #1a1a2e;
}

.sub-banner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.sub-banner {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.sub-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.sub-banner a {
    display: block;
}

.sub-banner-inner {
    padding: 20px 15px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.sub-banner-inner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.sub-banner-name {
    display: block;
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
}

.sub-banner-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    z-index: 1;
}

/* 배너 그라데이션 종류 */
.gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.gradient-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.gradient-6 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.gradient-7 {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.gradient-8 {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

/* 반응형 배너 */
@media (max-width: 992px) {
    .sub-banner-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .sub-banner-grid {
        grid-template-columns: 1fr;
    }
    
    .banner-inner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .banner-logo {
        margin-bottom: 15px;
    }
    
    .banner-text-wrap {
        margin: 0 0 15px 0;
    }
    
    .banner-title {
        font-size: 20px;
    }
}

/* 메인 콘텐츠 */
.main-content {
    padding: 30px 0 50px;
}

/* 와이드 배너 */
.wide-banner-wrap {
    margin-bottom: 25px;
}

.wide-banner {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.wide-banner:hover {
    transform: translateY(-2px);
}

.wide-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 25px 30px;
    min-height: 80px;
}

.wide-banner-badge {
    background: #fff;
    color: #ff6b35;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
}

.wide-banner-title {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.wide-banner-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.wide-banner-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #fff;
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.2s;
}

.wide-banner:hover .wide-banner-btn {
    background: rgba(255, 255, 255, 0.3);
}

/* 중간 배너 (그리드 내) */
.mid-banner-wrap {
    grid-column: span 1;
}

.mid-banner {
    display: block;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.mid-banner:hover {
    transform: translateY(-3px);
}

.mid-banner-inner {
    height: 100%;
    min-height: 200px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mid-banner-inner::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.mid-banner-inner::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.mid-banner-logo {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    color: #333;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.mid-banner-text {
    position: relative;
    z-index: 1;
}

.mid-title {
    display: block;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 8px;
}

.mid-desc {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 768px) {
    .wide-banner-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .wide-banner-title {
        font-size: 18px;
    }
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 카테고리 섹션 */
.category-section {
    background: linear-gradient(180deg, #1e1e3f 0%, #16213e 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #0f3460;
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.15);
}

.section-header {
    background: linear-gradient(90deg, #0f3460, #1a1a2e);
    padding: 15px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #0f3460;
}

.section-header i {
    font-size: 18px;
    color: #00d4ff;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

/* 랭킹 리스트 */
.rank-list {
    padding: 10px 0;
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    transition: background-color 0.2s;
}

.rank-item:hover {
    background-color: rgba(0, 212, 255, 0.08);
}

.rank-num {
    width: 26px;
    height: 26px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    border-radius: 6px;
    background-color: #2a2a4a;
    color: #888;
    margin-right: 12px;
    flex-shrink: 0;
}

.rank-num.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #1a1a2e;
}

.rank-num.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #1a1a2e;
}

.rank-num.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    color: #fff;
}

.rank-item a {
    font-size: 14px;
    color: #d0d0d0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-item:hover a {
    color: #00d4ff;
}

/* 더보기 버튼 */
.more-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(90deg, #7b2cbf, #0f3460);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.more-btn:hover {
    opacity: 0.85;
}

.more-btn i {
    font-size: 10px;
}

/* 푸터 */
.footer {
    background-color: #0d1b2a;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #0f3460;
    position: relative;
}

.footer p {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7b2cbf, #00d4ff);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    transition: transform 0.2s, opacity 0.2s;
    z-index: 1000;
}

.scroll-top:hover {
    transform: scale(1.1);
}

/* 반응형 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }

    .search-box {
        max-width: 100%;
    }

    .logo a {
        font-size: 26px;
    }

    .nav-list li a {
        padding: 12px 12px;
        font-size: 13px;
    }

    .sections-grid {
        grid-template-columns: 1fr;
    }

    .keyword-list {
        gap: 5px 15px;
    }

    .keyword-list li {
        font-size: 12px;
    }

    .scroll-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .top-bar .container {
        justify-content: center;
    }

    .nav-list {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .nav-list li a {
        white-space: nowrap;
    }

    .banner-content {
        height: 70px;
    }

    .banner-text {
        font-size: 14px;
    }
}

/* 스크롤바 스타일링 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #0f3460;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7b2cbf;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-section {
    animation: fadeIn 0.5s ease-out forwards;
}

.category-section:nth-child(1) { animation-delay: 0.05s; }
.category-section:nth-child(2) { animation-delay: 0.1s; }
.category-section:nth-child(3) { animation-delay: 0.15s; }
.category-section:nth-child(4) { animation-delay: 0.2s; }
.category-section:nth-child(5) { animation-delay: 0.25s; }
.category-section:nth-child(6) { animation-delay: 0.3s; }
.category-section:nth-child(7) { animation-delay: 0.35s; }
.category-section:nth-child(8) { animation-delay: 0.4s; }
.category-section:nth-child(9) { animation-delay: 0.45s; }
.category-section:nth-child(10) { animation-delay: 0.5s; }
.category-section:nth-child(11) { animation-delay: 0.55s; }
.category-section:nth-child(12) { animation-delay: 0.6s; }
