* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0e27;
    color: #e0e0e0;
    overflow: hidden;
    height: 100vh;
}

#globe-container {
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}

/* 컨트롤 패널 */
.control-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 350px;
    background: rgba(20, 25, 40, 0.95);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 1000;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 150, 255, 0.5) transparent;
}

.control-panel::-webkit-scrollbar {
    width: 8px;
}

.control-panel::-webkit-scrollbar-track {
    background: transparent;
}

.control-panel::-webkit-scrollbar-thumb {
    background: rgba(100, 150, 255, 0.5);
    border-radius: 4px;
}

.panel-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(100, 150, 255, 0.2);
}

.panel-header h1 {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: 600;
}

.auth-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #b0b0b0;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff4444;
}

.status-indicator.authenticated {
    background: #44ff44;
}

.stats-section,
.filter-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(100, 150, 255, 0.15);
}

.stats-section:last-child,
.filter-section:last-child {
    border-bottom: none;
}

.stats-section h2,
.filter-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 600;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(100, 150, 255, 0.08);
    border-left: 2px solid rgba(100, 150, 255, 0.5);
    border-radius: 4px;
}

.stat-label {
    color: #b0b0b0;
}

.stat-value {
    font-weight: 600;
    color: #ffffff;
}

.region-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.region-btn {
    padding: 12px;
    background: rgba(100, 150, 255, 0.1);
    border: 1px solid rgba(100, 150, 255, 0.3);
    color: #e0e0e0;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    text-align: left;
}

.region-btn:hover {
    background: rgba(100, 150, 255, 0.15);
    border-color: rgba(100, 150, 255, 0.5);
}

.region-btn.active {
    background: rgba(100, 150, 255, 0.2);
    border-color: rgba(100, 150, 255, 0.6);
    border-width: 2px;
}

.filter-item {
    margin-bottom: 15px;
}

.filter-item label {
    display: block;
    margin-bottom: 8px;
    color: #b0b0b0;
    font-size: 14px;
}

.filter-item input,
.filter-item select {
    width: 100%;
    padding: 10px;
    background: rgba(30, 35, 50, 0.8);
    border: 1px solid rgba(100, 150, 255, 0.3);
    color: #e0e0e0;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
}

.search-input {
    cursor: text;
}

.search-input::placeholder {
    color: rgba(180, 180, 180, 0.5);
}

.filter-item input:focus,
.filter-item select:focus {
    outline: none;
    border-color: rgba(100, 150, 255, 0.6);
    background: rgba(30, 35, 50, 1);
}

.filter-item select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b0b0b0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}

.filter-item select option {
    background: #1a1f35;
    color: #e0e0e0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: rgba(100, 150, 255, 0.05);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6496ff;
}

.checkbox-label span {
    color: #e0e0e0;
    font-size: 14px;
    user-select: none;
}

.button-group {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    background: rgba(100, 150, 255, 0.1);
    border: 1px solid rgba(100, 150, 255, 0.3);
    color: #e0e0e0;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(100, 150, 255, 0.15);
    border-color: rgba(100, 150, 255, 0.5);
}

.action-btn.active {
    background: rgba(100, 150, 255, 0.2);
    border-color: rgba(100, 150, 255, 0.6);
}

/* 팝업 스타일 */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.popup.active {
    display: flex;
}

.popup-content {
    background: rgba(20, 25, 40, 0.98);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: popupSlide 0.3s ease-out;
}

@keyframes popupSlide {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popup-content h3 {
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 600;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #b0b0b0;
    transition: all 0.2s;
}

.close-btn:hover {
    color: #ff4444;
    transform: scale(1.1);
}

.popup-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: rgba(100, 150, 255, 0.08);
    border-left: 2px solid rgba(100, 150, 255, 0.5);
    border-radius: 4px;
}

.info-label {
    color: #b0b0b0;
}

.info-value {
    font-weight: 600;
    color: #ffffff;
}

/* 로딩 오버레이 */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.95);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(100, 150, 255, 0.2);
    border-top: 4px solid rgba(100, 150, 255, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    margin-top: 20px;
    font-size: 18px;
    color: #e0e0e0;
}

/* 툴팁 스타일 */
.tooltip {
    display: none;
    position: fixed;
    pointer-events: none;
    z-index: 1500;
    background: rgba(20, 25, 40, 0.95);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    font-size: 12px;
    color: #e0e0e0;
    max-width: 250px;
    line-height: 1.6;
}

.tooltip.active {
    display: block;
}

.tooltip-content {
    white-space: pre-line;
}

.tooltip-content strong {
    color: #ffffff;
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
}

/* 공통 모달 오버레이 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 4000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: rgba(20, 25, 40, 0.95);
    border: 1px solid rgba(100, 150, 255, 0.4);
    border-radius: 16px;
    width: 90%;
    max-width: 650px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(100, 150, 255, 0.2);
    animation: modalScale 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modalScale {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 스플래시 전용 스타일 */
.splash-content {
    max-width: 600px;
}

.splash-image-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 2px solid rgba(100, 150, 255, 0.3);
    background: #050a15;
}

.splash-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.splash-info {
    padding: 20px 30px;
}

.splash-info h2 {
    margin-bottom: 5px;
    font-size: 24px;
    text-align: center;
    text-shadow: 0 0 10px rgba(100, 150, 255, 0.5);
}

.splash-tagline {
    text-align: center;
    color: #b0b0b0;
    margin-bottom: 15px;
    font-size: 14px;
    font-style: italic;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.info-card {
    background: rgba(100, 150, 255, 0.08);
    border: 1px solid rgba(100, 150, 255, 0.15);
    border-radius: 10px;
    padding: 5px 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.card-title-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 5px;
}

.info-card:hover {
    background: rgba(100, 150, 255, 0.12);
    transform: translateY(-5px);
    border-color: rgba(100, 150, 255, 0.4);
}

.info-card i {
    font-size: 16px;
    color: #6496ff;
    margin-bottom: 0;
}

.info-card h4 {
    font-size: 13px;
    color: #808080;
    margin-bottom: 0;
    text-transform: uppercase;
}

.info-card p {
    font-size: 13px;
    color: #e0e0e0;
    font-weight: 500;
    white-space: nowrap;
}

.dev-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.dev-link:hover {
    color: #6496ff;
    text-decoration: underline;
}

/* 반응형 모달 */
@media (max-width: 600px) {
    .info-grid {
        grid-template-columns: 1fr;
    }

    .splash-info h2 {
        font-size: 22px;
    }
}