@font-face {
    font-family: 'HL2Trebuc';
    src: url('../font/trebuc.ttf') format('truetype');
    font-display: swap;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    font-family: 'HL2Trebuc', "Tahoma", "Verdana", sans-serif;
}

button, input, textarea, select {
    font-family: inherit;
}

.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    background: #000 url('../images/default_theme/background.jpg') no-repeat center center fixed !important;
    background-size: cover !important;
    z-index: 0;
    filter: brightness(0.6);
}

.bg-vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

.login-page {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.vgui-window {
    background: #4c4c4c;
    border: 1px solid #7a7a7a;
    width: 420px;
    box-shadow: 4px 4px 20px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
}

.vgui-header {
    background: #3d3d3d;
    color: #bdbebe;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    border-bottom: 1px solid #2b2b2b;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
}

.vgui-body {
    padding: 25px;
}

.brand-section {
    margin-bottom: 25px;
    text-align: center;
}

.brand-section h1 {
    color: #ffffff;
    font-size: 42px;
    margin: 0;
    letter-spacing: 10px;
    text-transform: uppercase;
    opacity: 0.95;
}

.brand-section .subtitle {
    color: #ff9d00;
    font-size: 12px;
    letter-spacing: 4px;
    margin-top: -5px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    color: #bdbebe;
    font-size: 11px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.vgui-input {
    background: #2b2b2b;
    border: 1px solid #7a7a7a;
    color: #ffffff;
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    outline: none;
    font-family: inherit;
}

.vgui-input:focus {
    border-color: #ff9d00;
}

.vgui-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.vgui-button {
    background: #5d5d5d;
    border: 1px solid #2b2b2b;
    color: #fff;
    padding: 7px 15px;
    cursor: pointer;
    font-size: 11px;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    min-width: 80px;
}

.vgui-button:hover {
    background: #7a7a7a;
    border-color: #ffffff;
}

.vgui-button.primary {
    background: #6d6d6d;
    border-color: #999;
}

.vgui-message {
    font-size: 11px;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid transparent;
}

.vgui-message.error {
    background: rgba(255, 50, 50, 0.2);
    border-color: #ff3232;
    color: #ff3232;
}

.vgui-message.success {
    background: rgba(50, 255, 50, 0.2);
    border-color: #32ff32;
    color: #32ff32;
}

html[data-theme="anime"] .bg-vignette {
    background: radial-gradient(ellipse 85% 75% at 50% 45%, transparent 25%, rgba(48, 38, 72, 0.42) 65%, rgba(28, 22, 42, 0.62) 100%);
}

html[data-theme="anime"] .vgui-window {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(218, 195, 248, 0.55);
    background:
        linear-gradient(145deg, rgba(255, 248, 255, 0.07) 0%, transparent 42%),
        linear-gradient(165deg, rgba(88, 78, 112, 0.98) 0%, rgba(58, 50, 78, 0.99) 100%);
    box-shadow:
        0 0 0 1px rgba(42, 34, 58, 0.85),
        0 10px 46px rgba(22, 14, 38, 0.58),
        0 0 36px rgba(188, 145, 235, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -2px 12px rgba(28, 20, 48, 0.35);
}

html[data-theme="anime"] .vgui-window::after {
    content: '';
    position: absolute;
    inset: 9px;
    border-radius: 12px;
    pointer-events: none;
    z-index: 1;
    border: 1px solid rgba(240, 218, 255, 0.16);
    box-shadow: inset 0 0 28px rgba(180, 140, 220, 0.06);
}

html[data-theme="anime"] .vgui-header {
    position: relative;
    z-index: 3;
    border-radius: 14px 14px 0 0;
    letter-spacing: 0.14em;
    padding-top: 8px;
    padding-bottom: 8px;
    background:
        linear-gradient(180deg, rgba(255, 235, 252, 0.14) 0%, transparent 55%),
        linear-gradient(180deg, rgba(104, 94, 128, 0.96) 0%, rgba(76, 68, 98, 0.97) 100%);
    color: rgba(248, 240, 255, 0.96);
    border-bottom: 1px solid rgba(200, 175, 235, 0.42);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="anime"] .vgui-body {
    position: relative;
    z-index: 3;
    border-radius: 0 0 14px 14px;
}

html[data-theme="anime"] .brand-section .subtitle {
    color: #d8b8ec;
}

html[data-theme="anime"] .input-group label {
    color: rgba(222, 216, 238, 0.82);
}

html[data-theme="anime"] .vgui-input {
    background: rgba(34, 30, 48, 0.85);
    border: 1px solid rgba(172, 155, 208, 0.4);
    color: rgba(250, 246, 255, 0.96);
}

html[data-theme="anime"] .vgui-input:focus {
    border-color: rgba(208, 182, 238, 0.65);
    box-shadow: 0 0 0 1px rgba(190, 165, 225, 0.12);
}

html[data-theme="anime"] .vgui-button {
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(92, 84, 118, 0.95) 0%, rgba(68, 62, 92, 0.98) 100%);
    border: 1px solid rgba(165, 148, 198, 0.42);
    color: rgba(246, 242, 255, 0.95);
}

html[data-theme="anime"] .vgui-button:hover {
    background: linear-gradient(180deg, rgba(108, 98, 132, 0.98) 0%, rgba(82, 74, 108, 0.99) 100%);
    border-color: rgba(210, 185, 238, 0.55);
}

html[data-theme="anime"] .vgui-button.primary {
    background: linear-gradient(180deg, rgba(118, 92, 148, 0.95) 0%, rgba(92, 72, 122, 0.98) 100%);
    border-color: rgba(200, 175, 235, 0.48);
}

@media (max-width: 760px) {
    html, body {
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .login-page {
        min-height: 100dvh;
        height: auto;
        padding: 72px 14px 84px 14px;
        box-sizing: border-box;
        align-items: flex-start;
    }

    .vgui-window {
        width: min(100%, 420px);
        max-width: 100%;
    }

    .vgui-body {
        padding: 18px;
    }

    .brand-section h1 {
        font-size: clamp(32px, 11vw, 42px);
        letter-spacing: 6px;
    }

    .brand-section .subtitle {
        font-size: 11px;
        letter-spacing: 2px;
        line-height: 1.4;
    }

    .vgui-input {
        min-height: 40px;
        font-size: 16px;
    }

    .vgui-footer {
        flex-wrap: wrap;
        gap: 8px;
    }

    .vgui-button {
        flex: 1 1 100%;
        min-height: 40px;
        font-size: 12px;
    }
}