/* 대회 팝업 오버레이 */
.tournament-wrp {
    font-family:'snsv', 'sans-serif';
}

.tournament-top-wrp {
    height: 50px;
    padding: 10px;
    border-bottom: 1px solid #27532c;
    background: rgba(1,25,30,0.78);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family:'snsv','sans-serif';
}

.tournament-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    font-family:'snsv','sans-serif';
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 대회 팝업 컨테이너 */
.tournament-popup {
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
    border: 2px solid #00ff88;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow:
            0 20px 40px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(0, 255, 136, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 500px;
    max-width: 90%;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes popIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 배경 애니메이션 */
.tournament-popup::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
            transparent,
            rgba(0, 255, 136, 0.1),
            transparent
    );
    animation: rotate 4s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 제목 */
.tournament-title {
    font-size: 16px;
    color: #00ff88;
    font-weight: bold;
    text-shadow: 2px 2px 3px rgb(0 0 0);
}

.tournament-money {
    font-size: 14px;
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px 3px rgb(0 0 0);
}

.tournament-info-box {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    backdrop-filter: blur(10px);
    padding-bottom:5px;
}

@keyframes glow {
    from {
        text-shadow:
                0 0 10px rgba(0, 255, 136, 0.5),
                2px 2px 4px rgba(0, 0, 0, 0.5);
    }
    to {
        text-shadow:
                0 0 20px rgba(0, 255, 136, 0.8),
                0 0 30px rgba(0, 255, 136, 0.4),
                2px 2px 4px rgba(0, 0, 0, 0.5);
    }
}

.tournament-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

/* 상금 정보 */
.prize-info {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.1));
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.prize-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.prize-info .prize-amount {
    font-size: 36px;
    font-weight: 900;
    color: #ffd700;
    margin-bottom: 5px;
    text-shadow:
            0 0 10px rgba(255, 215, 0, 0.6),
            2px 2px 4px rgba(0, 0, 0, 0.5);
}

.prize-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* 카운트다운 원형 */
.countdown-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 30px auto;
}

.countdown-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(
            #00ff88 0deg,
            #00ff88 var(--progress, 360deg),
            rgba(255, 255, 255, 0.1) var(--progress, 360deg)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: pulse 1s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { box-shadow: 0 0 20px rgba(0, 255, 136, 0.3); }
    to { box-shadow: 0 0 40px rgba(0, 255, 136, 0.6); }
}

.countdown-inner {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.9), rgba(22, 33, 62, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 255, 136, 0.3);
}

.countdown-number {
    font-size: 36px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 버튼들 */
.button-container {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-join {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #000;
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

.btn-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.6);
}

.btn-join:active {
    transform: translateY(0);
}

.btn-close {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 참여 조건 */
.conditions {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.conditions-title {
    color: #ffc107;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .tournament-popup {
        width: 90%;
        padding: 25px 20px;
        margin: 20px;
    }

    .tournament-title {
        font-size: 24px;
    }

    .tournament-subtitle {
        font-size: 14px;
    }

    .prize-amount {
        font-size: 28px;
    }

    .countdown-container {
        width: 100px;
        height: 100px;
    }

    .countdown-circle {
        width: 100px;
        height: 100px;
    }

    .countdown-inner {
        width: 75px;
        height: 75px;
    }

    .countdown-number {
        font-size: 28px;
    }

    .button-container {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .tournament-title {
        font-size: 20px;
    }

    .prize-amount {
        font-size: 24px;
    }

    .countdown-number {
        font-size: 24px;
    }
}

/* 닫힌 상태에서 숨김 */
.tournament-overlay.hidden {
    display: none;
}

/* 트로피 아이콘 애니메이션 */
.trophy-icon {
    color: #ffd700;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.tournament-info-title {
    font-size: 14px;
    color: #00ff88;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tournament-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

.tournament-info-item:last-child {
    border-bottom: none;
}

.tournament-info-label {
    color: rgba(255, 255, 255, 0.7);
}

.tournament-info-value {
    color: #fff;
    font-weight: bold;
}

.tournament-prize, .tournament-info-item .my-money {
    color: #e3c44d;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.tournament-info-box {
    margin:10px 10px;
}

/* 진행 상황 바 */
.progress-info {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 8px;
    margin: 8px 0;
}

/*.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin: 5px 0;
}*/

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00cc6a);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.my-tournament-info-box {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin: 15px 10px;
}

.my-tournament-title {
    font-size: 14px;
    color: #00ff88;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.my-money-display {
    font-size: 18px;
    color: #00ff88;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.my-rank-display {
    font-size: 14px;
    color: #fff;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 8px;
}

.tournament-ranking-box {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 15px 10px;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.tournament-ranking-title {
    font-size: 14px;
    color: #00ff88;
    font-weight: bold;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ranking-list {

    overflow-y: auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ranking-item.my-rank {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-left: none;
    border-right: none;
}

.ranking-item.eliminated {
    opacity: 0.6;
    background: rgba(255, 0, 0, 0.1);
}

.rank-number {
    font-size: 14px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
    color: #e3c44d;
}

.rank-number.first {
    color: #FFD700;
}

.rank-number.second {
    color: #C0C0C0;
}

.rank-number.third {
    color: #CD7F32;
}

.player-name {
    flex: 1;
    margin-left: 15px;
    font-size: 13px;
    color: #fff;
}

.player-money {
    font-size: 13px;
    font-weight: bold;
    color: #e3c44d;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.eliminated-badge {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4757;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    margin-left: 8px;
}

/* 순위 변경 애니메이션 */
@keyframes rankUp {
    0% {
        transform: translateY(0);
        background: rgba(0, 255, 136, 0.2);
    }
    50% {
        transform: translateY(-5px);
        background: rgba(0, 255, 136, 0.4);
        box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
    }
    100% {
        transform: translateY(0);
        background: rgba(0, 255, 136, 0.1);
    }
}

@keyframes rankDown {
    0% {
        transform: translateY(0);
        background: rgba(255, 0, 0, 0.2);
    }
    50% {
        transform: translateY(5px);
        background: rgba(255, 0, 0, 0.4);
        box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
    }
    100% {
        transform: translateY(0);
        background: transparent;
    }
}

@keyframes newEntry {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.rank-up {
    animation: rankUp 0.8s ease-out;
}

.rank-down {
    animation: rankDown 0.8s ease-out;
}

.new-entry {
    animation: newEntry 0.5s ease-out;
}

.betting-oe-box {
    height:105px;
}

#body .betting-opt-box {
    margin-bottom:0;
}

#rankingList .empty-box {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.6);
}

.betting-contro-wrp .title {
    position:relative;
}

.betting-contro-wrp .title .tourn-betting-count {
    display:none;
    position:absolute;
    left:50%;
    top:50%;
    transform: translate(-50%,-50%);
    background:#ffffff3b;
    border-radius:3px;
    padding:0px 10px;
    height:30px;
    line-height:30px;
    font-size:14px;
}

.lose-box {
    background:#ff000033;
}