/* ==========================================================================
   BlackMC - Modern UI & UX Layer (Etap 3)
   ========================================================================== */

:root {
    --bmc-gold: #F3C623;
    --bmc-gold-hover: #ffd43b;
    --bmc-gold-glow: rgba(243, 198, 35, 0.35);
    --bmc-dark-bg: #161618;
    --bmc-panel: rgba(28, 28, 32, 0.88);
    --bmc-panel-solid: #1e1e22;
    --bmc-border: rgba(255, 255, 255, 0.09);
    --bmc-border-gold: rgba(243, 198, 35, 0.35);
    --bmc-text: #f5f5f7;
    --bmc-muted: #a0a0ab;
}

/* 1. Nawigacja (Glassmorphism + lepsze menu profilu) */
nav {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: background 0.35s ease, height 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease !important;
}

nav.nav-collapse {
    background: rgba(18, 18, 22, 0.85) !important;
    border-bottom: 1px solid var(--bmc-border-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    height: 80px !important;
}

nav .menu-icons {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
    justify-content: space-between;
}

nav .menu-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

nav .menu-icons .menu-links a {
    position: relative;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1.2px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: color 0.25s ease, background 0.25s ease, transform 0.2s ease;
}

nav .menu-icons .menu-links a:hover,
nav .menu-icons .menu-links a.active-nav {
    color: #fff;
    background: rgba(243, 198, 35, 0.14);
}

nav .menu-icons .profile-box {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--bmc-border);
    padding: 6px 12px 6px 8px;
    border-radius: 12px;
    transition: border-color 0.25s ease, background 0.25s ease;
}

nav .menu-icons .profile-box:hover {
    border-color: var(--bmc-border-gold);
    background: rgba(255, 255, 255, 0.1);
}

nav .menu-icons .profile-box .pfp {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

nav .menu-icons .profile-box .profile-nick-label {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    margin-right: 8px;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

nav .menu-icons .profile-box .dropdown {
    right: 0;
    top: calc(100% + 10px);
    width: 220px;
    background: rgba(24, 24, 28, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--bmc-border-gold);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
    gap: 4px;
}

nav .menu-icons .profile-box .dropdown a {
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    padding: 10px 12px;
    margin: 0;
    border-radius: 8px;
    color: #e4e4e7;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

nav .menu-icons .profile-box .dropdown a:hover {
    background: var(--bmc-gold);
    color: #141416;
    transform: translateX(3px);
}

/* 2. Hero sekcja (Strona główna) */
main .copy-ip {
    background: rgba(20, 20, 24, 0.78);
    backdrop-filter: blur(10px);
    border: 1px solid var(--bmc-border-gold);
    padding: 14px 32px;
    border-radius: 50px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45), 0 0 25px rgba(243, 198, 35, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    user-select: none;
}

main .copy-ip:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px var(--bmc-gold-glow);
    background: rgba(28, 28, 34, 0.9);
}

main .copy-ip span {
    color: #fff;
    margin-left: 6px;
    letter-spacing: 1.5px;
}

main .copy-info {
    margin-top: 12px;
    font-size: 14px;
    opacity: 0.85;
}

main .server-status {
    background: rgba(20, 20, 24, 0.78);
    backdrop-filter: blur(10px);
    border: 1px solid var(--bmc-border);
    padding: 12px 26px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

main .server-status .playercount {
    color: var(--bmc-gold);
    font-weight: 700;
}

#box_message {
    bottom: 24px !important;
    right: 24px !important;
    background: #18181c !important;
    color: var(--bmc-gold) !important;
    border: 1px solid var(--bmc-gold);
    padding: 14px 24px !important;
    border-radius: 10px !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    z-index: 2000;
}

/* 3. Sekcja TOPKI + Wyszukiwarka Graczy */
section.playertop .top .gamemode {
    background: #161618;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--bmc-border);
    gap: 6px;
}

section.playertop .top .gamemode button {
    border-right: none !important;
    border-radius: 8px;
    padding: 10px 24px !important;
    font-size: 18px !important;
    transition: background 0.25s ease, color 0.25s ease;
}

section.playertop .top .gamemode button::after,
section.playertop .top .content .categories button::after {
    display: none !important;
}

section.playertop .top .gamemode button.active {
    background: var(--bmc-gold);
    color: #141416 !important;
}

section.playertop .top .content {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 960px;
    padding: 0 16px;
}

section.playertop .top .content .categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

section.playertop .top .content .categories button {
    font-size: 15px !important;
    font-weight: 600 !important;
    padding: 10px 20px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--bmc-border);
    color: #d4d4d8;
    transition: all 0.25s ease;
}

section.playertop .top .content .categories button:hover {
    border-color: var(--bmc-border-gold);
    color: #fff;
    transform: translateY(-2px);
}

section.playertop .top .content .categories button.active {
    background: var(--bmc-gold);
    color: #141416;
    border-color: var(--bmc-gold);
    font-weight: 800 !important;
    box-shadow: 0 6px 20px var(--bmc-gold-glow);
}

/* Wyszukiwarka graczy w topkach */
section.playertop .top .content .player-search {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;
}

section.playertop .top .content .player-search .search-bar {
    width: 100%;
    display: flex;
    align-items: center;
    background: #161618 !important;
    border: 1px solid var(--bmc-border);
    border-radius: 50px;
    padding: 6px 8px 6px 20px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

section.playertop .top .content .player-search .search-bar:focus-within {
    border-color: var(--bmc-gold);
    box-shadow: 0 8px 25px rgba(243, 198, 35, 0.2) !important;
}

section.playertop .top .content .player-search .search-bar .search {
    background: transparent;
    border: none !important;
    outline: none;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    width: 100% !important;
}

section.playertop .top .content .player-search .search-bar .search::placeholder {
    color: #777;
}

section.playertop .top .content .player-search .search-bar button {
    background: var(--bmc-gold) !important;
    color: #141416 !important;
    border-radius: 50px;
    padding: 8px 18px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px;
    transition: background 0.2s ease, transform 0.2s ease;
}

section.playertop .top .content .player-search .search-bar button:hover {
    background: var(--bmc-gold-hover) !important;
    transform: scale(1.04);
}

.search-feedback {
    margin-top: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #ff6b6b;
    min-height: 18px;
}

/* Karty i wiersze topki */
section.playertop .bottom .middle {
    border-radius: 16px;
}

section.playertop .bottom .middle .leaderboard .leaderboard-bottom .top10 {
    border-radius: 12px;
    border: 1px solid var(--bmc-border);
}

section.playertop .bottom .middle .leaderboard .leaderboard-bottom .top10 .player-record {
    border-radius: 8px;
    padding: 10px 14px;
    margin: 6px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

section.playertop .bottom .middle .leaderboard .leaderboard-bottom .top10 .player-record:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(243, 198, 35, 0.25);
}

section.playertop .bottom .left .profile-card,
section.playertop .bottom .right .profile-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--bmc-border-gold);
}

/* 4. Sklep (shop.php) */
main .shop-container .shop-section .shopping-card {
    border-radius: 14px;
    overflow: hidden;
    background: #1b1b1f;
    border: 1px solid var(--bmc-border);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

main .shop-container .shop-section .shopping-card:hover {
    transform: translateY(-8px);
    border-color: var(--bmc-gold);
    box-shadow: 0 28px 50px rgba(0, 0, 0, 0.65), 0 0 25px rgba(243, 198, 35, 0.18);
}

main .shop-container .shop-section .shopping-card .card-img .card-desc {
    background: rgba(20, 20, 24, 0.92);
    backdrop-filter: blur(8px);
    color: #f4f4f6;
    font-size: 15px;
    line-height: 1.5;
}

main .shop-container .shop-section .shopping-card .card-info {
    background: #1b1b1f;
    color: #fff;
    border-top: 1px solid var(--bmc-border);
}

main .shop-container .shop-section .shopping-card .card-info .buy-button {
    border-radius: 8px;
    padding: 10px 32px;
    font-size: 15px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

main .shop-container .shop-section .shopping-card .card-info .buy-button:hover {
    background: var(--bmc-gold-hover);
    transform: scale(1.05);
    box-shadow: 0 6px 18px var(--bmc-gold-glow);
}

/* 5. Podstrona zakupu (buy.php) i podgląd Własnej Rangi na żywo */
main .shop-container {
    border-radius: 16px;
}

main .shop-container .left img {
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

main .shop-container .right form input:not([type='submit']),
main .shop-container .right form select {
    border-radius: 8px;
    border: 1px solid var(--bmc-border);
    background: #27272c;
    outline: none;
}

main .shop-container .right form input:not([type='submit']):focus,
main .shop-container .right form select:focus {
    border-color: var(--bmc-gold);
    box-shadow: 0 0 0 3px rgba(243, 198, 35, 0.15);
}

.mc-rank-preview-box {
    background: #121215;
    border: 1px solid var(--bmc-border-gold);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 18px;
    font-family: 'Montserrat', sans-serif;
}

.mc-rank-preview-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bmc-muted);
    margin-bottom: 8px;
    font-weight: 700;
}

.mc-chat-preview {
    background: rgba(0, 0, 0, 0.65);
    padding: 10px 14px;
    border-radius: 6px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 15px;
    color: #AAAAAA;
    word-break: break-all;
    border-left: 3px solid var(--bmc-gold);
}

.mc-color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.mc-color-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 4px 7px;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.mc-color-btn:hover {
    transform: translateY(-2px);
    border-color: #fff;
}

.rank-hint-text {
    font-size: 12px;
    color: var(--bmc-muted);
    line-height: 1.45;
    margin-top: 8px;
}

/* 6. Logowanie / Odzyskiwanie / PIN (authme.php, recovery.php, password.php, console-pin.php) */
form.login-form,
body > form {
    background: rgba(28, 28, 32, 0.92);
    backdrop-filter: blur(14px);
    border: 1px solid var(--bmc-border-gold);
    border-radius: 16px;
    padding: 34px 30px;
    min-width: 340px;
}

form .title {
    font-size: 24px;
    font-weight: 700;
    color: var(--bmc-gold);
    margin-bottom: 22px;
}

form input[type="text"],
form input[type="password"],
form input[type="email"] {
    border-radius: 8px;
    border: 1px solid var(--bmc-border);
    outline: none;
}

form input[type="text"]:focus,
form input[type="password"]:focus,
form input[type="email"]:focus {
    border-color: var(--bmc-gold);
}

.auth-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 14px;
}

.auth-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: var(--bmc-gold);
}

/* 7. Responsywność (Mobile UX) */
@media (max-width: 768px) {
    nav .menu-icons {
        padding: 0 12px;
    }
    nav .menu-icons .profile-box .profile-nick-label {
        display: none;
    }
    nav .menu-icons .menu-links a {
        font-size: 14px;
        padding: 6px 10px;
    }
    section.playertop .top .title {
        font-size: 56px;
        margin-bottom: 25px;
    }
    form.login-form,
    body > form {
        min-width: 90vw;
        padding: 24px 20px;
    }
}
