/*
==============================================================
REVAMED MANSION
PHIRO BASELINE 010 — ONBOARDING & CONTROLS SYSTEM STYLES
==============================================================
*/

/* Onboarding / Controls Modal Overlay */
#onboarding-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 7, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9990;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#onboarding-modal.visible {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.onboarding-card {
    background: rgba(15, 14, 19, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.15);
    border-radius: 8px;
    width: 90%;
    max-width: 680px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px;
    color: #e2d9cc;
    font-family: 'Cinzel', serif;
}

.onboarding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.onboarding-header h2 {
    font-size: 1.6rem;
    letter-spacing: 2px;
    color: #d4af37;
    margin: 0;
    text-transform: uppercase;
}

.onboarding-close-btn {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #d4af37;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onboarding-close-btn:hover,
.onboarding-close-btn:focus {
    background: rgba(212, 175, 55, 0.2);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
    outline: none;
}

.onboarding-section {
    margin-bottom: 24px;
    font-family: 'Fauna One', Georgia, serif;
    line-height: 1.6;
    color: #c5bba8;
}

.onboarding-section h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: #d4af37;
    letter-spacing: 1px;
    margin-bottom: 10px;
    border-left: 3px solid #d4af37;
    padding-left: 10px;
}

.keyboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.key-binding {
    display: flex;
    align-items: center;
    background: rgba(30, 27, 38, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.15);
    padding: 8px 12px;
    border-radius: 4px;
}

.key-badge {
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid #d4af37;
    color: #fff;
    font-family: monospace;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 10px;
    font-size: 0.9rem;
}

/* Header Help Button */
.help-toggle-btn {
    background: rgba(15, 14, 19, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    padding: 6px 12px;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.help-toggle-btn:hover,
.help-toggle-btn:focus {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.15);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    outline: none;
}

/* ARIA live announcer hidden container */
#aria-announcer {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Corrupt Save Recovery Toast */
.resilience-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(40, 15, 15, 0.95);
    border: 1px solid rgba(255, 99, 71, 0.6);
    color: #ffcccb;
    padding: 12px 24px;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resilience-toast.visible {
    opacity: 1;
}
