/* Controls Overlay Modal */
.controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: opacity 0.3s ease;
}

.controls-overlay.hidden {
    display: none;
}

.hint-card {
    background: var(--card-bg);
    border: 1px solid var(--accent-green);
    border-radius: 20px;
    padding: 28px;
    width: 520px;
    max-width: 92vw;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 245, 160, 0.2);
}

.hint-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}

.hint-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.5;
}

.btn-primary {
    margin-top: 16px;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
    color: #000;
    font-weight: 700;
    font-size: 14px;
    font-family: var(--font-ui);
    padding: 12px 28px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 245, 160, 0.4);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: scale(1.04);
    box-shadow: 0 0 30px rgba(0, 245, 160, 0.7);
}

/* Telemetry Drawer */
.telemetry-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    background: rgba(8, 12, 20, 0.95);
    border-top: 1px solid rgba(0, 245, 160, 0.3);
    backdrop-filter: blur(12px);
    z-index: 30;
    transition: transform 0.3s ease;
}

.telemetry-drawer.collapsed {
    transform: translateY(calc(100% - 36px));
}

.drawer-header {
    padding: 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
}

.drawer-title {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
}

.drawer-content {
    height: 160px;
    overflow-y: auto;
    padding: 12px 24px;
    background: #04060a;
}

#telemetry-log {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #00f5a0;
    line-height: 1.5;
}

/* Victory Modal */
.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.modal-backdrop.hidden {
    display: none;
}

.modal-card {
    background: linear-gradient(135deg, #101624 0%, #1a233a 100%);
    border: 2px solid var(--accent-green);
    border-radius: 24px;
    padding: 40px;
    width: 500px;
    text-align: center;
    box-shadow: 0 0 60px rgba(0, 245, 160, 0.3);
}

.victory-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.modal-card h2 {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.modal-card .subtitle {
    font-size: 13px;
    color: var(--accent-cyan);
    margin-bottom: 24px;
}

.victory-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.stat-n {
    color: var(--text-muted);
}

/* Room Selector Dropdown */
.room-select-dropdown {
    background: rgba(16, 24, 40, 0.9);
    color: #fff;
    border: 1px solid var(--accent-cyan);
    border-radius: 8px;
    padding: 5px 10px;
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    max-width: 220px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.room-select-dropdown:hover {
    border-color: var(--accent-green);
    box-shadow: 0 0 15px rgba(0, 245, 160, 0.4);
}

.room-select-dropdown option {
    background: #0d1322;
    color: #fff;
}

.nav-btn-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.btn-highlight {
    border-color: var(--accent-gold) !important;
    color: var(--accent-gold) !important;
}

.btn-highlight:hover {
    background: rgba(255, 209, 102, 0.15) !important;
    box-shadow: 0 0 12px rgba(255, 209, 102, 0.4);
}

/* Room 10 Educator Dashboard Overlay */
.dashboard-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 6, 12, 0.9);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 70;
}

.dashboard-backdrop.hidden {
    display: none;
}

.dashboard-card {
    background: linear-gradient(135deg, #0e1526 0%, #17223b 100%);
    border: 2px solid var(--accent-cyan);
    border-radius: 24px;
    padding: 32px 40px;
    width: 900px;
    max-width: 94vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 60px rgba(0, 210, 255, 0.25);
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.dash-title-group h2 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-top: 6px;
    margin-bottom: 4px;
}

.dash-subtitle {
    font-size: 13px;
    color: var(--accent-cyan);
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.dash-panel {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
}

.dash-panel h3 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.competency-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comp-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
}

.comp-name {
    width: 190px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comp-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.comp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
    border-radius: 4px;
}

.comp-val {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-green);
    width: 32px;
    text-align: right;
}

.twin-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.twin-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.t-label {
    font-size: 10px;
    color: var(--text-muted);
}

.t-val {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.t-val.green { color: var(--accent-green); }
.t-val.cyan { color: var(--accent-cyan); }
.t-val.gold { color: var(--accent-gold); }
.t-val.magenta { color: var(--accent-magenta); }

.twin-summary-box {
    background: rgba(0, 245, 160, 0.05);
    border: 1px solid rgba(0, 245, 160, 0.2);
    border-radius: 12px;
    padding: 14px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-main);
}
