/* badges.css */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
    padding: 10px;
}


.card {
    width: calc(25% - 15px);
    aspect-ratio: 1/1;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.badge-container {
    position: relative;
    width: 80%;
    height: 80%;
    margin: 0 auto;
}

.badge-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(3px 3px 1px rgba(0,0,0,0.5));
}

.badge-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid;
    box-sizing: border-box;
}

.ring-label {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 3px 0;
    line-height: 1.2;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 600;
    box-sizing: border-box;
    z-index: 2;
}

.ring-label span {
    display: block;
    width: 100%;
    text-align: center;
}

.congrats-trigger {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background-color: #ffc107;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.congrats-trigger:hover {
    transform: scale(1.1);
    background-color: #ffab00;
}

.congrats-trigger i {
    color: white;
    font-size: 12px;
}

.congrats-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    border-radius: 10px;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 4;
    padding: 15px;
    box-sizing: border-box;
}

.congrats-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 80%;
    max-height: 70vh;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.congrats-content::-webkit-scrollbar {
    display: none;
}

.congrats-content p {
    padding: 0 10px;
}

.congrats-content h4 {
    color: #28a745;
    margin-bottom: 10px;
}

.close-congrats {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .card {
        width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .card {
        width: calc(100% - 10px);
    }
}


/* 新增烟花画布样式 */
#fireworks-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    background-color: transparent; /* 确保背景透明 */
}