/* =============================================================================
   landing-dark.css  —  modal powitalny MeczRealu.com
   -----------------------------------------------------------------------------
   Napisany od zera pod wlasny markup (_landing_block.tpl, przestrzen mrm-).
   NIE zalezy od elengine.css ani od klas Bootstrapa — wiec nie ma juz wojny
   o specyficznosc z motywem. Wszystko siedzi pod #mrModal.

   Styl: X.com — czysta czern, wloskowate obramowania, pigulkowe przyciski,
   duza ciasna typografia.
   ========================================================================== */

#mrModal {
    --bg:        #000000;
    --surface:   #0a0a0a;
    --surface-2: #16181c;
    --line:      #2f3336;
    --line-soft: #1f2226;
    --text:      #e7e9ea;
    --muted:     #71767b;
    --accent:    #0052cb;
    --accent-2:  #1a73e8;
    --wall:      .34;      /* widocznosc zdjecia: .20 subtelnie / .34 wyrazniej / .45 mocno */

    position: fixed;
    inset: 0;
    z-index: 2147482000;
    width: 100vw;
    height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    isolation: isolate;
}

#mrModal *,
#mrModal *::before,
#mrModal *::after { box-sizing: border-box; }

/* Motywy potrafia miec globalne reguly na svg / button z !important.
   Nasze ikony nie uzywaja transformacji, wiec zerujemy je na wszelki wypadek. */
#mrModal svg { transform: none !important; }

/* poswiata w tle */
#mrModal::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(900px 620px at 8% -5%,   rgba(0, 82, 203, .16), transparent 60%),
        radial-gradient(820px 560px at 96% 104%, rgba(26, 115, 232, .10), transparent 60%);
    pointer-events: none;
}

/* blokada przewijania strony pod spodem — znika sama, gdy JS usunie modal */
html:has(#mrModal),
body:has(#mrModal) { overflow: hidden !important; }

/* ---------------------------------------------------------------- szkielet */

/* Styl krytyczny trzyma to na opacity:0 do czasu, az ten arkusz dojdzie.
   Tutaj odslaniamy — bez tego widac surowy formularz przez ulamek sekundy. */
#mrModal .mrm-scroll {
    opacity: 1;
    transition: opacity .15s ease;
    position: relative;
    z-index: 1;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

#mrModal .mrm-wrap {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(20px, 2.4vw, 34px);
    padding: clamp(56px, 5vw, 72px) clamp(16px, 4vw, 64px) clamp(24px, 3vw, 44px);
}

/* Prawa kolumna ma dokladnie szerokosc formularza, lewa bierze cala reszte.
   Przy proporcjach 1.35fr / 1fr formularz (max 420 px) nie wypelnial swojej
   kolumny i po prawej zostawala pusta przestrzen. */
#mrModal .mrm-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(340px, 27vw, 420px);
    align-items: center;
    gap: clamp(24px, 3vw, 56px);
}

/* ------------------------------------------------------------------- X */

#mrModal .mrm-x {
    position: absolute;
    top: clamp(12px, 1.6vw, 22px);
    right: clamp(12px, 1.6vw, 22px);
    z-index: 5;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--line) !important;
    background: rgba(0, 0, 0, .6) !important;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    transition: color .15s, border-color .15s, background-color .15s;
}

#mrModal .mrm-x:hover {
    color: #fff;
    border-color: #4a5058 !important;
    background: var(--surface-2) !important;
}

#mrModal .mrm-x:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

/* ----------------------------------------------------------------- marka */

#mrModal .mrm-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: #050505;
    min-height: min(64vh, 560px);
    display: flex;
    align-items: flex-end;
}

/* Zdjecie jest panoramiczne, a panel wysoki — cover przycinalby boki i z calej
   sceny zostawal sam tors. Kotwiczymy do gory na pelnej szerokosci i wygaszamy
   maska ku dolowi, zeby nie bylo twardej krawedzi pod tekstem. */
#mrModal .mrm-hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: var(--wall);
    filter: grayscale(.20) contrast(1.02) brightness(1.18) saturate(1.05);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 92%);
            mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 92%);
    pointer-events: none;
}

#mrModal .mrm-hero-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.30) 0%, rgba(0,0,0,.62) 52%, rgba(0,0,0,.92) 100%);
    pointer-events: none;
}

#mrModal .mrm-hero-body {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: clamp(22px, 3vw, 48px);
}

#mrModal .mrm-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: #cfe0ff;
    background: rgba(0, 82, 203, .16);
    border: 1px solid rgba(0, 82, 203, .34);
    border-radius: 999px;
    padding: 6px 14px;
    margin-bottom: 18px;
}

#mrModal .mrm-title {
    font-size: clamp(28px, 3.4vw, 58px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -1.4px;
    color: #fff;
    margin: 0 0 14px;
    max-width: 20ch;
    text-wrap: balance;
    overflow-wrap: normal;
    hyphens: none;
}

#mrModal .mrm-lead {
    font-size: clamp(14px, 1vw, 16.5px);
    line-height: 1.5;
    color: #a8aeb5;
    margin: 0;
    max-width: 46ch;
}

/* -------------------------------------------------------------- przyciski */

#mrModal .mrm-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
}

#mrModal .mrm-actions-sec { margin-top: 12px; }

#mrModal .mrm-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 19px;
    border-radius: 999px;
    border: 1px solid var(--line) !important;
    background: rgba(0, 0, 0, .55) !important;
    color: var(--text) !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, transform .12s, color .15s;
}

#mrModal .mrm-btn:hover {
    background: var(--surface-2) !important;
    border-color: #3b4046 !important;
    color: #fff !important;
    text-decoration: none;
    transform: translateY(-1px);
}

#mrModal .mrm-btn:active { transform: translateY(0); }

#mrModal .mrm-btn-main {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(0, 82, 203, .28);
}

#mrModal .mrm-btn-main:hover {
    background: var(--accent-2) !important;
    border-color: var(--accent-2) !important;
}

#mrModal .mrm-btn-sm {
    padding: 9px 15px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted) !important;
    border-color: var(--line-soft) !important;
}

#mrModal .mrm-btn-sm:hover { color: var(--text) !important; border-color: var(--line) !important; }

/* ------------------------------------------------------------- logowanie */

/* Formularz byl wysrodkowany w swojej kolumnie (margin: 0 auto), przez co
   miedzy zdjeciem a polami robila sie druga, niepotrzebna dziura.
   Teraz trzyma sie lewej krawedzi kolumny. */
#mrModal .mrm-auth {
    width: 100%;
    max-width: none;
    margin: 0;
}

#mrModal .mrm-logo {
    display: inline-block;
    margin-bottom: 22px;
}

#mrModal .mrm-logo img {
    height: 58px;
    width: auto;
    display: block;
}

#mrModal .mrm-auth-title {
    font-size: clamp(24px, 2vw, 31px);
    font-weight: 800;
    letter-spacing: -.9px;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 6px;
}

#mrModal .mrm-auth-sub {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 22px;
}

#mrModal .mrm-form { margin: 0; }

/* ------------------------------------------------------------------ pola */

#mrModal .mrm-field {
    position: relative;
    margin-bottom: 12px;
}

/* Ikona kotwiczona przez rozciagniecie na pelna wysokosc pola i wysrodkowanie
   flexem. Wczesniejsze top:50% + translateY(-50%) potrafilo sie rozjechac, gdy
   motyw nadpisywal transform na svg. Tutaj nie ma czego nadpisac. */
#mrModal .mrm-field-ico {
    position: absolute !important;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 20px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    pointer-events: none;
    z-index: 2;
}

#mrModal .mrm-field-ico svg {
    display: block;
    width: 18px;
    height: 18px;
    transform: none;
}

/* !important, bo motyw potrafi miec wlasne reguly na form input z !important */
#mrModal .mrm-field input {
    width: 100% !important;
    background: var(--bg) !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    color: var(--text) !important;
    font: inherit;
    font-size: 15px !important;
    line-height: 1.4 !important;
    height: auto !important;
    padding: 15px 46px !important;
    margin: 0 !important;
    outline: none;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}

#mrModal .mrm-field input::placeholder { color: #6a7178; }

#mrModal .mrm-field input:focus {
    border-color: var(--accent-2) !important;
    box-shadow: 0 0 0 1px var(--accent-2) !important;
}

#mrModal .mrm-field input:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px #0b0b0b inset;
    caret-color: var(--text);
}

#mrModal .mrm-eye {
    position: absolute !important;
    right: 10px;
    top: 0;
    bottom: 0;
    margin: auto 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    z-index: 2;
    padding: 0;
    border: 0 !important;
    border-radius: 999px;
    background: transparent !important;
    color: var(--muted);
    cursor: pointer;
}

#mrModal .mrm-eye:hover { color: var(--text); }
#mrModal .mrm-eye svg { display: block; width: 18px; height: 18px; }
#mrModal .mrm-eye [hidden] { display: none; }

/* --------------------------------------------------- zapamietaj / haslo */

#mrModal .mrm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 18px;
}

#mrModal .mrm-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

#mrModal .mrm-check input {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid var(--line) !important;
    border-radius: 4px !important;
    background: var(--bg) !important;
    cursor: pointer;
    position: relative;
    flex: 0 0 16px;
}

#mrModal .mrm-check input:checked {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
}

#mrModal .mrm-check input:checked::after {
    content: "";
    position: absolute;
    left: 4.5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

#mrModal .mrm-check input:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

#mrModal .mrm-link,
#mrModal .mrm-switch a,
#mrModal .mrm-foot a {
    color: var(--accent-2);
    text-decoration: none;
    font-size: 13.5px;
}

#mrModal .mrm-link:hover,
#mrModal .mrm-switch a:hover,
#mrModal .mrm-foot a:hover { text-decoration: underline; }

/* -------------------------------------------------------------- wyslanie */

#mrModal .mrm-submit {
    width: 100%;
    background: var(--accent) !important;
    border: 1px solid var(--accent) !important;
    border-radius: 999px;
    padding: 14px 20px;
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s, transform .06s;
}

#mrModal .mrm-submit:hover { background: var(--accent-2) !important; border-color: var(--accent-2) !important; }
#mrModal .mrm-submit:active { transform: translateY(1px); }

#mrModal .mrm-switch {
    margin: 15px 0 0;
    padding-top: 0;
    border-top: 0;
    font-size: 14px;
    color: var(--muted);
}

#mrModal .mrm-switch a { font-size: 14px; font-weight: 700; }

#mrModal .mrm-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 14px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, .02);
    font-size: 12.8px;
    line-height: 1.55;
    color: var(--muted);
}

#mrModal .mrm-note-ico {
    flex: 0 0 auto;
    margin-top: 2px;
    color: #6ea8ff;
}

#mrModal .mrm-note a {
    color: var(--accent-2);
    font-size: inherit;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

#mrModal .mrm-note a:hover { text-decoration: underline; }

/* -------------------------------------------------------------- komunikaty */

#mrModal .mrm-alert {
    border-radius: 10px;
    border: 1px solid transparent;
    padding: 11px 14px;
    font-size: 13.5px;
    margin-top: 14px;
}

#mrModal .mrm-alert-err {
    background: rgba(244, 33, 46, .10);
    border-color: rgba(244, 33, 46, .38);
    color: #ff8a92;
}

#mrModal .mrm-alert-warn {
    background: rgba(255, 190, 11, .10);
    border-color: rgba(255, 190, 11, .35);
    color: #ffd76a;
    margin: 0 0 16px;
}

/* Sngine zdejmuje x-hidden, gdy ma blad do pokazania */
#mrModal .x-hidden { display: none !important; }

/* ------------------------------------------------------------------- gry */

/* Osobne karty zamiast jednego paska — dzieki auto-fit liczba kolumn
   dostosowuje sie sama, wiec dolozenie kolejnego panelu nic nie psuje. */
#mrModal .mrm-feats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

#mrModal .mrm-feat {
    padding: clamp(16px, 1.5vw, 22px);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--surface);
    transition: background-color .18s, border-color .18s;
}

#mrModal .mrm-feat:hover {
    background: #101012;
    border-color: #2a2e34;
}

/* Ikona w jednym rzedzie z tytulem, opis pod spodem na pelnej szerokosci */
#mrModal .mrm-feat-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 11px;
}

#mrModal .mrm-feat-ico {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(0, 82, 203, .14);
    border: 1px solid rgba(0, 82, 203, .30);
    color: #6ea8ff;
}

#mrModal .mrm-feat h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.3px;
    color: var(--text);
    margin: 0;
    min-width: 0;
}

#mrModal .mrm-feat p {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--muted);
    margin: 0;
}

/* Mecze Live — akcent na czerwono, zeby odroznic transmisje od gier */
#mrModal .mrm-feat-live .mrm-feat-ico {
    background: rgba(244, 33, 46, .13);
    border-color: rgba(244, 33, 46, .34);
    color: #ff6b73;
}

#mrModal .mrm-feat-live h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

#mrModal .mrm-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #f4212e;
    box-shadow: 0 0 0 0 rgba(244, 33, 46, .6);
    animation: mrm-pulse 1.8s ease-out infinite;
}

@keyframes mrm-pulse {
    70%  { box-shadow: 0 0 0 7px rgba(244, 33, 46, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 33, 46, 0); }
}

/* ---------------------------------------------------------------- stopka */

#mrModal .mrm-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

/* --------------------------------------------------------- responsywnosc */

@media (max-width: 1000px) {
    #mrModal .mrm-grid { grid-template-columns: minmax(0, 1fr); }
    #mrModal .mrm-hero { min-height: 340px; }
    #mrModal .mrm-title { max-width: 22ch; }
    #mrModal .mrm-auth { max-width: 460px; margin: 0 auto; }
}

@media (max-width: 560px) {
    #mrModal .mrm-wrap { padding-inline: 14px; }
    #mrModal .mrm-hero { min-height: 280px; }
    #mrModal .mrm-title { font-size: clamp(22px, 7vw, 32px); letter-spacing: -.6px; }
    #mrModal .mrm-btn { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    #mrModal * { transition: none !important; }
}


/* =============================================================================
   BRAMKA WIEKOWA
   ========================================================================== */

#mrModal .mrm-age {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .82);
    backdrop-filter: blur(8px);
}

#mrModal .mrm-age[hidden] { display: none !important; }

#mrModal .mrm-age-box {
    width: 100%;
    max-width: 460px;
    background: #0b0c0e;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: clamp(24px, 3vw, 34px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
    text-align: center;
}

#mrModal .mrm-age-ico {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(0, 82, 203, .14);
    border: 1px solid rgba(0, 82, 203, .32);
    color: #6ea8ff;
    margin-bottom: 16px;
}

#mrModal .mrm-age-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: #fff;
    margin: 0 0 8px;
}

#mrModal .mrm-age-lead {
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
    margin: 0 0 22px;
}

#mrModal .mrm-age-row {
    display: grid;
    grid-template-columns: 0.8fr 1.4fr 1fr;
    gap: 10px;
    text-align: left;
    margin-bottom: 16px;
}

#mrModal .mrm-age-sel { display: block; }

#mrModal .mrm-age-sel > span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}

#mrModal .mrm-age-sel select {
    width: 100% !important;
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg) !important;
    color: var(--text) !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    font: inherit;
    font-size: 14.5px !important;
    height: auto !important;
    padding: 12px 30px 12px 12px !important;
    margin: 0 !important;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, #71767b 50%),
                      linear-gradient(135deg, #71767b 50%, transparent 50%) !important;
    background-position: calc(100% - 16px) 21px, calc(100% - 11px) 21px !important;
    background-size: 5px 5px, 5px 5px !important;
    background-repeat: no-repeat !important;
}

#mrModal .mrm-age-sel select:focus {
    outline: none;
    border-color: var(--accent-2) !important;
    box-shadow: 0 0 0 1px var(--accent-2);
}

#mrModal .mrm-age-err {
    margin: 0 0 14px;
    padding: 10px 13px;
    border-radius: 10px;
    background: rgba(244, 33, 46, .10);
    border: 1px solid rgba(244, 33, 46, .38);
    color: #ff8a92;
    font-size: 13.5px;
    text-align: left;
}

#mrModal .mrm-age-err[hidden] { display: none !important; }

#mrModal .mrm-age-back {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    border: 0 !important;
    background: transparent !important;
    color: var(--muted) !important;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 999px;
}

#mrModal .mrm-age-back:hover { color: var(--text) !important; }

@media (max-width: 420px) {
    #mrModal .mrm-age-row { grid-template-columns: 1fr; }
}
