/* กล่อง Exp*2 Drop*2 ที่ขยับไปทางซ้าย */
.event-box {
    max-width: 400px;
    margin: 0 auto 30px calc(50% - 205px); /* ✅ ขยับซ้าย 5px จากตำแหน่งกลาง */
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00f7ff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.2);
    text-align: center;
    color: #00f7ff;
    font-size: 1em;
    font-weight: bold;
}

.event-time {
    margin-top: 10px;
    font-size: 0.95em;
    color: #ffffff;
}

/* กล่อง Ranking ทั้ง 4 */
.rankings-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(310px, 1fr));
    gap: 10px;
    justify-content: center;
    align-items: start;
    max-width: 1000px;
    margin: 30px auto 20px auto;
    padding: 0 20px;
}

.ranking-card {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00f7ff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.2);
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 247, 255, 0.3);
}

.ranking-title {
    color: #00f7ff;
    font-size: 1.2em;
    font-weight: bold;
}

.ranking-icon {
    font-size: 1.5em;
    filter: drop-shadow(0 0 2px rgba(0, 247, 255, 0.5));
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(0, 247, 255, 0.05);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.ranking-item:hover {
    background: rgba(0, 247, 255, 0.1);
    transform: translateX(5px);
}

.ranking-position {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9em;
    font-weight: bold;
}

.position-1 {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: #000;
}

.position-2 {
    background: linear-gradient(45deg, #c0c0c0, #a0a0a0);
    color: #000;
}

.position-3 {
    background: linear-gradient(45deg, #cd7f32, #a0522d);
    color: #000;
}

.ranking-name {
    color: white;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-score {
    color: #00f7ff;
    font-size: 0.9em;
    font-weight: bold;
}

.ranking-class-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 247, 255, 0.1);
    border-radius: 4px;
    margin-right: 5px;
}

/* Responsive */
@media (max-width: 1280px) {
    .rankings-container {
        grid-template-columns: repeat(2, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .rankings-container {
        grid-template-columns: 1fr;
    }

    .ranking-card {
        padding: 15px;
    }

    .ranking-title {
        font-size: 1.1em;
    }

    .ranking-item {
        padding: 8px;
        gap: 10px;
    }

    .ranking-position {
        width: 20px;
        height: 20px;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .ranking-card {
        padding: 12px;
    }

    .ranking-name {
        font-size: 0.8em;
    }

    .ranking-score {
        font-size: 0.8em;
    }
}

/* Animation */
@keyframes newRank {
    0% {
        background-color: rgba(0, 247, 255, 0.2);
    }
    100% {
        background-color: rgba(0, 247, 255, 0.05);
    }
}

.new-rank {
    animation: newRank 2s ease-out;
}

/* Special effects */
.top-rank {
    background: linear-gradient(45deg, 
        rgba(0, 247, 255, 0.05) 0%,
        rgba(0, 247, 255, 0.1) 50%,
        rgba(0, 247, 255, 0.05) 100%
    );
    border: 1px solid rgba(0, 247, 255, 0.2);
}

.rank-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ffd700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    color: #000;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}
