/* ========================================================================
   404 POKER - MODAL DIALOGS & OVERLAYS
   ======================================================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-backdrop.open {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: #0f131a;
    border: 1px solid var(--border-accent);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 255, 204, 0.15);
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-backdrop.open .modal-card {
    transform: scale(1);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Audit Grid Status */
.audit-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.stat-box .stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.stat-box .stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.stat-value.healthy { color: var(--neon-cyan); }
.stat-value.gold { color: var(--neon-gold); }

/* Monospace Code & Hash Box */
.hash-preview-box {
    background: #090b0e;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #00ffcc;
    word-break: break-all;
    position: relative;
}

.btn-copy-code {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    cursor: pointer;
}

/* Avatar Selector Grid */
.avatar-selection-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.avatar-choice-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 8px 4px;
    transition: all 0.2s ease;
}

.avatar-choice-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.avatar-choice-item.selected {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 204, 0.08);
}

.avatar-choice-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-choice-name {
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
}

/* Form Controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.form-input {
    background: #090b0e;
    border: 1px solid var(--border-subtle);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
}

.form-input:focus {
    border-color: var(--neon-cyan);
}

.btn-primary-action {
    background: linear-gradient(135deg, #00ffcc, #00b386);
    color: #051410;
    border: none;
    font-weight: 800;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
}

.btn-secondary-action {
    background: #1e222d;
    color: #fff;
    border: 1px solid var(--border-subtle);
    font-weight: 700;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
}
