/* ===== Layout ogólny + tło ===== */

html,
body {
    height: 100%;
}

body {
    min-height: 100vh;
    background-image: url("../images/background.jpg");
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: #ffffff;
    font-family: "Century Gothic", Arial, sans-serif;
}

/* Kontener layoutu 3 paneli */
.game-layout {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

/* Logo */
img.img-fluid {
    max-width: 320px;
}

/* ===== Navbar / header w stylu OGame ===== */

.game-navbar {
    background: linear-gradient(90deg, #02040c 0%, #0c1322 40%, #02040c 100%);
    border-bottom: 1px solid rgba(80, 160, 220, 0.9);
    box-shadow:
            0 0.25rem 0.75rem rgba(0, 0, 0, 0.9),
            0 0 16px rgba(0, 200, 255, 0.35);
    position: relative;
    z-index: 10;
}

/* Neonowa linia pod menu */
.game-navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(
            90deg,
            rgba(0, 255, 255, 0),
            rgba(0, 255, 255, 0.9),
            rgba(0, 255, 255, 0)
    );
}

/* Blok wyboru języka */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: radial-gradient(circle at top, rgba(40, 80, 140, 0.5), rgba(4, 8, 20, 0.95));
    border: 1px solid rgba(100, 180, 250, 0.8);
    box-shadow: 0 0 8px rgba(0, 200, 255, 0.4);
}

.lang-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #d8e9ff;
    opacity: 0.9;
}

.lang-flags {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lang-flags img {
    width: 24px;
    height: 16px;
    cursor: pointer;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.lang-flags img:hover {
    transform: translateY(-1px) scale(1.03);
    border-color: #00e5ff;
    box-shadow:
            0 0 6px rgba(0, 0, 0, 1),
            0 0 8px rgba(0, 220, 255, 0.7);
}

/* Linki w menu */
.game-navbar-nav .nav-link {
    position: relative;
    padding: 0.35rem 0.9rem;
    margin: 0 0.1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #cfd8ff;
}

.game-navbar-nav .nav-link:hover,
.game-navbar-nav .nav-link:focus {
    color: #ffffff;
}

/* Neonowa kreska pod aktywnym / hover linkiem */
.game-navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: -0.2rem;
    height: 2px;
    background: linear-gradient(
            90deg,
            rgba(0, 255, 255, 0),
            rgba(0, 255, 255, 0.9),
            rgba(0, 255, 255, 0)
    );
    opacity: 0;
    transform: scaleX(0.3);
    transform-origin: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.game-navbar-nav .nav-link:hover::after,
.game-navbar-nav .nav-link:focus::after,
.game-navbar-nav .nav-link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.game-navbar-nav .nav-link.active {
    color: #ffffff;
    text-shadow: 0 0 6px rgba(0, 200, 255, 0.7);
}

/* Login w headerze */

.game-navbar-login {
    gap: 0.75rem;
}

.game-navbar-field {
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.game-navbar-field-button {
    display: flex;
    align-items: flex-end;
}

.small-label {
    font-size: 0.75rem;
    color: #d7e4ff;
}

/* Inputy/select w headerze */
.game-navbar-login .form-control,
.game-navbar-login .form-select {
    background-color: rgba(0, 0, 0, 0.55) !important;
    border: 1px solid rgba(150, 210, 255, 0.55) !important;
    color: #f5f7ff !important;
    font-size: 0.85rem !important;
    padding: 5px 8px !important;
}

.game-navbar-login .form-control::placeholder {
    color: rgba(220, 235, 255, 0.7);
}

.game-navbar-login .form-control:focus,
.game-navbar-login .form-select:focus {
    border-color: #1ecbff !important;
    box-shadow: 0 0 0 0.18rem rgba(0, 200, 255, 0.3) !important;
}

/* Toggler na mobile – delikatne podświetlenie */
.game-navbar-toggler {
    border-color: rgba(120, 190, 255, 0.8);
}

.game-navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 200, 255, 0.4);
}

/* Zmiana ułożenia na mniejszych ekranach */
@media (max-width: 767.98px) {
    .game-navbar .container-fluid {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .lang-switcher {
        margin-bottom: 0.2rem;
        padding: 0.15rem 0.5rem;
    }

    .lang-flags img {
        width: 22px;
        height: 14px;
    }

    .game-navbar-nav .nav-link {
        text-align: center;
        padding: 0.45rem 0.9rem;
    }
}

/* ===== Panele w stylu OGame ===== */

.game-panel {
    background: radial-gradient(circle at top, rgba(90, 120, 190, 0.25), rgba(6, 10, 24, 0.95));
    border-radius: 12px;
    border: 1px solid rgba(80, 160, 220, 0.8);
    box-shadow:
            0 0 12px rgba(0, 0, 0, 0.9),
            0 0 25px rgba(0, 190, 255, 0.3);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(3px);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.game-panel:hover {
    box-shadow:
            0 0 18px rgba(0, 0, 0, 1),
            0 0 35px rgba(0, 220, 255, 0.5);
    transform: translateY(-1px);
}

/* Pasek tytułu sekcji */
.game-panel-header {
    background: linear-gradient(90deg, #06101f 0%, #10192b 40%, #1f3a5a 100%);
    border-bottom: 1px solid rgba(120, 200, 255, 0.7);
    padding: 0.65rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    position: relative;
}

/* Neonowy pasek pod headerem */
.game-panel-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 255, 255, 0), rgba(0, 255, 255, 0.9), rgba(0, 255, 255, 0));
}

/* Ikonka sekcji */
.game-panel-icon {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 4px rgba(0, 255, 255, 0.8));
}

/* Tytuł sekcji */
.game-panel-title {
    font-family: Luminari, fantasy;
    font-size: 1.1rem;
    color: #e8f3ff;
    text-shadow:
            0 0 6px rgba(0, 0, 0, 0.9),
            0 0 12px rgba(0, 200, 255, 0.6);
}

/* Zawartość panelu */
.game-panel-body {
    padding: 1rem 1.1rem 1.2rem;
    font-family: "Century Gothic", Arial, sans-serif;
    font-size: 0.95rem;
    color: #f5f7ff;
}

/* Linia podziału (np. między loginem a statami) */
.game-panel-divider {
    border: 0;
    border-top: 1px solid rgba(150, 210, 255, 0.4);
    margin: 0.75rem 0 1rem;
}

/* Linki w panelach */
.game-panel-body a {
    color: #7fd4ff;
    text-decoration: none;
}

.game-panel-body a:hover {
    text-decoration: underline;
}

/* Labelki formularza */
.game-panel-body .form-label {
    font-size: 0.9rem;
    color: #d7e4ff;
}

/* Checkbox regulaminu */
#reg_rgt {
    cursor: pointer;
}

/* Tooltip (opis prędkości uniwersum) */
.tooltip-inner {
    white-space: pre-wrap;
    text-align: left;
}

/* Stopka */
#footer {
    color: #ffffff;
    font-family: Courier, monospace;
    font-size: 11px;
    opacity: 0.9;
}

/* Responsywność paneli */
@media (max-width: 767.98px) {
    .game-panel-body {
        padding: 0.85rem 0.9rem 1.1rem;
    }

    img.img-fluid {
        max-width: 240px;
    }
}

@media (min-width: 768px) {
    .game-panel {
        margin-top: 0.2rem;
    }
}

/* ======== Select w stylu OGame (globalnie) ======== */

select,
.form-select {
    background-color: rgba(0, 0, 0, 0.55) !important;
    color: #e9f4ff !important;
    border: 1px solid rgba(100, 180, 255, 0.45) !important;
    padding: 6px 28px 6px 10px !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    font-family: "Century Gothic", Arial, sans-serif;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='0,0 140,0 70,80' fill='%23b8dcff'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select:hover,
.form-select:hover {
    border-color: rgba(0, 200, 255, 0.85) !important;
}

select:focus,
.form-select:focus {
    border-color: #1ecbff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 200, 255, 0.35) !important;
    outline: none !important;
}

/* Opcje w rozwijanym select */
select option,
.form-select option {
    background-color: rgba(15, 20, 35, 0.98) !important;
    color: #e9f4ff !important;
}

/* Firefox fix — bez tego Firefox robi białe tło */
@-moz-document url-prefix() {
    select,
    .form-select {
        color: #e9f4ff !important;
        background-color: rgba(0, 0, 0, 0.75) !important;
    }
    select option,
    .form-select option {
        background-color: #0b1120 !important;
    }
}

/* Select w headerze (navbar) – lekko ciaśniejszy */
.game-navbar-login .form-select {
    padding-right: 22px !important;
}

/* ==============================================
   INPUTY W STYLU OGAME — SPÓJNE Z SELECTAMI
   ============================================== */

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
.form-control {
    background-color: rgba(0, 0, 0, 0.55) !important;
    border: 1px solid rgba(100, 180, 255, 0.45) !important;
    color: #e9f4ff !important;
    padding: 7px 10px !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    font-family: "Century Gothic", Arial, sans-serif !important;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
    transition: all 0.18s ease-in-out;
}

/* Placeholdery */
input::placeholder {
    color: rgba(220, 235, 255, 0.55) !important;
}

/* Focus — neon + subtelny glow */
input:focus,
.form-control:focus {
    border-color: #1ecbff !important;
    box-shadow:
            0 0 0 0.2rem rgba(0, 200, 255, 0.35),
            0 0 6px rgba(0, 220, 255, 0.5) !important;
    outline: none !important;
    background-color: rgba(5, 10, 20, 0.75) !important;
}

/* Hover — lekki glow */
input:hover,
.form-control:hover {
    border-color: rgba(0, 200, 255, 0.8) !important;
}

/* Błąd walidacji */
input.is-invalid {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 6px rgba(255, 70, 70, 0.6) !important;
}

.is-invalid {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 6px rgba(255, 70, 70, 0.6) !important;
}

/* Mobile login — takie same zasady */
#login-mobile .form-control {
    background-color: rgba(0, 0, 0, 0.55) !important;
    border: 1px solid rgba(100, 180, 255, 0.45) !important;
}

/* Planet name input — drobny ficzer */
#reg_planet {
    text-transform: capitalize;
}

/* ==============================================
   PRZYCISK "ZALOGUJ" W STYLU OGAME
   ============================================== */

.btn-primary {
    background: linear-gradient(180deg,
    rgba(40, 110, 185, 0.9) 0%,
    rgba(20, 60, 110, 0.95) 55%,
    rgba(10, 30, 50, 0.95) 100%);
    border: 1px solid rgba(120, 190, 255, 0.8);
    color: #e9f4ff !important;
    text-shadow: 0 0 6px rgba(0, 150, 255, 0.8);
    padding: 6px 18px !important;
    border-radius: 6px !important;
    font-size: 0.87rem !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;

    box-shadow:
            inset 0 0 6px rgba(0, 0, 0, 0.7),
            0 0 6px rgba(0, 200, 255, 0.35),
            0 0 12px rgba(0, 200, 255, 0.25);

    transition: all 0.18s ease-in-out;
}

/* Hover — neonowy glow + delikatne uniesienie */
.btn-primary:hover {
    background: linear-gradient(180deg,
    rgba(60, 140, 220, 1) 0%,
    rgba(30, 90, 160, 0.95) 65%,
    rgba(15, 50, 90, 0.95) 100%);
    border-color: rgba(0, 200, 255, 0.9);

    box-shadow:
            inset 0 0 4px rgba(0, 0, 0, 0.6),
            0 0 10px rgba(0, 220, 255, 0.7),
            0 0 16px rgba(0, 220, 255, 0.4);

    transform: translateY(-1px);
}

/* Focus */
.btn-primary:focus {
    outline: none !important;
    box-shadow:
            0 0 0 0.18rem rgba(0, 200, 255, 0.45),
            0 0 8px rgba(0, 220, 255, 0.7) !important;
}

/* Active — kliknięcie */
.btn-primary:active {
    background: linear-gradient(180deg,
    rgba(30, 90, 160, 0.9) 0%,
    rgba(20, 60, 110, 0.95) 60%,
    rgba(10, 30, 50, 0.95) 100%);
    box-shadow:
            inset 0 0 8px rgba(0, 0, 0, 0.9),
            0 0 6px rgba(0, 200, 255, 0.45);
    transform: translateY(1px);
}

@media (min-width: 992px) {
    .game-navbar-nav {
        margin-left: 90px !important; /* dopasowanie wycentrowania menu */
    }
}

/* ==============================================
   MODAL W STYLU OGAME (flashModal)
   ============================================== */

.game-modal .modal-content {
    background: radial-gradient(circle at top, rgba(90, 120, 190, 0.25), rgba(6, 10, 24, 0.97));
    border-radius: 12px;
    border: 1px solid rgba(80, 160, 220, 0.8);
    box-shadow:
            0 0 12px rgba(0, 0, 0, 0.9),
            0 0 25px rgba(0, 190, 255, 0.4);
    color: #e8f3ff;
}

.game-modal .modal-header {
    background: linear-gradient(90deg, #06101f 0%, #10192b 40%, #1f3a5a 100%);
    border-bottom: 1px solid rgba(120, 200, 255, 0.7);
    padding: 0.6rem 0.9rem;
}

.game-modal .modal-title {
    font-family: Luminari, fantasy;
    font-size: 1.05rem;
    text-shadow:
            0 0 6px rgba(0, 0, 0, 0.9),
            0 0 12px rgba(0, 200, 255, 0.6);
}

.game-modal .modal-body {
    padding: 1rem 1.2rem;
    font-size: 0.95rem;
}

.game-modal .modal-footer {
    border-top: 1px solid rgba(120, 200, 255, 0.4);
    padding: 0.6rem 0.9rem;
}

/* Żeby X był widoczny */
.game-modal .btn-close {
    filter: invert(1) drop-shadow(0 0 4px rgba(0, 0, 0, 0.8));
}

/* (Opcjonalnie) lekko przygaszone tło */
.modal-backdrop.show {
    opacity: 0.8;
}

/* --- Fix modal wyglądu --- */

.game-modal .modal-content {
    background: #1c1f26 !important; /* ciemny ale nieprzezroczysty */
    color: #fff;
    opacity: 1 !important;
}

.game-modal .modal-header,
.game-modal .modal-body,
.game-modal .modal-footer {
    background: transparent !important;
}

.modal-backdrop.show {
    opacity: 0.35 !important; /* łagodniejsze przyciemnienie */
}

.btn-close {
    filter: invert(1); /* biała ikonka X */
}

/* Tooltip błędów */
.is-invalid[data-bs-toggle="tooltip"] {
    border-color: #dc3545 !important;
}

