/* 원스토어 팝업 스타일 */
#oneStorePopup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#oneStorePopup.active {
    display: flex;
}

.onestore-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.onestore-popup-content {
    position: relative;
    background: rgba(15, 30, 25, 0.95);
    border: 1px solid rgba(0, 165, 181, 0.3);
    /* 원스토어 브랜드 컬러 */
    border-radius: 1.5rem;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: popupSlideIn 0.4s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* 내부 스크롤을 위해 틀은 고정 */
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

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

.onestore-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    /* 크기 확대 */
    height: 2.5rem;
    /* 크기 확대 */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    /* 가시성 개선 */
    transition: all 0.2s;
    z-index: 1000;
    /* 훨씬 높은 값으로 설정 */
}

.onestore-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.onestore-popup-header {
    background: linear-gradient(135deg, rgba(15, 30, 25, 1), rgba(0, 165, 181, 0.1));
    padding: 2rem 1.5rem 1.25rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 165, 181, 0.1);
    position: sticky;
    top: 0;
    z-index: 20;
}

.onestore-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.onestore-brand-icon {
    font-size: 1.5rem;
    color: #00A5B5;
    /* 원스토어 컬러 */
}

.onestore-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.onestore-highlight {
    color: #36e27b;
    /* 강조색 (무료) */
    font-weight: 700;
}

.onestore-popup-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* iOS 부드러운 스크롤 */
    touch-action: pan-y;
    /* 터치 방향 명시 */
}

.app-list-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.app-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #d1d5db;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.app-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.app-name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-badge {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.onestore-message {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.5;
}

.onestore-cta-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #00A5B5 0%, #008a99 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 165, 181, 0.3);
}

.onestore-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 165, 181, 0.4);
}

.onestore-popup-footer {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    justify-content: center;
}

.dont-show-today {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}

.dont-show-today input {
    accent-color: #00A5B5;
    width: 16px;
    height: 16px;
}

/* 반응형 모바일 */
@media (max-width: 480px) {
    .onestore-popup-content {
        width: 95%;
    }

    .app-list {
        grid-template-columns: 1fr;
    }

    .app-item {
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.02);
    }
}

/* 스크롤바 스타일 (필요한 영역만 적용) */
.onestore-popup-body::-webkit-scrollbar {
    width: 6px;
}

.onestore-popup-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.onestore-popup-body::-webkit-scrollbar-thumb {
    background: rgba(0, 165, 181, 0.3);
    border-radius: 3px;
}

.onestore-popup-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 165, 181, 0.5);
}