/* Winner Modal Styles */
#modal-wrap {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0);
    z-index: 100;
}

.winner-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    z-index: 9999;
    background: #FFF;
    overflow: scroll;
    max-width: 900px;
    max-height: 600px;
    width: 90%;
    border-radius: 15px;
}

.modal-content {
    position: relative;
}

.modal-header button {
    background: transparent;
    border: 0;
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
}

.modal-header button span {
    font-size: 50px;
}

.popup-text {
    padding: 16px;
}

.popup-text h5 {
    margin: 5px 0px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.5;
    text-align: center;
}

.popup-text p {
    line-height: 1.5;
    margin: 15px 0px;
}

.popup-text b {
    font-weight: 900;
    line-height: 1.5;
}

.last_b {
    display: block;
    margin-top: 15px;
}

.winner-list img {
    width: 100%;
}

/* Flex 布局樣式 - 簡化版 */
.winner-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.category-section {
    display: flex;
    flex-direction: column;
}

.category-header {
    font-size: 14px;
    font-weight: bold;
    padding: 10px 0;
}

.winner-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.winner-item .school {
    flex: 1;
    padding-right: 20px;
    text-align: center;
}

.winner-item .team {
    flex: 1;
    text-align: center;
}

.note {
    font-size: 12px;
    color: #666;
    text-align: center;
    padding: 10px 0;
}

/* 響應式設計 */
@media (max-width: 767px) {
    .winner-modal {
        padding: 15px;
        max-width: 95vw;
        max-height: 90vh;
    }
    
    .popup-text {
        padding: 1rem;
    }
    
    .popup-text h5 {
        font-size: 16px;
    }
    
    .category-header {
        font-size: 12px;
    }
    
    .winner-item {
        flex-direction: row;
        justify-content: space-between;
        font-size: 12px;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .winner-item .school,
    .winner-item .team {
        text-align: center;
        padding-right: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .note {
        font-size: 10px;
    }
}