/* Level-Up Ceremony Overlay */

.level-up-ceremony {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 7000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow-y: auto;
}

.level-up-ceremony.ceremony-active {
    opacity: 1;
}

.level-up-ceremony.ceremony-exit {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.ceremony-content {
    max-width: 500px;
    width: 90%;
    text-align: center;
    padding: 20px;
}

/* Golden Flash */
.ceremony-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 215, 0, 0.6);
    pointer-events: none;
    animation: ceremony-flash-anim 0.8s ease-out forwards;
    z-index: 7001;
}

@keyframes ceremony-flash-anim {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Level Banner */
.ceremony-banner {
    margin-bottom: 30px;
    animation: ceremony-banner-in 0.8s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes ceremony-banner-in {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.ceremony-level-text {
    font-size: 18px;
    font-weight: bold;
    color: #FFD700;
    letter-spacing: 8px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    margin-bottom: 5px;
}

.ceremony-level-number {
    font-size: 72px;
    font-weight: bold;
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.7));
    line-height: 1;
}

/* Sections */
.ceremony-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    animation: ceremony-section-in 0.5s ease both;
}

@keyframes ceremony-section-in {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.ceremony-section-title {
    font-size: 14px;
    font-weight: bold;
    color: #FFD700;
    letter-spacing: 3px;
    margin-bottom: 15px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

/* Stat Allocation */
.ceremony-points-remaining {
    font-size: 16px;
    color: #fff;
    margin-bottom: 15px;
}

#ceremony-points-count {
    color: #FFD700;
    font-weight: bold;
    font-size: 20px;
}

.ceremony-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ceremony-stat-row:last-of-type {
    border-bottom: none;
}

.stat-label {
    font-size: 14px;
    font-weight: bold;
    min-width: 80px;
    text-align: left;
}

.stat-effect {
    font-size: 11px;
    color: #aaa;
    min-width: 100px;
    text-align: left;
}

.stat-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.stat-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: #FFD700;
}

.stat-btn:active {
    transform: scale(0.9);
}

.stat-value {
    color: #fff;
    font-size: 14px;
    min-width: 60px;
    text-align: center;
}

/* Perk Cards */
.ceremony-perk-cards {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.ceremony-perk-card {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    width: 140px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.ceremony-perk-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.ceremony-perk-card.perk-selected {
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    transform: translateY(-5px) scale(1.05);
}

.perk-archetype {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.perk-name {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
}

.perk-desc {
    font-size: 11px;
    color: #aaa;
    line-height: 1.4;
}

/* Cosmetic Reveal */
.ceremony-cosmetic-name {
    font-size: 24px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    animation: cosmetic-glow 2s ease-in-out infinite alternate;
}

@keyframes cosmetic-glow {
    0% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    100% { text-shadow: 0 0 25px rgba(255, 215, 0, 0.8); }
}

/* Rewards */
.ceremony-reward-coins {
    font-size: 28px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Buttons */
.ceremony-confirm-btn {
    display: inline-block;
    padding: 10px 30px;
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 100%);
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.ceremony-confirm-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #555;
    color: #999;
}

.ceremony-confirm-btn:not(:disabled):hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.ceremony-continue-btn {
    display: inline-block;
    padding: 15px 50px;
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 100%);
    border: none;
    border-radius: 10px;
    color: #000;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    animation: continue-pulse 2s ease-in-out infinite;
}

@keyframes continue-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.7); }
}

.ceremony-continue-btn:hover {
    transform: scale(1.05);
}

/* Mobile */
@media (max-width: 768px) {
    .ceremony-content {
        padding: 15px;
    }

    .ceremony-level-number {
        font-size: 52px;
    }

    .ceremony-perk-cards {
        flex-direction: column;
        align-items: center;
    }

    .ceremony-perk-card {
        width: 90%;
        max-width: 280px;
    }

    .ceremony-stat-row {
        flex-wrap: wrap;
        gap: 5px;
    }

    .stat-effect {
        order: 3;
        width: 100%;
        text-align: center;
    }
}
