/* ==========================================================================
   ASURA NEXUS — LIVE HUD WIDGET

   The in-game HUD: dino stats, the server-request queue cards, the teleport and
   prime-check panels, and the mobile sticky wrapper.

   base.html includes this widget on every page, so its styling shipped with
   every response already — it just shipped as markup instead of as a cached
   stylesheet. Linked after the chrome, which is the order it used to load in.
   ========================================================================== */

    /* =========================================
       --- KONSTRUKCE WIDGETU (PC i Mobil) ---
       ========================================= */
    #hudWidgetWrapper {
        position: fixed; bottom: 0; right: 0; left: 0; top: 0;
        pointer-events: none; z-index: 9900;
    }

    #hudQuestStack {
        position: fixed; bottom: 162px; right: 0px; z-index: 9899;
        display: flex; flex-direction: column-reverse; gap: 6px; width: 297px;
        pointer-events: auto;
    }

    #hudQueueStack {
        position: fixed; bottom: 172px; right: 0px; z-index: 9901;
        display: flex; flex-direction: column-reverse; gap: 8px; width: 297px;
        pointer-events: none;
    }

    #dinoHud {
        position: fixed; bottom: 10px; right: 0px; z-index: 9900;
        background: rgba(20, 22, 25, 0.85); backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;
        padding: 12px 15px; display: flex; gap: 20px; min-width: 260px;
        justify-content: space-between; box-shadow: 0 5px 20px rgba(0,0,0,0.5);
        transition: transform 0.3s ease, opacity 0.3s ease;
        pointer-events: auto;
    }

    .hud-wrapper-hidden { display: none !important; }
    #hudHandle { display: none; }
    #dinoHud.offline { opacity: 0.5; filter: grayscale(1); }
    /* Akce (Slay) */
    .hud-actions-col { display: flex; flex-direction: column; gap: 8px; justify-content: center; width: 110px; }
    .hud-action-btn { border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); border-radius: 6px; height: 24px; width: 100%; display: flex; align-items: center; justify-content: center; color: #ccc; cursor: pointer; transition: all 0.2s ease; font-size: 0.65rem; font-weight: 800; text-transform: uppercase; gap: 6px; }
    #btnHudSlay { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); color: white; border-color: rgba(231, 76, 60, 0.3); }
    .hud-action-btn:hover:not(.disabled) { transform: translateX(3px); color: white; }
    .queue-card-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 8px;
    }

    /* Staty (Bary) */
    .hud-stats-area { display: flex; gap: 15px; }
    .hud-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 28px; }
    .hud-bar-bg { width: 28px; height: 70px; background: rgba(255,255,255,0.1); border-radius: 6px; position: relative; overflow: hidden; margin-bottom: 5px; }
    .hud-bar-fill { position: absolute; bottom: 0; left: 0; width: 100%; height: 0%; transition: height 0.5s ease; }
    .fill-health { background: #e74c3c; } .fill-water { background: #3498db; } .fill-food { background: #e67e22; } .fill-stam { background: #2ecc71; }
    .hud-val { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 900; text-shadow: 0 0 3px black; z-index: 2; opacity: 0; transition: opacity 0.2s; }
    #dinoHud:hover .hud-val { opacity: 1; }

    #hudSettingsBtn { position: absolute; top: -10px; right: -10px; background: #3498db; border: 2px solid #141619; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; opacity: 0; transition: opacity 0.2s; z-index: 100; }
    #dinoHud:hover #hudSettingsBtn { opacity: 1; }

    /* Server-request queue cards */
    .queue-card { background: rgba(20, 22, 25, 0.95); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; padding: 12px; height: 90px; display: flex; flex-direction: column; pointer-events: auto; margin-bottom: 5px; border-left: 4px solid #444; }
    .queue-bar-bg {
        margin-top: auto;
        width: 100%;
        height: 6px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 3px;
        overflow: hidden;
        flex-shrink: 0;
    }
    .queue-bar-fill {
        height: 100%;
        width: 0%;
        background: #555;
        border-radius: 3px;
        transition: width 0.4s linear;
    }
    .state-warmup { border-left-color: #e67e22 !important; } .state-warmup .queue-bar-fill { background: #e67e22; }
    .state-applying { border-left-color: #ffc107 !important; } .state-applying .queue-bar-fill { background: #ffc107; }
    .state-applied { border-left-color: #2ecc71 !important; } .state-applied .queue-bar-fill { background: #2ecc71; }
    .state-cooldown { border-left-color: #3498db !important; } .state-cooldown .queue-bar-fill { background: #3498db; }
    .state-cancelled { border-left-color: #e74c3c !important; background: rgba(45, 20, 20, 0.95); } .state-cancelled .queue-bar-fill { background: #e74c3c; width: 100% !important; }

    /* Cancel button on queue cards — pinned to the bottom-right corner, just
       above the progress bar so it doesn't obscure the timer/title area. */
    .queue-card { position: relative; }
    .queue-cancel-btn {
        position: absolute;
        right: 10px;
        bottom: 18px;
        border: 1px solid rgba(231, 76, 60, 0.4);
        background: rgba(20, 22, 25, 0.85);
        color: #e74c3c;
        border-radius: 5px;
        font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
        padding: 3px 8px;
        cursor: pointer; transition: all 0.15s ease;
        z-index: 2;
    }
    .queue-cancel-btn:hover:not(:disabled) { background: rgba(231, 76, 60, 0.85); color: #fff; border-color: rgba(231, 76, 60, 0.8); }
    .queue-cancel-btn:disabled { opacity: 0.4; cursor: not-allowed; }

    /* =========================================
       --- MOBILE STICKY WRAPPER ---
       ========================================= */
    @media (max-width: 991.98px) {
        #hudWidgetWrapper {
            top: auto; height: auto; pointer-events: auto;
            background: #0f1012; border-top: 1px solid rgba(255,255,255,0.1);
            border-radius: 20px 20px 0 0; padding: 45px 20px 20px 20px;
            transform: translateY(calc(100% - 35px));
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
        }
        #hudWidgetWrapper.expanded { transform: translateY(0); }
        #hudHandle { display: flex !important; align-items: center; justify-content: center; position: absolute; top: 0; left: 0; right: 0; height: 35px; cursor: pointer; color: #888; }

        #hudQueueStack, #dinoHud {
            position: relative !important; bottom: auto !important; right: auto !important; width: 100% !important;
            min-width: 100% !important; background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important;
        }
        #hudQueueStack { margin-bottom: 20px; pointer-events: auto; }
        #dinoHud { flex-direction: column; gap: 20px; transform: none !important; opacity: 1 !important; }
        .hud-actions-col { width: 100% !important; }
        .hud-action-btn { height: 45px !important; font-size: 0.85rem !important; }
        .hud-stats-area { width: 100%; justify-content: space-around; }
        .hud-val { opacity: 1; }
        #hudSettingsBtn { opacity: 1 !important; top: 10px !important; right: 20px !important; }
    }

    #hudSettingsModal { z-index: 11000 !important; }
    .modal-backdrop { z-index: 10990 !important; }

    @keyframes stalePulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.5; }
    }

    #hudOfflineOverlay {
        position: absolute; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(20, 22, 25, 0.6); backdrop-filter: blur(3px);
        z-index: 50; display: flex; align-items: center; justify-content: center;
        text-align: center; opacity: 0; pointer-events: none; transition: opacity 0.3s;
        border-radius: 12px;
    }

    #hudOfflineOverlay span {
        font-size: 0.65rem; font-weight: 800; color: #ddd; text-transform: uppercase;
        padding: 0 5px; line-height: 1.2; text-shadow: 0 2px 4px rgba(0,0,0,1);
    }

    #dinoHud.offline #hudOfflineOverlay { opacity: 1; pointer-events: auto; }

    #btnHudGroup { background: linear-gradient(135deg, #2980b9 0%, #2c3e50 100%); color: white; border-color: rgb(0 15 24 / 57%); }

    /* Quest HUD card — single card carousel above dinoHud */
    .quest-hud-card {
        background: rgba(20, 22, 25, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        padding: 12px 14px;
        border-left: 3px solid var(--nexus-blue);
        display: flex; flex-direction: column; gap: 8px;
        pointer-events: auto;
    }
    /* Asura Prime — eternal system quest; only the name + crown icon are golden */
    .quest-hud-card.is-prime.is-paused {
        border-color: rgba(231, 76, 60, 0.45);
        border-left-color: #e74c3c;
    }
    .quest-hud-paused-banner {
        display: flex; align-items: center; gap: 8px;
        padding: 7px 10px; margin: 2px 0 6px;
        background: rgba(231, 76, 60, 0.12);
        border: 1px solid rgba(231, 76, 60, 0.35);
        border-radius: 6px;
        color: #f5b7b1; font-size: 0.72rem; line-height: 1.25;
    }
    .quest-hud-paused-banner i { color: #e74c3c; flex-shrink: 0; }
    .quest-hud-prime-elder {
        display: flex; align-items: center; justify-content: center; gap: 8px;
        padding: 10px;
        background: rgba(241, 196, 15, 0.08);
        border: 1px solid rgba(241, 196, 15, 0.35);
        border-radius: 6px;
        color: #f1c40f; font-size: 0.78rem; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.5px;
    }
    .quest-hud-prime-elder i { font-size: 0.95rem; }
    .quest-hud-card.is-prime.is-prime-elder {
        border-color: rgba(241, 196, 15, 0.5);
        border-left-color: #f1c40f;
    }
    .quest-hud-card.is-prime .quest-hud-name {
        color: #f1c40f;
    }
    .quest-hud-prime-badge {
        font-size: 0.65rem; font-weight: 900;
        text-transform: uppercase; letter-spacing: 0.6px;
        color: #f1c40f; background: rgba(241, 196, 15, 0.12);
        border: 1px solid rgba(241, 196, 15, 0.4);
        padding: 2px 7px; border-radius: 10px;
        flex-shrink: 0;
    }
    .quest-hud-header {
        display: flex; align-items: center; justify-content: space-between;
        gap: 8px;
    }
    .quest-hud-name {
        font-size: 0.88rem; font-weight: 800; color: #fff;
        text-transform: uppercase; letter-spacing: 0.3px;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        flex-grow: 1;
    }
    .quest-hud-name i {
        font-size: 0.8rem !important;
    }
    .quest-hud-counter {
        font-size: 0.72rem; color: var(--text-muted); font-weight: 700;
        background: rgba(255,255,255,0.05); padding: 3px 8px; border-radius: 10px;
        flex-shrink: 0;
    }
    .quest-hud-toggle {
        background: transparent; border: none; color: var(--text-muted);
        cursor: pointer; padding: 2px 6px; font-size: 0.75rem;
        border-radius: 4px; flex-shrink: 0;
        transition: color 0.15s, background 0.15s;
    }
    .quest-hud-toggle:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
    .quest-hud-toggle i { font-size: 0.8rem; }
    .quest-hud-server {
        font-size: 0.7rem; color: var(--text-muted); opacity: 0.8;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .quest-hud-tasks {
        display: flex; flex-direction: column; gap: 5px;
        border-top: 1px solid rgba(255,255,255,0.05);
        padding-top: 8px;
    }
    .quest-hud-task {
        display: flex; align-items: flex-start; gap: 8px;
        font-size: 0.8rem; color: var(--text-muted);
        line-height: 1.35;
        word-break: break-word;
    }
    .quest-hud-task .task-dot {
        width: 9px; height: 9px; border-radius: 50%;
        background: #e74c3c;
        transition: background 0.3s, box-shadow 0.3s;
        flex-shrink: 0;
        margin-top: 4px;
    }
    .quest-hud-task .task-dot.done {
        background: #2ecc71;
        box-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
    }
    /* Sticky-completed but the live state condition is currently outside its
       range (e.g. growth past 75%). Player keeps the credit but cannot complete
       the quest until they bring the stat back in range. */
    .quest-hud-task .task-dot.invalidated {
        background: #e74c3c;
        box-shadow: 0 0 6px rgba(231, 76, 60, 0.7);
    }
    .quest-hud-fails {
        display: flex; flex-direction: column; gap: 4px;
        margin-top: 6px;
    }
    .quest-hud-fail {
        display: flex; align-items: flex-start; gap: 8px;
        font-size: 0.72rem; color: var(--text-muted);
        line-height: 1.25;
    }
    .quest-hud-fail .fail-dot {
        width: 8px; height: 8px; border-radius: 50%;
        background: #2ecc71;
        box-shadow: 0 0 4px rgba(46, 204, 113, 0.5);
        transition: background 0.3s, box-shadow 0.3s;
        flex-shrink: 0;
        margin-top: 4px;
    }
    .quest-hud-fail.is-violated .fail-dot {
        background: #e74c3c;
        box-shadow: 0 0 4px rgba(231, 76, 60, 0.5);
    }
    .quest-hud-fail.is-violated { color: #f5b7b1; }
    .quest-hud-footer {
        display: flex; align-items: center; justify-content: space-between; gap: 6px;
        margin-top: 2px;
        border-top: 1px solid rgba(255,255,255,0.05);
        padding-top: 8px;
    }
    .quest-hud-btn {
        background: transparent;
        border: 1px solid rgba(255,255,255,0.15);
        color: #ddd;
        font-size: 0.75rem; font-weight: 800;
        text-transform: uppercase; letter-spacing: 0.4px;
        padding: 5px 10px; border-radius: 5px;
        cursor: pointer; transition: all 0.2s;
        display: inline-flex; align-items: center; gap: 5px;
    }
    .quest-hud-btn:hover:not(:disabled) {
        border-color: var(--nexus-blue); color: #fff; background: rgba(35, 144, 193, 0.15);
    }
    .quest-hud-btn:disabled { opacity: 0.35; cursor: not-allowed; }
    .quest-hud-nav {
        display: flex; align-items: center; gap: 4px;
    }
    .quest-hud-nav-btn {
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.1);
        color: #ccc;
        width: 28px; height: 28px; border-radius: 5px;
        display: flex; align-items: center; justify-content: center;
        font-size: 0.78rem; cursor: pointer;
        transition: all 0.2s;
    }
    .quest-hud-nav-btn:hover:not(:disabled) {
        background: rgba(35, 144, 193, 0.2); border-color: var(--nexus-blue); color: #fff;
    }
    .quest-hud-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

    .quest-hud-action-btn {
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.1);
        color: #ccc;
        width: 28px; height: 28px; border-radius: 5px;
        display: flex; align-items: center; justify-content: center;
        font-size: 0.78rem; cursor: pointer;
        transition: all 0.15s;
    }
    .quest-hud-action-btn.start {
        color: #2ecc71;
        border-color: rgba(46, 204, 113, 0.4);
        background: rgba(46, 204, 113, 0.1);
    }
    .quest-hud-action-btn.start:hover:not(:disabled) {
        background: rgba(46, 204, 113, 0.25); color: #fff;
        box-shadow: 0 0 6px rgba(46, 204, 113, 0.4);
    }
    .quest-hud-action-btn.reroll {
        color: #3498db;
        border-color: rgba(52, 152, 219, 0.4);
        background: rgba(52, 152, 219, 0.1);
    }
    .quest-hud-action-btn.reroll:hover:not(:disabled) {
        background: rgba(52, 152, 219, 0.25); color: #fff;
        box-shadow: 0 0 6px rgba(52, 152, 219, 0.4);
    }
    /* While a quest start/reroll is in flight, every action button greys out and is
       unclickable so it's obvious the request is being processed. */
    .quest-hud-action-btn:disabled, .quest-hud-btn:disabled {
        opacity: 0.4; cursor: not-allowed; filter: grayscale(0.7);
        color: #9aa0a6 !important; background: rgba(255,255,255,0.05) !important;
        border-color: rgba(255,255,255,0.12) !important; box-shadow: none !important;
    }
    .quest-hud-action-btn:disabled { opacity: 0.35; cursor: wait; }

    .quest-hud-empty {
        display: flex; align-items: center; gap: 8px;
        font-size: 0.8rem; color: var(--text-muted);
        font-style: italic; padding: 4px 0;
    }
    .quest-hud-empty i { color: var(--nexus-blue); opacity: 0.6; }

    /* Quest detail modal — matches /quests page styling */
    .qdm-tier-badge {
        font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
        letter-spacing: 0.5px; padding: 4px 9px; border-radius: 4px;
        border: 1px solid transparent;
    }
    .qdm-tier-scavenger { background: rgba(142, 146, 151, 0.15); color: #8e9297; border-color: rgba(142, 146, 151, 0.3); }
    .qdm-tier-stalker   { background: rgba(108, 140, 160, 0.15); color: #8eb4c7; border-color: rgba(108, 140, 160, 0.3); }
    .qdm-tier-hunter    { background: rgba(241, 196, 15, 0.15); color: #f1c40f; border-color: rgba(241, 196, 15, 0.3); }
    .qdm-tier-alpha     { background: rgba(231, 76, 60, 0.15); color: #e74c3c; border-color: rgba(231, 76, 60, 0.3); }
    .qdm-tier-prime     { background: rgba(241, 196, 15, 0.18); color: #f1c40f; border-color: rgba(241, 196, 15, 0.45); }
    .qdm-objective {
        display: flex; flex-direction: column; gap: 6px;
        padding: 8px 10px;
        background: rgba(255,255,255,0.025);
        border: 1px solid rgba(255,255,255,0.04);
        border-left: 3px solid var(--task-color, #6c7075);
        border-radius: 6px;
        font-size: 0.78rem; color: #c8c9cb;
    }
    .qdm-obj-row { display: flex; align-items: center; gap: 10px; width: 100%; }
    .qdm-objective.completed {
        background: rgba(46, 204, 113, 0.07);
        border-left-color: #2ecc71;
        color: #d4f0dd;
    }
    .qdm-objective.completed .qdm-obj-text { text-decoration: line-through; opacity: 0.85; }
    .qdm-obj-icon {
        flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        background: rgba(0,0,0,0.35); color: var(--task-color, #c8c9cb);
        font-size: 0.85rem; border: 1px solid rgba(255,255,255,0.05);
    }
    .qdm-objective.completed .qdm-obj-icon {
        background: rgba(46, 204, 113, 0.18); color: #2ecc71;
        box-shadow: 0 0 8px rgba(46, 204, 113, 0.25);
    }
    .qdm-obj-text { flex-grow: 1; line-height: 1.3; }
    .qdm-obj-state { font-size: 0.85rem; opacity: 0.8; }
    .qdm-objective.completed .qdm-obj-state { color: #2ecc71; opacity: 1; }
    .qdm-objective:not(.completed) .qdm-obj-state { color: rgba(255,255,255,0.18); }
    /* invalidated overrides the green completed look — task was ticked but the
       live state condition is currently out of range (e.g. growth past 75%). */
    .qdm-objective.invalidated {
        background: rgba(231, 76, 60, 0.08);
        border-left-color: #e74c3c;
        color: #f5b7b1;
    }
    .qdm-objective.invalidated .qdm-obj-text { text-decoration: none; opacity: 1; }
    .qdm-objective.invalidated .qdm-obj-icon {
        background: rgba(231, 76, 60, 0.18); color: #e74c3c;
        box-shadow: 0 0 8px rgba(231, 76, 60, 0.3);
    }
    .qdm-objective.invalidated .qdm-obj-state { color: #e74c3c; opacity: 1; }

    /* Quest detail modal — location minimap (matches /quests page) */
    @keyframes qdm-minimap-pulse {
        0%   { box-shadow: 0 0 0 0 rgba(35, 144, 193, 0.7); }
        70%  { box-shadow: 0 0 0 8px rgba(35, 144, 193, 0); }
        100% { box-shadow: 0 0 0 0 rgba(35, 144, 193, 0); }
    }
    .qdm-minimap-wrapper {
        display: flex; flex-direction: column; align-items: center; gap: 4px;
        padding: 6px 8px 4px;
        background: rgba(0,0,0,0.18);
        border: 1px solid rgba(255,255,255,0.04);
        border-radius: 5px;
        width: 100%;
    }
    .qdm-minimap {
        position: relative; width: 100%; max-width: 220px; aspect-ratio: 1/1;
        border-radius: 6px; border: 1px solid rgba(35, 144, 193, 0.3);
        background: #1e5571; overflow: hidden;
        box-shadow: 0 0 10px rgba(0,0,0,0.5) inset;
    }
    .qdm-minimap img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
    .qdm-minimap-marker {
        position: absolute; width: 9px; height: 9px;
        background: #fff; border: 2px solid var(--nexus-blue);
        border-radius: 50%; transform: translate(-50%, 50%);
        animation: qdm-minimap-pulse 1.5s infinite; z-index: 2;
    }
    .qdm-minimap-radius {
        position: absolute; border-radius: 50%;
        border: 2px solid rgba(35, 144, 193, 0.85);
        background: rgba(35, 144, 193, 0.18);
        transform: translate(-50%, 50%);
        pointer-events: none; z-index: 1;
        box-shadow: 0 0 10px rgba(35, 144, 193, 0.35);
    }
    .qdm-minimap-coords {
        font-size: 0.62rem; color: var(--nexus-blue); font-weight: 700;
        font-family: var(--bs-font-monospace, monospace); letter-spacing: 0.5px;
    }
    .qdm-rewards-box {
        padding: 12px;
        background: rgba(0,0,0,0.2);
        border-top: 1px solid rgba(255,255,255,0.05);
        border-radius: 6px;
    }
    #qdmTasks {
        max-height: 50vh;
        overflow-y: auto;
        padding-right: 6px;
    }
    #qdmTasks::-webkit-scrollbar { width: 6px; }
    #qdmTasks::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 3px; }
    #qdmTasks::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 3px; }
    #qdmTasks::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.32); }
    .qdm-rules { display: flex; flex-direction: column; gap: 6px; }
    .qdm-rule {
        display: flex; align-items: center; gap: 10px;
        padding: 6px 10px;
        background: rgba(46, 204, 113, 0.08);
        border: 1px solid rgba(46, 204, 113, 0.22);
        border-left: 3px solid #2ecc71;
        border-radius: 6px;
        font-size: 0.78rem; color: #d4f0dd;
    }
    .qdm-rule-icon {
        flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        background: rgba(46, 204, 113, 0.18); color: #2ecc71;
        font-size: 0.8rem;
    }
    .qdm-rule-text { flex-grow: 1; line-height: 1.3; }
    .qdm-rule.is-violated {
        background: rgba(231, 76, 60, 0.1);
        border-color: rgba(231, 76, 60, 0.35);
        border-left-color: #e74c3c;
        color: #f5b7b1;
    }
    .qdm-rule.is-violated .qdm-rule-icon {
        background: rgba(231, 76, 60, 0.22); color: #e74c3c;
    }
    .qdm-paused-banner {
        display: flex; align-items: center; gap: 10px;
        padding: 10px 12px; margin-bottom: 12px;
        background: rgba(231, 76, 60, 0.12);
        border: 1px solid rgba(231, 76, 60, 0.4);
        border-radius: 6px;
        color: #f5b7b1; font-size: 0.78rem; line-height: 1.3;
    }
    .qdm-paused-banner i { color: #e74c3c; font-size: 1rem; }
    .qdm-prime-elder {
        display: flex; align-items: center; justify-content: center; gap: 10px;
        padding: 18px;
        background: rgba(241, 196, 15, 0.1);
        border: 1px solid rgba(241, 196, 15, 0.4);
        border-radius: 8px;
        color: #f1c40f; font-size: 0.95rem; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.5px;
        margin-bottom: 12px;
    }
    .qdm-prime-elder i { font-size: 1.4rem; }
    .qdm-rewards { display: flex; flex-wrap: wrap; gap: 6px; }
    .qdm-reward-chip {
        display: inline-flex; align-items: center; gap: 8px;
        padding: 6px 10px;
        background: rgba(0,0,0,0.35);
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 8px;
        font-size: 0.75rem; color: #ddd;
    }
    .qdm-reward-icon {
        width: 22px; height: 22px; border-radius: 5px;
        display: flex; align-items: center; justify-content: center;
        font-size: 0.8rem; color: #fff;
    }
    .qdm-reward-text { display: flex; flex-direction: column; line-height: 1.15; }
    .qdm-reward-type {
        font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.5px;
        color: #8e9297; font-weight: 700;
    }
    .qdm-reward-name {
        color: #fff; font-weight: 600; font-size: 0.78rem;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        max-width: 160px;
    }
    .qdm-reward-points  { background: linear-gradient(135deg, #f1c40f, #c79b00); }
    .qdm-reward-skin    { background: linear-gradient(135deg, #9b59b6, #6c3483); }
    .qdm-reward-special { background: linear-gradient(135deg, #2390c1, #1e5571); }
    .qdm-reward-unknown { background: linear-gradient(135deg, #6c7075, #3d4045); }

    @media (max-width: 991.98px) {
        #hudQuestStack {
            position: relative !important; bottom: auto !important; right: auto !important;
            width: 100% !important; margin-bottom: 10px;
        }
    }
