/* Navbar styles ported from g-g/css/style.css (header section only).
   Pairs with the markup in includes/header.php and Bootstrap 5. */

:root {
    --primary-color: #d32f2f;
    --primary-hover: #ff2e34;
    --red-color: #E51C2C;
    --red-hover: #ff2e40;
    --bg-color: #0b0b0b;
    --text-grey: #b0b0b0;
    --white: #ffffff;
}

/* NAVBAR */
.navbar {
    background: rgba(11, 11, 11, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease-in-out;
    padding-top: 1.4rem;
    padding-bottom: 1.4rem;
}

.navbar.scrolled {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    background: rgba(11, 11, 11, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link {
    color: var(--text-grey) !important;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 1.5rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    color: var(--white) !important;
}

.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.4em;
    vertical-align: 0.15em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    color: var(--text-grey);
    transition: color 0.3s ease;
}

.nav-link:hover .dropdown-toggle::after,
.dropdown-toggle:hover::after {
    color: var(--white);
}

.dropdown-menu {
    background-color: #0f0f0f;
    border-radius: 0;
    padding: 0.5rem 0;
    margin-top: 25px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.dropdown-item {
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 10px 24px;
    transition: all 0.2s;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #1a1a1a;
    color: #fff;
}

.dropdown-divider {
    border-top-color: #2a2a2a;
}

/* LANG BTN */
.btn-lang {
    background-color: transparent !important;
    border: none !important;
    color: #ccc !important;
    box-shadow: none !important;
    text-transform: uppercase;
    font-weight: 700;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.btn-lang::before {
    content: "🌐";
    font-size: 1rem;
    filter: grayscale(100%);
    margin-right: 6px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.btn-lang:hover,
.btn-lang:focus,
.btn-lang.show {
    color: var(--white) !important;
}

.btn-lang:hover::before {
    opacity: 1;
}

/* NAV BUTTONS */
a.btn-outline-light {
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: #ddd;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 50px;
    padding: 8px 24px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

a.btn-outline-light:hover {
    background-color: #333;
    color: var(--white);
    border-color: #555;
}

.btn-danger {
    background-color: transparent !important;
    border: 1px solid var(--primary-color);
    color: var(--white) !important;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 50px;
    padding: 8px 24px;
    font-size: 0.9rem;
    box-shadow: 0 0 15px rgba(211, 47, 47, 0.15);
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(211, 47, 47, 0.5);
    border-color: var(--primary-color);
}

.navbar-toggler {
    border: none !important;
    padding: 0.25rem 0.5rem;
    box-shadow: none !important;
}

.navbar-toggler-icon {
    width: 1.5em;
    height: 1.5em;
    opacity: 0.8;
}

.navbar-toggler:focus .navbar-toggler-icon {
    opacity: 1;
}

/* ACCOUNT PILL */
.account-pill {
    background-color: #1a1a1a;
    padding: 4px 16px 4px 4px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.account-pill:hover {
    background-color: #262626;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.account-pill:hover .account-name {
    color: var(--white);
}

.account-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--primary-color), var(--red-hover));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    margin-right: 10px;
    flex-shrink: 0;
}

.account-name {
    font-size: 13px;
    max-width: 140px;
    display: block;
}

.account-balance {
    font-size: 11px;
    color: var(--text-grey);
    font-weight: 500;
    margin-top: 2px;
    letter-spacing: 0.3px;
}

/* LOGO IMG */
.logo-img img {
    width: 65px;
}

.logo-img {
    transition: all 0.3s ease-in-out;
}

.logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(255, 50, 50, 0.8));
}

/* MOBILE TWEAK (from g-g) */
@media (max-width: 991.98px) {
    .navbar-nav .nav-link {
        padding: 10px 4px !important;
    }
}

/* Wiki: push the page body below the fixed navbar */
body {
    padding-top: 92px;
}
@media (max-width: 991.98px) {
    body {
        padding-top: 78px;
    }
}

/* ============ PRELOADER (ported from g-g/css/style.css) ============
   In the wiki it's shown ONLY during language switch — hidden by default. */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0b0b0b;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.4s ease-out, visibility 0.4s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#preloader.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#preloader .loader-container {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#preloader .ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #ff3b3b;
    animation: wiki-loader-spin 1.5s linear infinite;
    filter: drop-shadow(0 0 10px rgba(255, 59, 59, 0.5));
}

#preloader .ring::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-bottom-color: rgba(255, 59, 59, 0.5);
    animation: wiki-loader-spin-reverse 2s linear infinite;
}

#preloader .loader-text {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: sans-serif;
    position: relative;
    z-index: 2;
}

#preloader .loader-text img {
    width: 65px;
    height: auto;
}

#preloader .loader-percent,
#preloader .loader-slogan {
    margin-top: 20px;
    color: var(--text-grey);
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

@keyframes wiki-loader-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes wiki-loader-spin-reverse {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}
