/* 팝업 오버레이 */
.contest-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 팝업 컨테이너 */
.contest-popup-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: linear-gradient(145deg, rgba(15, 93, 54, 0.98), rgba(10, 61, 36, 0.98));
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    padding: 0;
    box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(0, 255, 136, 0.2);
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    overflow: hidden;
}

@keyframes popIn {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 상단 헤더 */
.contest-popup-header {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contest-popup-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.1) 10px,
            rgba(255, 255, 255, 0.1) 20px
    );
    animation: headerShine 20s linear infinite;
}

@keyframes headerShine {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50%, 50%); }
}

.contest-popup-title {
    position: relative;
    z-index: 1;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: #000;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.3);
    margin: 0;
    letter-spacing: 2px;
}

.contest-popup-subtitle {
    position: relative;
    z-index: 1;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin: 5px 0 0 0;
}

/* 닫기 버튼 */
.contest-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    font-family: Arial, sans-serif;
    line-height: 1;
}

.contest-popup-close:hover {
    background: rgba(255, 0, 0, 0.7);
    border-color: #ff0000;
    transform: rotate(90deg);
}

/* 컨텐츠 영역 */
.contest-popup-content {
    padding: 30px 20px;
}

/* 대회 시간 배지 */
.contest-time-badge {
    background: rgba(0, 255, 136, 0.15);
    border: 2px solid #00ff88;
    border-radius: 50px;
    padding: 12px 20px;
    margin: 0 auto 25px;
    width: fit-content;
    animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 255, 136, 0.6);
    }
}

.contest-time-text {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: #00ff88;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.contest-time-icon {
    font-size: 24px;
    margin-right: 8px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 정보 카드 */
.contest-info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.contest-info-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.contest-info-card:hover {
    transform: translateY(-3px);
    border-color: #00ff88;
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.2);
}

.contest-info-icon {
    font-size: 32px;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.contest-info-label {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    font-weight: 600;
}

.contest-info-value {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: #00ff88;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
    margin-bottom: 8px;
}

.contest-info-value.prize {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    font-size: 30px;
}

.contest-info-badge {
    display: inline-block;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.contest-info-badge.free {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000;
}

.contest-info-badge.winner {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
}

/* 특징 리스트 */
.contest-features {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.contest-feature-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contest-feature-item:last-child {
    border-bottom: none;
}

.contest-feature-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 14px;
    flex-shrink: 0;
}

/* 참여 버튼 */
.new-contest-participate-btn {
    width: 100%;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    border: none;
    border-radius: 12px;
    padding: 18px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
    position: relative;
    overflow: hidden;
}

.new-contest-participate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.new-contest-participate-btn:hover::before {
    left: 100%;
}

.new-contest-participate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 255, 136, 0.6);
}

.new-contest-participate-btn:active {
    transform: translateY(-1px);
}

/* 하단 안내문구 */
.contest-notice {
    text-align: center;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 15px;
    line-height: 1.5;
}

/* 오늘 하루 보지 않기 */
.contest-dont-show {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    cursor: pointer;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
}

.contest-dont-show:hover {
    color: #00ff88;
}

.contest-dont-show input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.contest-dont-show label {
    cursor:pointer;
}
/* 모바일 대응 */
@media (max-width: 600px) {
    .contest-popup-container {
        max-width: 95%;
        margin: 0 10px;
    }

    .contest-popup-title {
        font-size: 20px;
    }

    .contest-popup-subtitle {
        font-size: 12px;
    }

    .contest-time-text {
        font-size: 18px;
    }

    .contest-info-cards {
        gap: 10px;
    }

    .contest-info-card {
        padding: 15px 10px;
    }

    .contest-info-icon {
        font-size: 28px;
    }

    .contest-info-value {
        font-size: 22px;
    }

    .contest-info-value.prize {
        font-size: 24px;
    }

    .contest-info-badge {
        font-size: 10px;
        padding: 3px 10px;
    }

    .contest-feature-item {
        font-size: 13px;
    }

    .new-contest-participate-btn {
        font-size: 16px;
        padding: 16px;
    }

    .contest-popup-content {
        padding: 25px 15px;
    }
}

/* 작은 모바일 */
@media (max-width: 400px) {
    .contest-popup-title {
        font-size: 18px;
    }

    .contest-time-text {
        font-size: 16px;
    }

    .contest-info-icon {
        font-size: 24px;
    }

    .contest-info-value {
        font-size: 20px;
    }

    .contest-info-value.prize {
        font-size: 22px;
    }
}

/* 배지 애니메이션 */
.daily-badge {
    display: inline-block;
    background: #ff4757;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 8px;
    animation: wiggle 1s infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}