* {
    box-sizing: border-box;
}

html {
    background: #0d1117;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding-bottom: 74px;
    background: #0d1117;
    color: #f0f3f7;
    font-family: Arial, Helvetica, sans-serif;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid #222a33;
    background: rgba(13, 17, 23, 0.96);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 72px;
    padding: 0 18px;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f4f7fb;
    text-decoration: none;
}

.header-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #2d2412;
    color: #f2b84b;
    font-size: 18px;
}

.header-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-brand-text strong {
    font-size: 17px;
    line-height: 1;
}

.header-brand-text span {
    color: #7f8b99;
    font-size: 12px;
}

.desktop-nav,
.desktop-login {
    display: none;
}

.mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1200;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 70px;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid #26303a;
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(18px);
}

.mobile-bottom-nav a,
.mobile-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #778696;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.mobile-bottom-nav i {
    font-size: 19px;
}

.mobile-bottom-nav span {
    overflow: hidden;
    width: 100%;
    padding: 0 2px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-bottom-nav a.active,
.mobile-bottom-nav button.active {
    color: #f2b84b;
}

.mobile-bottom-menu {
    position: fixed;
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    z-index: 1300;
    display: none;
    width: 220px;
    padding: 8px;
    border: 1px solid #34312a;
    border-radius: 12px;
    background: #111820;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
}

.mobile-bottom-menu.open {
    display: block;
}

.mobile-bottom-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 13px;
    border-radius: 8px;
    color: #a8b3c0;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.mobile-bottom-menu a:hover {
    background: #211c13;
    color: #f2b84b;
}

.mobile-bottom-menu i {
    width: 18px;
    color: #c29b53;
    text-align: center;
}

.mobile-bottom-menu .logout-link {
    margin-top: 6px;
    border-top: 1px solid #2a3138;
    border-radius: 0 0 8px 8px;
    color: #d77a80;
}

.header-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 40px;
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid #242d37;
    color: #8c98a7;
    text-decoration: none;
}

.header-auth:hover,
.header-auth.active {
    color: #f2b84b;
}

@media (min-width: 1000px) {
    body {
        padding-bottom: 0;
    }
    .header-inner {
        max-width: 1500px;
        min-height: 64px;
        margin: 0 auto;
        padding: 0 24px;
    }
    .header-left {
        gap: 34px;
    }
    .header-brand-icon {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    .header-brand-text strong {
        font-size: 15px;
    }
    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 3px;
    }
    .desktop-nav a {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 40px;
        padding: 0 12px;
        border-radius: 8px;
        color: #8c98a7;
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
        transition: color 0.18s ease, background 0.18s ease;
    }
    .desktop-nav a:hover {
        color: #f3c66f;
    }
    .desktop-nav a.active {
        background: #2c2415;
        color: #f2b84b;
    }
    .desktop-nav a i {
        font-size: 13px;
    }
    .desktop-login {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 40px;
        border-left: 1px solid #242d37;
        color: #8c98a7;
        text-decoration: none;
    }
    .desktop-login:hover,
    .desktop-login.active {
        color: #f2b84b;
    }
    .mobile-bottom-nav,
    .mobile-bottom-menu {
        display: none !important;
    }
    .header-auth {
        display: flex;
    }
}