/* Ideal Type World Cup styles (v3.6) */
.iwc-container {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    position: relative;
}
.iwc-round-info {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 12px;
}
.iwc-match {
    display: flex !important;
    gap: 16px;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    position: relative;
}
.iwc-card {
    position: relative;
    flex: 1 1 0;
    display: block !important;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    background: #000;
    min-height: 200px; /* 모바일에서도 최소 높이 확보 */
}
.iwc-click-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
    background: transparent;
    z-index: 5;
}
.iwc-media {
    position: relative;
    width: 100%;
    padding-top: 125%; /* 4:5 비율 */
    overflow: hidden;
    background: #000;
    display: block !important;
}
.iwc-media video,
.iwc-media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block !important;
    object-fit: cover;
}
.iwc-img-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}
.iwc-name {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 6;
}
.iwc-card.iwc-selected {
    transform: scale(1.08);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
    z-index: 10;
}
.iwc-card.iwc-deselected {
    opacity: 0;
    transform: scale(0.94);
}
.iwc-final-message {
    margin-top: 20px;
    font-size: 1.3rem;
    font-weight: 700;
}
.iwc-card-final {
    max-width: 640px;
    margin: 0 auto;
}
.iwc-container.iwc-finished .iwc-match {
    justify-content: center;
}
.iwc-vs-badge {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.8rem;
    font-weight: 900;
    color: #ffb300;
    text-shadow:
        0 0 6px rgba(0,0,0,0.9),
        0 0 18px rgba(0,0,0,0.8),
        0 0 30px rgba(0,0,0,0.7);
    pointer-events: none;
    z-index: 20;
    padding: 6px 18px;
}
.iwc-container.iwc-finished .iwc-vs-badge {
    display: none;
}
@media (max-width: 768px) {
    .iwc-container {
        max-width: 100%;
        padding: 0 10px;
    }
    .iwc-match {
        flex-direction: column !important;
        gap: 16px;
    }
    .iwc-card {
        width: 100%;
        /* 세로 스택일 때는 flex 비율 나누지 않도록 고정 */
        flex: none !important;
    }
    /* 모바일에서는 PC와 같은 4:5 계열 비율을 유지하되
       가로폭 100%에 맞춰 조금 더 크게 보이도록 처리 */
    .iwc-media {
        padding-top: 100% !important;
        aspect-ratio: 4 / 5;
    }
    .iwc-vs-badge {
        top: 52%;
        font-size: 2.4rem;
    }
}
