/* ============================================================
   АТОМИКС — Общие стили
   Подключается на всех страницах (index, game, cabinet)
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%; height: 100%; overflow: hidden;
    background: #02141c;
    font-family: 'Inter', sans-serif;
    color: #e8f6ff;
    user-select: none;
}

/* ============================================================
   МОДАЛКИ (используются js/auth.js)
   ============================================================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(2, 12, 20, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: linear-gradient(180deg, rgba(10, 30, 40, 0.95) 0%, rgba(6, 20, 28, 0.98) 100%);
    border: 1px solid rgba(120, 220, 255, 0.2);
    border-radius: 20px;
    padding: 40px 36px 32px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(77, 255, 204, 0.08);
    animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-close {
    position: absolute;
    top: 14px; right: 16px;
    width: 30px; height: 30px;
    border: none; background: transparent;
    color: rgba(180, 220, 240, 0.5);
    font-size: 22px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}
.modal-close:hover { color: #fff; }

.modal h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    letter-spacing: 4px;
    text-align: center;
    color: #e8f6ff;
    margin-bottom: 8px;
}
.modal .subtitle {
    text-align: center;
    font-size: 12px;
    letter-spacing: 2px;
    color: rgba(140, 200, 230, 0.55);
    margin-bottom: 28px;
    text-transform: uppercase;
}
.modal .field { margin-bottom: 16px; }
.modal .field label {
    display: block;
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(140, 200, 230, 0.7);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.modal .field input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(120, 220, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: all 0.25s;
}
.modal .field input:focus {
    border-color: #4dffcc;
    box-shadow: 0 0 20px rgba(77, 255, 204, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.modal .submit-btn {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    background: linear-gradient(135deg, rgba(77,255,204,0.9), rgba(120,200,255,0.9));
    border: none;
    border-radius: 12px;
    color: #02141c;
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 24px rgba(77, 255, 204, 0.25);
}
.modal .submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(77, 255, 204, 0.45);
    filter: brightness(1.1);
}
.modal .submit-btn:disabled { opacity: 0.6; cursor: wait; }

.modal .toggle-mode {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: rgba(140, 200, 230, 0.55);
}
.modal .toggle-mode a {
    color: #4dffcc;
    cursor: pointer;
    text-decoration: none;
    margin-left: 6px;
    transition: color 0.2s;
}
.modal .toggle-mode a:hover { color: #fff; }

.modal .msg {
    text-align: center;
    font-size: 12px;
    min-height: 18px;
    margin-top: 12px;
    letter-spacing: 1px;
}
.modal .msg.ok { color: #4dffcc; }
.modal .msg.err { color: #ff6b6b; }