/* ==================================================================
   결과 모달 (신버전)
   구 style.css 5789~6216줄
   ⚠️ 파일명 번호 = 로드 순서. 뒤 파일이 앞을 덮어쓰므로 순서를 바꾸면 화면이 깨진다.
   ================================================================== */
/* ============================================
   NEW GAME RESULT MODAL (Improved UI/UX)
   ============================================ */

.result-modal-content-new {
    background: linear-gradient(180deg, #0d1117 0%, #161b22 100%);
    border: 2px solid #ffd700;
    border-radius: 2px;
    padding: 0;
    max-width: 420px;
    width: 92%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.2), 0 0 100px rgba(255, 215, 0, 0.1);
    animation: resultModalSlideUp 0.5s ease;
    display: flex;
    flex-direction: column;
}

@keyframes resultModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.result-header-new {
    background: linear-gradient(135deg, #1a1a2e 0%, #0d1117 100%);
    padding: 20px 30px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.result-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 5px;
}

.result-subtitle {
    font-size: 0.8rem;
    color: #888;
}

/* Podium Section */
.result-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    padding: 30px 20px 20px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.05) 0%, transparent 100%);
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
}

.podium-place:hover {
    transform: translateY(-5px);
}

.podium-medal {
    font-size: 2.5rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.podium-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podium-score {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.podium-base {
    width: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.8);
    border-radius: 2px 8px 0 0;
}

/* 1st place */
.podium-1 .podium-score {
    color: #ffd700;
}

.podium-1 .podium-base {
    height: 80px;
    background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

/* 2nd place */
.podium-2 .podium-score {
    color: #c0c0c0;
}

.podium-2 .podium-base {
    height: 60px;
    background: linear-gradient(180deg, #c0c0c0 0%, #808080 100%);
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.4);
}

/* 3rd place */
.podium-3 .podium-score {
    color: #cd7f32;
}

.podium-3 .podium-base {
    height: 45px;
    background: linear-gradient(180deg, #cd7f32 0%, #8b4513 100%);
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.4);
}

/* Table Section */
.result-table-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 15px 15px;
    max-height: 45vh;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.result-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.result-table th {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    color: #ffd700;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    border-bottom: 2px solid #ffd700;
    white-space: nowrap;
}

.result-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    transition: background 0.2s ease;
}

.result-table tbody tr:hover {
    background: rgba(255, 215, 0, 0.1);
}

/* Column styles */
.col-rank {
    width: 40px;
    font-weight: 700;
    font-size: 0.95rem;
}

.col-name {
    text-align: left !important;
    font-weight: 600;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-bonus {
    width: 60px;
}

.col-bonus.has-bonus {
    color: #4ade80 !important;
    font-weight: 600;
}

.col-total {
    font-weight: 700;
    color: #ffd700 !important;
    text-align: right !important;
}

/* Top 3 row styles */
.rank-1-row {
    background: rgba(255, 215, 0, 0.15) !important;
}

.rank-1-row td {
    border-color: rgba(255, 215, 0, 0.3);
}

.rank-1-row .col-total {
    color: #ffd700 !important;
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-2-row {
    background: rgba(192, 192, 192, 0.1) !important;
}

.rank-2-row .col-total {
    color: #c0c0c0 !important;
}

.rank-3-row {
    background: rgba(205, 127, 50, 0.1) !important;
}

.rank-3-row .col-total {
    color: #cd7f32 !important;
}

/* Footer */
.result-footer-new {
    padding: 15px 20px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.result-close-btn {
    padding: 12px 40px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border: 2px solid #ffd700;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-close-btn:hover {
    background: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .result-modal-content-new {
        width: 95%;
        max-width: 380px;
        max-height: 95vh;
        border-radius: 2px;
    }

    .result-header-new {
        padding: 12px 15px;
    }

    .result-title {
        font-size: 1.3rem;
    }

    .result-podium {
        padding: 15px 10px 10px;
        gap: 5px;
    }

    .podium-medal {
        font-size: 1.8rem;
    }

    .podium-name {
        font-size: 0.75rem;
        max-width: 65px;
    }

    .podium-score {
        font-size: 0.65rem;
    }

    .podium-base {
        width: 65px;
        font-size: 1.1rem;
    }

    .podium-1 .podium-base {
        height: 55px;
    }

    .podium-2 .podium-base {
        height: 40px;
    }

    .podium-3 .podium-base {
        height: 30px;
    }

    .result-table-container {
        max-height: 45vh;
        padding: 0 8px 8px;
    }

    .result-table {
        font-size: 0.75rem;
    }

    .result-table th {
        padding: 8px 5px;
        font-size: 0.7rem;
    }

    .result-table td {
        padding: 8px 5px;
    }

    .col-rank {
        width: 32px;
        font-size: 0.85rem;
    }

    .col-name {
        max-width: 70px;
    }

    .col-bonus {
        width: 50px;
    }

    .result-close-btn {
        padding: 10px 25px;
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .result-modal-content-new {
        width: 98%;
        max-width: 350px;
    }

    .result-title {
        font-size: 1.1rem;
    }

    .podium-base {
        width: 55px;
    }

    .result-table {
        font-size: 0.7rem;
    }

    .col-name {
        max-width: 60px;
    }

    .col-bonus {
        width: 45px;
        font-size: 0.65rem;
    }
}

/* 긴급속보 배너 */
.breaking-news-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999998;
    background: rgba(6, 2, 12, 0.92);
    border-bottom: 2px solid #ff003c;
    color: #fff;
    text-align: center;
    padding: 11px 20px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    box-shadow: 0 0 30px rgba(255,0,60,0.35), inset 0 0 40px rgba(255,0,60,0.05);
    backdrop-filter: blur(6px);
    animation: breakingFlash 0.8s ease-in-out infinite alternate;
}
.breaking-news-banner::before {
    content: '⚠ BREAKING';
    display: inline-block;
    background: #ff003c;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    padding: 2px 8px;
    margin-right: 12px;
    vertical-align: middle;
    box-shadow: 0 0 10px rgba(255,0,60,0.6);
}
@keyframes breakingFlash {
    0%   { border-bottom-color: #ff003c; box-shadow: 0 0 30px rgba(255,0,60,0.35), inset 0 0 40px rgba(255,0,60,0.05); }
    100% { border-bottom-color: #ff6688; box-shadow: 0 0 50px rgba(255,0,60,0.55), inset 0 0 60px rgba(255,0,60,0.1); }
}
