/* modals.css — Cribbage modal styling | MagmaCrunch Media © 2026 */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-mid);
    border: 3px solid var(--accent);
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.2);
}

.modal h2 {
    font-family: var(--font-pixel);
    font-size: 18px;
    color: var(--accent);
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    background: none;
    border: none;
    color: var(--cream);
    cursor: pointer;
    transition: color 0.2s;
    padding: 5px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent);
    background: none;
}

/* Rules content */
.rules-content h3 {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--accent);
    margin: 20px 0 10px;
}

.rules-content p {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--cream);
    margin-bottom: 10px;
    line-height: 1.5;
}

.rules-content ol,
.rules-content ul {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--cream);
    margin-left: 20px;
    margin-bottom: 10px;
    line-height: 1.8;
}

.rules-content strong {
    color: var(--accent);
}

/* Menu buttons */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.start-btn {
    font-family: var(--font-pixel);
    font-size: 11px;
    padding: 14px 28px;
    border: 2px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.start-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
}

.start-btn.primary {
    background: var(--accent);
    color: var(--bg-dark);
}

/* High scores */
.high-scores {
    text-align: center;
}

.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    border-bottom: 1px solid var(--wood);
}

.score-row:last-child {
    border-bottom: none;
}

.score-row .rank {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--accent);
    width: 40px;
}

.score-row .initials {
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--cream);
    flex: 1;
    text-align: left;
}

.score-row .score {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--accent);
}
