/* ==============================================================================
   Beginner Mission Directive HUD Card & Astra Guidance Subtitles
   ============================================================================== */
.beginner-card {
    position: fixed;
    top: 72px;
    left: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    background: rgba(10, 16, 28, 0.88);
    border: 1px solid rgba(0, 210, 255, 0.45);
    border-radius: 12px;
    padding: 12px 14px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 0 16px rgba(0, 210, 255, 0.08);
    z-index: 45;
    transition: all 0.25s ease;
}

.beginner-card.minimized .directive-content {
    display: none;
}

.beginner-card.minimized {
    padding: 8px 12px;
    width: auto;
}

.directive-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.beginner-card.minimized .directive-top-row {
    margin-bottom: 0;
}

.directive-badge-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.directive-tag {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 10px;
    font-weight: 700;
    color: #00d2ff;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.directive-phase-pill {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 9px;
    font-weight: 700;
    color: #00f5a0;
    background: rgba(0, 245, 160, 0.15);
    border: 1px solid rgba(0, 245, 160, 0.4);
    border-radius: 4px;
    padding: 2px 6px;
    letter-spacing: 0.5px;
}

.directive-ctrls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-directive-hint {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.5);
    color: #ffd700;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-directive-hint:hover {
    background: rgba(255, 215, 0, 0.3);
    transform: scale(1.04);
}

.btn-directive-minimize {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #94a3b8;
    font-size: 12px;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-directive-minimize:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.directive-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.directive-objective {
    font-size: 12px;
    line-height: 1.45;
    color: #e2e8f0;
    border-left: 2px solid #00d2ff;
    padding-left: 8px;
}

.directive-item-box {
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11px;
    line-height: 1.35;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    transition: all 0.2s ease;
}

.directive-item-box .box-icon {
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}

.directive-item-box .box-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.directive-item-box .box-label {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.directive-item-box .box-value {
    font-size: 11px;
    font-weight: 500;
}

/* Specific item box themes */
.directive-item-box.target-box {
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.35);
    color: #e0f2fe;
}
.directive-item-box.target-box .box-label {
    color: #00d2ff;
}

.directive-item-box.action-box {
    background: rgba(0, 245, 160, 0.08);
    border: 1px solid rgba(0, 245, 160, 0.35);
    color: #f0fdf4;
}
.directive-item-box.action-box .box-label {
    color: #00f5a0;
}

.directive-item-box.goal-box {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.35);
    color: #fefce8;
}
.directive-item-box.goal-box .box-label {
    color: #ffd700;
}

.directive-item-box.stock-box {
    background: rgba(0, 210, 255, 0.07);
    border: 1px solid rgba(0, 210, 255, 0.35);
    color: #f0fdf4;
}
.directive-item-box.stock-box .box-label {
    color: #00d2ff;
}
.stock-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.stock-badge {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(0, 210, 255, 0.2);
    border: 1px solid rgba(0, 210, 255, 0.4);
    color: #00d2ff;
    letter-spacing: 0.4px;
    transition: all 0.2s ease;
}
.stock-badge.filling {
    background: rgba(0, 245, 160, 0.2);
    border-color: rgba(0, 245, 160, 0.5);
    color: #00f5a0;
}
.stock-badge.draining {
    background: rgba(255, 77, 109, 0.2);
    border-color: rgba(255, 77, 109, 0.5);
    color: #ff4d6d;
}
.stock-badge.equilibrium {
    background: rgba(0, 245, 160, 0.35);
    border-color: #00f5a0;
    color: #00f5a0;
    box-shadow: 0 0 8px rgba(0, 245, 160, 0.4);
}
.stock-gauge-container {
    width: 100%;
    margin: 4px 0 2px 0;
}
.stock-gauge-bar {
    position: relative;
    width: 100%;
    height: 9px;
    background: rgba(10, 20, 36, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    overflow: hidden;
}
.stock-gauge-fill {
    height: 100%;
    width: 24%;
    background: linear-gradient(90deg, #00d2ff, #00f5a0);
    border-radius: 4px;
    transition: width 0.1s ease-out;
}
.stock-gauge-fill.overshoot {
    background: linear-gradient(90deg, #f59e0b, #ff4d6d);
}
.stock-target-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ffffff;
    box-shadow: 0 0 6px #ffffff;
    z-index: 2;
}
.stock-gauge-readout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.5px;
    width: 100%;
    margin-top: 2px;
}
.stock-val-text {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    color: #e2e8f0;
}
.stock-val-text strong {
    color: #00f5a0;
    font-size: 11px;
}
.flow-rate-text {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    color: #94a3b8;
    font-size: 10px;
}
.flow-rate-text strong {
    color: #00d2ff;
}

/* Astra Dialogue Subtitle Banner */
.astra-subtitle-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 620px;
    max-width: calc(100vw - 40px);
    background: rgba(8, 12, 22, 0.92);
    border: 1px solid rgba(0, 210, 255, 0.5);
    border-radius: 30px;
    padding: 10px 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 210, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 44;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.astra-subtitle-banner.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 15px);
}

.astra-avatar-orb {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.astra-orb-core {
    width: 22px;
    height: 22px;
    margin: 5px;
    background: radial-gradient(circle, #ffffff 10%, #00d2ff 60%, #0077ff 100%);
    border-radius: 50%;
    box-shadow: 0 0 14px #00d2ff, 0 0 28px #00f5a0;
    animation: orbPulse 2s ease-in-out infinite alternate;
}

.astra-orb-halo {
    position: absolute;
    inset: 0;
    border: 1px dashed rgba(0, 210, 255, 0.6);
    border-radius: 50%;
    animation: orbSpin 8s linear infinite;
}

@keyframes orbPulse {
    0% { transform: scale(0.9); }
    100% { transform: scale(1.1); }
}

@keyframes orbSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.astra-dialogue-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.astra-dialogue-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.astra-name-tag {
    font-family: var(--font-display, 'Orbitron', sans-serif);
    font-size: 11px;
    font-weight: 800;
    color: #00d2ff;
    letter-spacing: 1px;
}

.astra-role-tag {
    font-size: 9px;
    color: #64748b;
    font-family: var(--font-mono, monospace);
    letter-spacing: 0.5px;
}

.astra-text {
    font-size: 12px;
    color: #f1f5f9;
    line-height: 1.4;
    margin: 0;
}

/* Director Mode Overrides */
body.director-mode #beginner-directive-card {
    display: none !important;
}
