/* Modals and components UI - extracted from inline index.html */

.proficiencies {
    margin-top: 20px;
}

.prof-title {
    font-size: 1.2em;
    color: #4ecdc4;
    margin-bottom: 10px;
    font-weight: bold;
}

.roulette-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.roulette-container {
    width: 750px;
    height: 200px;
    overflow: hidden;
    position: relative;
    border: 3px solid #ffd700;
    border-radius: 10px;
    background: rgba(26, 26, 46, 0.8);
}

.roulette-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    background: #ff0000;
    z-index: 10;
    transform: translateX(-50%);
}

.roulette-items {
    display: flex;
    align-items: center;
    height: 100%;
    transition: transform 3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.roulette-item {
    min-width: 160px;
    width: 160px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #000;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.roulette-result {
    margin-top: 30px;
    font-size: 1.5em;
    color: #ffd700;
    text-align: center;
}

.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.confirm-modal.active {
    display: flex;
}

.confirm-box {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #4ecdc4;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.confirm-title {
    font-size: 1.5em;
    color: #4ecdc4;
    margin-bottom: 20px;
    font-weight: bold;
}

.confirm-message {
    font-size: 1.1em;
    color: #fff;
    margin-bottom: 30px;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirm-btn {
    padding: 12px 30px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.confirm-btn.yes {
    background: #4ecdc4;
    color: #1a1a2e;
}

.confirm-btn.yes:hover {
    background: #45b7aa;
    transform: scale(1.05);
}

.confirm-btn.no {
    background: #e74c3c;
    color: #fff;
}

.confirm-btn.no:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.refine-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.refine-modal.active {
    display: flex;
}

.refine-box {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 3px solid #ffd700;
    border-radius: 15px;
    padding: 30px;
    min-width: 450px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

.refine-title {
    font-size: 1.8em;
    color: #ffd700;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.refine-info {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.refine-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    font-size: 1.1em;
    color: #fff;
}

.refine-stat-label {
    color: #4ecdc4;
    font-weight: bold;
}

.refine-stat-value {
    color: #ffd700;
    font-weight: bold;
}

.refine-cost {
    font-size: 1.2em;
    color: #ff6b6b;
    margin: 15px 0;
    font-weight: bold;
}

.refine-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.refine-btn {
    padding: 15px 35px;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.refine-btn.upgrade {
    background: linear-gradient(135deg, #4ecdc4 0%, #45b7aa 100%);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.refine-btn.upgrade:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.6);
}

.refine-btn.close {
    background: #e74c3c;
    color: #fff;
}

.refine-btn.close:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.qi-breakdown-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.qi-breakdown-modal.active {
    display: flex;
}

.qi-breakdown-box {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #4ecdc4;
    border-radius: 15px;
    padding: 30px;
    min-width: 500px;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

.qi-breakdown-title {
    font-size: 1.8em;
    color: #ffd700;
    text-align: center;
    margin-bottom: 25px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.qi-breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    margin: 8px 0;
    background: rgba(78, 205, 196, 0.1);
    border-radius: 8px;
    border-left: 3px solid #4ecdc4;
}

.qi-breakdown-label {
    color: #4ecdc4;
    font-weight: bold;
}

.qi-breakdown-value {
    color: #ffd700;
    font-weight: bold;
}

.qi-breakdown-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    margin-top: 20px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.3) 0%, rgba(69, 183, 170, 0.3) 100%);
    border-radius: 10px;
    border: 2px solid #4ecdc4;
    font-size: 1.3em;
}

.sidepanel {
    width: 300px;
    min-width: 300px;
    height: 100%;
    background: rgba(26, 26, 46, 0.95);
    border-right: 2px solid #4ecdc4;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 20px;
    gap: 15px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidepanel-btn {
    width: 80%;
    max-width: 200px;
    height: 65px;
    background: rgba(78, 205, 196, 0.2);
    border: 2px solid #4ecdc4;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: #4ecdc4;
    transition: all 0.3s;
    position: relative;
    line-height: 1;
}

.sidepanel-btn:hover {
    background: rgba(78, 205, 196, 0.4);
    transform: scale(1.1);
}

.sidepanel-btn.active {
    background: #4ecdc4;
    color: #1a1a2e;
}

.sidepanel-btn.danger {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.sidepanel-btn.danger:hover {
    background: rgba(255, 107, 107, 0.4);
}

.sidepanel-divider {
    width: 80%;
    max-width: 200px;
    height: 2px;
    background: #4ecdc4;
    margin: 10px 0;
}

.sidepanel-info {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid #4ecdc4;
    margin-bottom: 10px;
}

.sidepanel-stat {
    margin: 12px 0;
    font-size: 1em;
    color: #fff;
    text-align: center;
}

.sidepanel-stat-label {
    color: #4ecdc4;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    font-size: 1em;
}

.sidepanel-stat-value {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.1em;
}

.sidepanel-progress {
    width: 90%;
    height: 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    margin: 8px auto;
    overflow: hidden;
    border: 1px solid #4ecdc4;
}

.sidepanel-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4 0%, #45b7aa 100%);
    transition: width 0.3s;
    border-radius: 3px;
}

.container {
    width: 100%;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    height: 100%;
    overflow-y: auto;
}

.tooltip {
    position: fixed;
    left: 75px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9em;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 99999;
    border: 1px solid #4ecdc4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.sidepanel-btn:hover .tooltip {
    opacity: 1;
}

/* Dantian Orb Styles - 3 layers: Impurities (black), Corruption (red), Purity (blue) */
.dantian-orb {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Impurities layer (black) - bottom */
.dantian-impurities {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0%;
    background: linear-gradient(to top, #000, #1a1a1a, #2a2a2a);
    transition: height 0.5s ease-out;
}

/* Corruption layer (red/purple) - middle */
.dantian-corruption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0%;
    background: linear-gradient(to top, #4a0a0a, #8b0000, #dc143c);
    transition: height 0.5s ease-out, bottom 0.5s ease-out;
    box-shadow: inset 0 0 15px rgba(220, 20, 60, 0.5);
}

/* Purity layer (blue) - top */
.dantian-purity {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    background: linear-gradient(to top, #1a4a6e, #4ecdc4, #7fefef);
    transition: height 0.5s ease-out, bottom 0.5s ease-out, background 0.5s ease-out;
    box-shadow: inset 0 0 15px rgba(78, 205, 196, 0.3);
}

/* Divine purity layer (golden/yellow) - for Heaven cultivation manual */
.dantian-purity.divine {
    background: linear-gradient(to top, #8B6914, #ffd700, #fff4b0);
    box-shadow: inset 0 0 15px rgba(255, 215, 0, 0.3);
}

/* Heaven Chosen purity layer (golden/yellow) - for Heaven Chosen origin */
.dantian-purity.heaven-chosen {
    background: linear-gradient(to top, #8B6914, #ffd700, #fff4b0);
    box-shadow: inset 0 0 15px rgba(255, 215, 0, 0.3);
}

/* Infinity purity layer (purple) */
.dantian-purity.infinity {
    background: linear-gradient(to top, #7c3aed, #a855f7, #d8b4fe);
    box-shadow: inset 0 0 15px rgba(168, 85, 247, 0.3);
}

.dantian-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 50%);
    pointer-events: none;
    z-index: 10;
}

@keyframes dantian-pulse-pure {
    0%, 100% { box-shadow: 0 0 15px rgba(78, 205, 196, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.5); }
    50% { box-shadow: 0 0 25px rgba(78, 205, 196, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.5); }
}

@keyframes dantian-pulse-corrupted {
    0%, 100% { box-shadow: 0 0 15px rgba(220, 20, 60, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.5); }
    50% { box-shadow: 0 0 25px rgba(220, 20, 60, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.5); }
}

@keyframes dantian-pulse-divine {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.5); }
    50% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.5); }
}

.dantian-orb.state-pure {
    animation: dantian-pulse-pure 3s ease-in-out infinite;
}

.dantian-orb.state-divine {
    animation: dantian-pulse-divine 3s ease-in-out infinite;
}

.dantian-orb.state-corrupted {
    animation: dantian-pulse-corrupted 2s ease-in-out infinite;
}

.dantian-orb.state-infinity {
    border-color: rgba(168, 85, 247, 0.6);
    animation: dantian-pulse-infinity 2s ease-in-out infinite;
}

@keyframes dantian-pulse-infinity {
    0%, 100% {
        box-shadow: 0 0 15px #a855f7, 0 0 30px rgba(168, 85, 247, 0.4), inset 0 0 10px rgba(168, 85, 247, 0.2);
    }
    50% {
        box-shadow: 0 0 25px #a855f7, 0 0 50px rgba(168, 85, 247, 0.5), inset 0 0 20px rgba(168, 85, 247, 0.3);
    }
}

/* Bloodline Skill Tree Styles with D3.js */
.skill-node-root {
    fill: #4ecdc4;
    stroke: #4ecdc4;
    stroke-width: 3;
    transition: all 0.3s;
}

.skill-node-available {
    fill: rgba(78, 205, 196, 0.2);
    stroke: #4ecdc4;
    stroke-width: 3;
    transition: all 0.3s;
}

.skill-node-available:hover {
    fill: rgba(78, 205, 196, 0.4);
    stroke: #4ecdc4;
    stroke-width: 4;
}

.skill-node-purchased {
    fill: rgba(255, 215, 0, 0.3);
    stroke: #ffd700;
    stroke-width: 3;
    transition: all 0.3s;
}

.skill-node-purchased:hover {
    fill: rgba(255, 215, 0, 0.5);
}

.skill-node-locked {
    fill: rgba(100, 100, 100, 0.1);
    stroke: #666;
    stroke-width: 2;
    opacity: 0.5;
}

.node.active circle {
    stroke-width: 5 !important;
}

.node text {
    pointer-events: none;
    user-select: none;
}

.skill-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #4ecdc4;
    border-radius: 8px;
    padding: 15px;
    color: #fff;
    font-size: 0.9em;
    z-index: 10000;
    pointer-events: none;
    max-width: 300px;
    display: none;
}

.skill-tooltip.show {
    display: block;
}

.skill-tooltip-title {
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.skill-tooltip-desc {
    color: #ccc;
    margin-bottom: 8px;
}

.skill-tooltip-cost {
    color: #4ecdc4;
    font-weight: bold;
}

.skill-tooltip-requires {
    color: #ff6b6b;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Rarity Info Button - Reusable tooltip button for rarity chances */
.rarity-info-btn {
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    font-size: 14px;
}
.rarity-info-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 30, 0.98);
    border-radius: 8px;
    padding: 12px;
    min-width: 200px;
    z-index: 1000;
    margin-top: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.rarity-info-btn:hover .rarity-info-tooltip {
    display: block;
}
.rarity-info-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
}
.rarity-info-title {
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
    border-bottom: 1px solid #4a4a6a;
    padding-bottom: 6px;
}
.rarity-info-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 0.9em;
}
.rarity-info-row.locked {
    color: #666;
}

/* Purple variant (Disciples) */
.rarity-info-btn--purple {
    background: rgba(138, 43, 226, 0.3);
    border: 1px solid #8a2be2;
    color: #8a2be2;
}
.rarity-info-btn--purple:hover {
    background: rgba(138, 43, 226, 0.5);
}
.rarity-info-tooltip--purple {
    border: 2px solid #8a2be2;
}
.rarity-info-tooltip--purple::before {
    border-bottom-color: #8a2be2;
}
.rarity-info-tooltip--purple .rarity-info-title {
    color: #8a2be2;
}
/* Left-positioned tooltip (hides default top arrow) */
.rarity-info-tooltip--left::before {
    display: none;
}

/* Orange variant (Treasure Pavilion) */
.rarity-info-btn--orange {
    background: rgba(255, 140, 0, 0.3);
    border: 1px solid #ff8c00;
    color: #ff8c00;
}
.rarity-info-btn--orange:hover {
    background: rgba(255, 140, 0, 0.5);
}
.rarity-info-tooltip--orange {
    border: 2px solid #ff8c00;
}
.rarity-info-tooltip--orange::before {
    border-bottom-color: #ff8c00;
}
.rarity-info-tooltip--orange .rarity-info-title {
    color: #ff8c00;
}

/* Slider styles moved to css/sliders.css */

/* Soul Distribution Card */
.soul-dist-card {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(30, 30, 50, 0.6));
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border: 2px solid;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.soul-dist-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.soul-dist-card.qi { border-color: #4ecdc4; }
.soul-dist-card.body { border-color: #ff6b6b; }
.soul-dist-card.luck { border-color: #ffd700; }
.soul-dist-card.talent { border-color: #9b59b6; }
.soul-dist-value {
    font-size: 1.4em;
    font-weight: bold;
    text-shadow: 0 0 15px currentColor;
}
.soul-dist-label {
    font-size: 1.1em;
    font-weight: bold;
    text-shadow: 0 0 8px currentColor;
}
