/* Rank Up Breakthrough Animations - Wuxia/Knight Style */

@keyframes kiem-khi-no {
    0% {
        transform: translateY(100%) scaleX(0.5);
        opacity: 0;
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 80px rgba(255, 255, 255, 1), 0 0 120px rgba(59, 130, 246, 0.6);
    }
    100% {
        transform: translateY(-150%) scaleX(2);
        opacity: 0;
        filter: blur(10px);
    }
}

@keyframes float-mist {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0.3; }
    50% { transform: translate(10px, -10px) rotate(2deg); opacity: 0.6; }
    100% { transform: translate(0, 0) rotate(0deg); opacity: 0.3; }
}

@keyframes slash-effect {
    0% {
        width: 0;
        opacity: 0;
        left: -10%;
    }
    20% {
        opacity: 1;
    }
    100% {
        width: 120%;
        opacity: 0;
        left: 110%;
    }
}

.breakthrough-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    overflow: hidden;
}

.kiem-khis {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.kiem-khi {
    position: absolute;
    bottom: -100px;
    width: 10px;
    height: 300px;
    background: linear-gradient(to top, transparent, #fff, transparent);
    filter: blur(2px);
    opacity: 0;
}

.rank-card-classic {
    position: relative;
    padding: 3rem;
    background: #1a1a1a;
    border: 4px solid #d4af37; /* Gold */
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
    text-align: center;
    max-width: 500px;
    width: 90%;
    transform: rotateX(10deg);
    animation: card-appear 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.rank-card-classic::before {
    content: '';
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    border: 2px solid #d4af37;
    pointer-events: none;
    opacity: 0.5;
}

.slash-line {
    position: absolute;
    top: 50%;
    left: -10%;
    width: 0;
    height: 10px;
    background: #fff;
    box-shadow: 0 0 20px #fff, 0 0 40px #3b82f6;
    transform: rotate(-15deg);
    z-index: 10001;
    pointer-events: none;
}

.rank-up-title {
    font-family: 'Cinzel', serif; /* Use a classic font */
    color: #d4af37;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.new-rank-name {
    font-size: 3.5rem;
    color: #fff;
    font-weight: bold;
    margin: 1.5rem 0;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.mascot-reveal {
    font-size: 1.2rem;
    color: #94a3b8;
    font-style: italic;
}

@keyframes card-appear {
    from { transform: scale(0.5) rotateX(45deg); opacity: 0; }
    to { transform: scale(1) rotateX(10deg); opacity: 1; }
}

/* Parchment Style for Roadmap */
.parchment-container {
    background-color: #f4e4bc;
    background-image: url('https://www.transparenttextures.com/patterns/old-map.png');
    padding: 2rem;
    border-radius: 5px;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.1), 0 10px 30px rgba(0,0,0,0.2);
    border: 20px solid transparent;
    border-image: url('https://i.pinimg.com/originals/30/1f/0e/301f0e495f57ed5e4a8b7cbfaca38746.png') 30 stretch;
    min-height: 100vh;
}
/* Stone Stele Roadmap Nodes */
.node-stele {
    background: #e2e8f0;
    background-image: linear-gradient(135deg, rgba(0,0,0,0.05) 0%, transparent 100%);
    border: 4px solid #475569;
    border-radius: 4px;
    box-shadow: 
        inset -4px -4px 0 rgba(0,0,0,0.1),
        inset 4px 4px 0 rgba(255,255,255,0.2),
        10px 10px 20px rgba(0,0,0,0.2);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.node-stele::after {
    content: "";
    position: absolute;
    top: 5px; left: 5px; right: 5px; bottom: 5px;
    border: 1px solid rgba(0,0,0,0.1);
    pointer-events: none;
}

.node-stele.achieved {
    border-color: #92400e;
    background-color: #fef3c7;
}

.node-stele.current {
    border-color: #0284c7;
    background-color: #f0f9ff;
    animation: stele-glow 2s infinite alternate;
}

@keyframes stele-glow {
    from { box-shadow: 0 0 10px rgba(2, 132, 199, 0.2); }
    to { box-shadow: 0 0 30px rgba(2, 132, 199, 0.6); }
}

/* Qi Trail between nodes */
.qi-trail {
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, #d4af37, #fef3c7);
    filter: blur(2px);
    z-index: 1;
    opacity: 0.5;
}

.mist-cloud {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    animation: float-mist 10s infinite ease-in-out;
}
