/* 全局响应式变量 */
:root {
    --medal-width-desktop: 180px;
    --medal-width-mobile: 120px;
    --medal-gap-desktop: 30px;
    --medal-gap-mobile: 15px;
    --first-height-offset: 30px; /* 第一名上移距离（改用margin-bottom） */
    --second-height-offset: 8px; /* 第二名上移距离 */
    --hover-lift: 8px; /* hover额外上移距离 */
    --hover-scale: 1.05; /* hover放大比例（加大更明显） */
}

/* 优化后的奖台样式 - 标准领奖台布局（213） */
.medal-platform {
    display: flex;
    justify-content: center;
    align-items: flex-end; /* 底部对齐，用margin-bottom控制上移 */
    gap: var(--medal-gap-desktop);
    margin: 40px 0 35px;
    position: relative;
    z-index: 10;
    min-height: 220px; /* 增加最小高度，适配第一名高度 */
    padding: 0 20px;
}

/* 奖台底座 */
.medal-platform::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(var(--medal-width-desktop) * 3 + var(--medal-gap-desktop) * 2 + 40px);
    height: 12px;
    background: linear-gradient(to top, #4a4a4a, #6b6b6b);
    border-radius: 8px 8px 0 0;
    z-index: 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

/* 奖牌项基础样式 */
.medal-item {
    text-align: center;
    width: var(--medal-width-desktop);
    padding: 30px 15px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.18);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
    border: 2px solid rgba(255,255,255,0.2);
    /* 初始无transform，改用margin-bottom控制高度 */
    margin-bottom: 0;
}

/* Hover动效强化（所有奖牌统一效果） */
.medal-item:hover {
    transform: translateY(-var(--hover-lift)) scale(var(--hover-scale));
    box-shadow: 0 12px 24px rgba(0,0,0,0.25);
}

/* 第一名样式（最高、最突出） */
.medal-item.first {
    background: linear-gradient(135deg, #FFD700 0%, #F0C800 50%, #E6B800 100%);
    z-index: 3;
    margin-bottom: var(--first-height-offset); /* 用margin-bottom上移 */
    width: calc(var(--medal-width-desktop) + 20px); /* 宽度略宽 */
}

/* 第二名样式 */
.medal-item.second {
    background: linear-gradient(135deg, #C0C0C0 0%, #B0B0B0 50%, #A0A0A0 100%);
    z-index: 2;
    margin-bottom: var(--second-height-offset); /* 用margin-bottom上移 */
}

/* 第三名样式 */
.medal-item.third {
    background: linear-gradient(135deg, #CD7F32 0%, #B86E22 50%, #A85A00 100%);
    z-index: 1;
    margin-bottom: 0;
}

/* 奖牌排名文字 */
.medal-rank {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.medal-rank::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    border-radius: 3px;
}

/* 奖牌图标 */
.medal-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

/* 呼号文字 */
.medal-callsign {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* 次数文字 */
.medal-count {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 各奖牌文字配色（优化对比度） */
.medal-item.first .medal-rank,
.medal-item.first .medal-callsign,
.medal-item.first .medal-count {
    color: #8B6508; /* 深金色文字，增强对比度 */
    text-shadow: 0 1px 1px rgba(255,255,255,0.8);
}
.medal-item.first .medal-rank::after {
    background: #8B6508;
}

.medal-item.second .medal-rank,
.medal-item.second .medal-callsign,
.medal-item.second .medal-count {
    color: #444; /* 深灰色文字 */
    text-shadow: 0 1px 1px rgba(255,255,255,0.8);
}
.medal-item.second .medal-rank::after {
    background: #444;
}

.medal-item.third .medal-rank,
.medal-item.third .medal-callsign,
.medal-item.third .medal-count {
    color: #fff; /* 白色文字 */
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.medal-item.third .medal-rank::after {
    background: #fff;
}

/* 移动端适配（屏幕宽度<768px） */
@media (max-width: 768px) {
    :root {
        --first-height-offset: 20px;
        --second-height-offset: 5px;
        --hover-lift: 6px;
        --hover-scale: 1.03;
    }
    .medal-platform {
        gap: var(--medal-gap-mobile);
        min-height: 180px;
        margin: 30px 0 25px;
    }
    
    .medal-platform::before {
        width: calc(var(--medal-width-mobile) * 3 + var(--medal-gap-mobile) * 2 + 20px);
    }
    
    .medal-item {
        width: var(--medal-width-mobile);
        padding: 20px 10px 18px;
    }
    
    .medal-item.first {
        width: calc(var(--medal-width-mobile) + 15px);
    }
    
    .medal-icon {
        font-size: 2.8rem;
        margin-bottom: 10px;
    }
    
    .medal-callsign {
        font-size: 1.3rem;
    }
    
    .medal-rank {
        font-size: 1.1rem;
    }
    
    .medal-count {
        font-size: 1rem;
    }
}

/* 极小屏适配（<480px） */
@media (max-width: 480px) {
    :root {
        --first-height-offset: 15px;
        --second-height-offset: 3px;
        --hover-lift: 5px;
    }
    .medal-platform {
        gap: 10px;
        padding: 0 10px;
    }
    
    .medal-item {
        width: 100px;
    }
    
    .medal-item.first {
        width: 110px;
    }
    
    .medal-callsign {
        font-size: 1.1rem;
    }
    
    .medal-icon {
        font-size: 2.2rem;
    }
}