/* ===================================
   MODAL OVERLAY & WINDOW PANEL STYLES
   HD Xianxia Watercolor Remaster
   =================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 4, 14, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease-out;
}

.modal-overlay.hidden {
    display: none !important;
}

.window-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(246, 201, 78, 0.06);
    width: 92%;
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-primary);
    font-family: var(--font-main);
    pointer-events: auto;
    position: relative;
}

/* Golden corner ornaments */
.window-panel::before,
.window-panel::after {
    content: '◈';
    position: absolute;
    font-size: 0.5rem;
    color: var(--accent-gold);
    opacity: 0.3;
    pointer-events: none;
}
.window-panel::before { top: 8px; left: 10px; }
.window-panel::after { bottom: 8px; right: 10px; }

.window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(246, 201, 78, 0.08);
    position: relative;
}

/* Header gold underline */
.window-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(246, 201, 78, 0.2), transparent);
}

.window-header h3 {
    margin: 0;
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-gold);
    text-shadow: 0 0 10px rgba(246, 201, 78, 0.2);
    letter-spacing: 1px;
}

.close-btn {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #ef4444;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    transform: scale(1.1);
}

.window-body {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
}

.window-body p {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===================================
   PATH PANEL
   =================================== */
.path-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.path-item {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: all 0.25s;
}

.path-item:hover {
    background: rgba(246, 201, 78, 0.03);
    border-color: var(--border-gold);
}

.path-icon {
    font-size: 1.4rem;
    margin-right: 12px;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.path-name {
    font-weight: 700;
    font-size: 0.92rem;
    width: 80px;
}

.path-bar {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 5px;
    margin: 0 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(246, 201, 78, 0.06);
}

.path-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent-gold));
    border-radius: 5px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 4px rgba(167, 139, 250, 0.2);
}

/* Path-specific colors */
#path-luc .path-fill { background: linear-gradient(90deg, #dc2626, #f87171); box-shadow: 0 0 4px rgba(239, 68, 68, 0.2); }
#path-hoa .path-fill { background: linear-gradient(90deg, #ea580c, #fb923c); box-shadow: 0 0 4px rgba(249, 115, 22, 0.2); }
#path-thuy .path-fill { background: linear-gradient(90deg, #2563eb, #60a5fa); box-shadow: 0 0 4px rgba(59, 130, 246, 0.2); }
#path-tho .path-fill { background: linear-gradient(90deg, #a3843f, #d4af37); box-shadow: 0 0 4px rgba(196, 154, 60, 0.2); }
#path-moc .path-fill { background: linear-gradient(90deg, #16a34a, #4ade80); box-shadow: 0 0 4px rgba(34, 197, 94, 0.2); }
#path-kiem .path-fill { background: linear-gradient(90deg, #94a3b8, #e2e8f0); box-shadow: 0 0 4px rgba(148, 163, 184, 0.2); }
#path-loi .path-fill { background: linear-gradient(90deg, #9333ea, #c084fc); box-shadow: 0 0 4px rgba(168, 85, 247, 0.2); }
#path-huyet .path-fill { background: linear-gradient(90deg, #991b1b, #ef4444); box-shadow: 0 0 4px rgba(153, 27, 27, 0.2); }
#path-am .path-fill { background: linear-gradient(90deg, #334155, #94a3b8); box-shadow: 0 0 4px rgba(51, 65, 85, 0.2); }
#path-mong .path-fill { background: linear-gradient(90deg, #db2777, #f472b6); box-shadow: 0 0 4px rgba(236, 72, 153, 0.2); }
#path-hon .path-fill { background: linear-gradient(90deg, #7c3aed, #a78bfa); box-shadow: 0 0 4px rgba(124, 58, 237, 0.2); }
#path-bang .path-fill { background: linear-gradient(90deg, #0284c7, #38bdf8); box-shadow: 0 0 4px rgba(2, 132, 199, 0.2); }
#path-tinh .path-fill { background: linear-gradient(90deg, #b45309, #fbbf24); box-shadow: 0 0 4px rgba(217, 119, 6, 0.2); }
#path-tri .path-fill { background: linear-gradient(90deg, #0d9488, #2dd4bf); box-shadow: 0 0 4px rgba(13, 148, 136, 0.2); }
#path-luyen .path-fill { background: linear-gradient(90deg, #a16207, #facc15); box-shadow: 0 0 4px rgba(202, 138, 4, 0.2); }

.path-points {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-gold);
    min-width: 120px;
    text-align: right;
    text-shadow: 0 0 6px rgba(246, 201, 78, 0.15);
}

.btn-add-path-point {
    background: rgba(246, 201, 78, 0.15);
    color: var(--accent-gold);
    border: 1px solid var(--border-gold);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-add-path-point:hover {
    background: rgba(246, 201, 78, 0.3);
    transform: scale(1.15);
    box-shadow: 0 0 8px rgba(246, 201, 78, 0.2);
}
