/* 공통 스타일 */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* 배너 스타일 */
.banner-section {
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.banner-container {
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 2000 / 360;
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.banner-slider {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.banner-item {
    min-width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.banner-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s;
}

.indicator.active {
    background: #4CAF50;
    width: 24px;
    border-radius: 4px;
}

.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background 0.3s;
}

.banner-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.banner-nav.prev {
    left: 10px;
}

.banner-nav.next {
    right: 10px;
}

.no-banner {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* 팝업 스타일 */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.popup-overlay.show {
    display: flex;
}

.popup-container {
    position: relative;
    max-width: 400px;
    max-height: 400px;
    width: 90vw;
    height: 90vw;
    max-width: min(90vh, 400px);
    max-height: min(90vh, 400px);
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.popup-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #1a1a1a;
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.popup-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.popup-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
    font-size: 14px;
}

.popup-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.popup-checkbox label {
    cursor: pointer;
    user-select: none;
}

/* 랭킹 스타일 */
.ranking-section {
    margin-top: 40px;
    margin-bottom: 80px;
    padding: 20px 0;
}

.ranking-tabs {
    display: flex;
    background-color: #333;
    border-radius: 6px;
    padding: 4px;
    gap: 4px;
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.ranking-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}
.ranking-mode-tabs {
    display: flex;
    background-color: #333;
    border-radius: 6px;
    padding: 4px;
}
.ranking-mode-tab {
    padding: 6px 16px;
    background-color: transparent;
    color: #888;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.ranking-mode-tab:hover {
    color: #e0e0e0;
}
.ranking-mode-tab.active {
    background-color: #4ECDC4;
    color: #1a1a1a;
}

.ranking-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.ranking-type-selector {
    display: flex;
    gap: 10px;
}

.ranking-type-btn {
    padding: 8px 16px;
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.ranking-type-btn:hover {
    background-color: #444;
}

.ranking-type-btn.active {
    background-color: #4ECDC4;
    color: #1a1a1a;
    border-color: #4ECDC4;
}

.ranking-type-dropdown {
    padding: 8px 16px;
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    min-width: 200px;
}

.ranking-type-dropdown:hover {
    background-color: #444;
}

.ranking-type-dropdown:focus {
    outline: none;
    border-color: #4ECDC4;
}

.ranking-table {
    width: 100%;
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ranking-content {
    margin-top: 20px;
}

.ranking-content table {
    width: 100%;
    border-collapse: collapse;
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.ranking-content th {
    background-color: #333;
    color: #e0e0e0;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.ranking-content td {
    padding: 12px;
    border-bottom: 1px solid #333;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.ranking-table table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th {
    background-color: #333;
    color: #e0e0e0;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.ranking-table td {
    padding: 12px;
    border-bottom: 1px solid #333;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.ranking-table tr:last-child td {
    border-bottom: none;
}

.ranking-table tr:hover {
    background-color: #333;
}

.rank-medal {
    font-size: 1.2rem;
    margin-right: 8px;
}

.rank-1 .rank-medal { color: #FFD700; }
.rank-2 .rank-medal { color: #C0C0C0; }
.rank-3 .rank-medal { color: #CD7F32; }

.duration-value {
    font-weight: 600;
    color: #4ECDC4;
}

.dps-value {
    font-weight: 600;
    color: #FF6B6B;
}

.player-count {
    color: #999;
    font-size: 0.85rem;
}

.no-ranking {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1rem;
}

/* 면책조항 스타일 */
.disclaimer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    color: #999;
    text-align: center;
    padding: 10px;
    font-size: 0.75rem;
    border-top: 1px solid #333;
    z-index: 1000;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .banner-section {
        margin-bottom: 15px;
    }
    
    .ranking-section {
        margin-bottom: 100px;
    }
    
    .ranking-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .ranking-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
    
    .ranking-mode-tabs {
        width: 100%;
    }
    
    .ranking-mode-tab {
        flex: 1;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 8px;
        font-size: 0.85rem;
    }
    
    .ranking-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
}