/* css/destiny.css — Destiny panel + HUD chip. Gold-on-dark, cribbed from codex. */

/* ── Toolbar button ── */
#destiny-button {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4));
    transition: transform 0.15s;
}
#destiny-button:hover { transform: scale(1.12); }

/* ── Overlay + panel ── */
.destiny-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 7000;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.destiny-panel {
    width: 90%;
    max-width: 620px;
    max-height: 85vh;
    background: linear-gradient(135deg, #1a1526 0%, #241a14 100%);
    border: 2px solid #FFD700;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 34px rgba(255, 215, 0, 0.25);
}

.destiny-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #3a3020;
}

.destiny-title {
    margin: 0;
    font-size: 22px;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    letter-spacing: 1px;
}

.destiny-close {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.destiny-close:hover { color: #fff; }

.destiny-content {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
}

/* ── Path selection ── */
.destiny-intro {
    text-align: center;
    color: #cbb98a;
    font-size: 13px;
    font-style: italic;
    margin-bottom: 16px;
    line-height: 1.5;
}

.destiny-path-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.destiny-path-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #4a4030;
    border-radius: 12px;
    padding: 16px 14px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.destiny-path-card:hover {
    transform: translateY(-3px);
    border-color: #FFD700;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.25);
}
.destiny-path-card.selected {
    border-color: #FFD700;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.35);
}

.destiny-path-icon { font-size: 34px; margin-bottom: 8px; }
.destiny-path-name {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
}
.destiny-path-tagline {
    font-size: 12px;
    color: #FFD700;
    font-style: italic;
    margin-bottom: 8px;
}
.destiny-path-desc {
    font-size: 11px;
    color: #aaa;
    line-height: 1.4;
}

/* ── Confirm step ── */
.destiny-confirm {
    text-align: center;
    padding: 20px 10px;
}
.destiny-confirm-icon { font-size: 48px; margin-bottom: 12px; }
.destiny-confirm-name {
    font-size: 20px;
    color: #FFD700;
    margin-bottom: 6px;
}
.destiny-confirm-line {
    font-size: 14px;
    color: #cbb98a;
    font-style: italic;
    margin-bottom: 20px;
}
.destiny-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.destiny-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.18s;
}
.destiny-btn-primary {
    background: rgba(255, 215, 0, 0.18);
    border: 1px solid #FFD700;
    color: #FFD700;
}
.destiny-btn-primary:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.34);
}
.destiny-btn-secondary {
    background: none;
    border: 1px solid #555;
    color: #aaa;
}
.destiny-btn-secondary:hover { border-color: #888; color: #ddd; }
.destiny-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Dashboard ── */
.destiny-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid #4a4030;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.destiny-banner-icon { font-size: 36px; }
.destiny-banner-text { flex: 1; }
.destiny-banner-name {
    font-size: 17px;
    font-weight: bold;
    color: #FFD700;
}
.destiny-banner-tagline {
    font-size: 12px;
    color: #cbb98a;
    font-style: italic;
}
.destiny-change-btn {
    background: none;
    border: 1px solid #555;
    border-radius: 6px;
    color: #888;
    font-size: 11px;
    padding: 5px 8px;
    cursor: pointer;
    white-space: nowrap;
}
.destiny-change-btn:hover { border-color: #FFD700; color: #FFD700; }

.destiny-section-title {
    font-size: 13px;
    color: #FFD700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 18px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #3a3020;
}

/* Goal checklist */
.destiny-goal {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #bbb;
    padding: 6px 0;
}
.destiny-goal-tick {
    width: 20px;
    text-align: center;
    color: #555;
}
.destiny-goal.done .destiny-goal-tick { color: #4CAF50; }
.destiny-goal.done .destiny-goal-label {
    color: #4CAF50;
    text-decoration: line-through;
}

/* Focus meter */
.destiny-focus-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.destiny-focus-orbs { display: flex; gap: 4px; flex-wrap: wrap; }
.destiny-orb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #6a5a30;
    background: rgba(0, 0, 0, 0.4);
}
.destiny-orb.filled {
    background: radial-gradient(circle at 35% 30%, #fff6c0, #FFD700 60%, #b8860b);
    border-color: #FFD700;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
}
.destiny-focus-count {
    font-size: 12px;
    color: #cbb98a;
    margin-left: auto;
}

/* Spend buttons */
.destiny-spend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}
.destiny-spend-btn {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid #4a4030;
    border-radius: 10px;
    padding: 12px 10px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
}
.destiny-spend-btn:hover:not(:disabled) {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
}
.destiny-spend-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.destiny-spend-title {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.destiny-spend-cost {
    font-size: 11px;
    color: #FFD700;
}
.destiny-spend-desc {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    line-height: 1.4;
}

/* Active bias indicator */
.destiny-active-bias {
    margin-top: 12px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px dashed #FFD700;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    color: #FFD700;
}
.destiny-active-bias-sub {
    font-size: 11px;
    color: #cbb98a;
    margin-top: 2px;
}

/* ── HUD chip ── */
#destiny-hud-chip {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 8px;
    max-width: 80vw;
    background: rgba(20, 16, 10, 0.85);
    border: 1px solid #FFD700;
    border-radius: 999px;
    padding: 6px 14px;
    color: #FFD700;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 12px;
    cursor: pointer;
    z-index: 6000;
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.2);
    backdrop-filter: blur(4px);
}
#destiny-hud-chip.visible { display: flex; }
.destiny-chip-icon { font-size: 15px; }
.destiny-chip-goal {
    color: #e8dcb0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40vw;
}
.destiny-chip-focus {
    color: #FFD700;
    font-weight: bold;
    padding-left: 6px;
    border-left: 1px solid rgba(255, 215, 0, 0.3);
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .destiny-panel { width: 95%; max-height: 90vh; }
    .destiny-path-grid { grid-template-columns: 1fr; }
    .destiny-spend-grid { grid-template-columns: 1fr; }
    #destiny-hud-chip { top: 8px; font-size: 11px; padding: 5px 12px; }
    .destiny-chip-goal { max-width: 34vw; }
}
