/* ============================================
   .mini — Custom CSS
   ============================================ */

/* === Auth page background === */
.mx_AuthPage {
    background: linear-gradient(135deg, #0a0e1a 0%, #121833 25%, #1a1e3a 50%, #141832 75%, #0d1020 100%) !important;
}

/* === Stars on auth page === */
.mx_AuthPage::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(1px 1px at 5% 15%, rgba(255,255,255,0.7) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 12% 80%, rgba(180,200,255,0.8) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 45%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 10%, rgba(255,255,255,0.6) 0%, transparent 100%),
        radial-gradient(2px 2px at 55% 70%, rgba(170,190,255,0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 65% 30%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 55%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 85% 85%, rgba(200,210,255,0.7) 0%, transparent 100%),
        radial-gradient(1px 1px at 92% 20%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.3) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}
.mx_AuthPage > * {
    position: relative;
    z-index: 1;
}

/* === Auth card — glass effect === */
.mx_AuthPage_modal {
    background: rgba(255,255,255,0.05) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
    overflow: hidden;
}

/* === Left panel (header) — transparent === */
.mx_AuthHeader {
    background: transparent !important;
}

/* === Right panel (body) — transparent === */
.mx_AuthBody {
    background: transparent !important;
    color: rgba(255,255,255,0.9) !important;
}

/* === Modal content — transparent === */
.mx_AuthPage_modalContent {
    background: transparent !important;
}

/* === Headings white === */
.mx_AuthBody h1,
.mx_AuthBody h2,
.mx_AuthBody h3 {
    color: #ffffff !important;
}

/* === Secondary text === */
.mx_AuthBody .mx_AuthBody_text,
.mx_AuthBody p {
    color: rgba(255,255,255,0.6) !important;
}

/* === Replace Element logo with .mini === */
.mx_AuthHeaderLogo img {
    content: url('img/minilogo-transparent.png') !important;
    max-height: 64px !important;
    width: auto !important;
}

/* === Hide Element/Matrix branding === */
.mx_AuthPage_footer,
.mx_AuthFooter,
[class*='AuthFooter'],
[class*='PoweredBy'],
[class*='powered'] {
    display: none !important;
}

/* === Hide language selector === */
.mx_LanguageSelector,
.mx_LanguageDropdown,
.mx_AuthBody_language,
[class*='LanguageSelector'],
[class*='LanguageDropdown'] {
    display: none !important;
}

/* === Server name → .mini === */
.mx_ServerPicker_server {
    font-size: 0 !important;
    line-height: 0 !important;
}
.mx_ServerPicker_server::after {
    content: '.mini';
    font-size: 14px;
    line-height: normal;
    color: rgba(255,255,255,0.6);
}

/* === Welcome title override === */
.mx_Header_title {
    font-size: 0 !important;
    line-height: 0 !important;
}
.mx_Header_title::after {
    content: '';
    font-size: 0;
}

/* === Input fields — subtle style === */
.mx_AuthPage input[type='text'],
.mx_AuthPage input[type='password'],
.mx_AuthPage input[type='email'],
.mx_AuthPage .mx_Field input,
.mx_AuthPage .mx_Field select {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
}
.mx_AuthPage .mx_Field label {
    color: rgba(255,255,255,0.4) !important;
}
.mx_AuthPage .mx_Field input:focus + label,
.mx_AuthPage .mx_Field input:not(:placeholder-shown) + label,
.mx_AuthPage .mx_Field select + label {
    background: transparent !important;
}
.mx_AuthPage input::placeholder {
    color: rgba(255,255,255,0.3) !important;
}
.mx_AuthPage input:focus {
    border-color: rgba(91,125,177,0.5) !important;
    box-shadow: 0 0 0 3px rgba(91,125,177,0.15) !important;
}

/* === Primary buttons === */
.mx_AuthPage .mx_Login_submit,
.mx_AuthPage .mx_AccessibleButton_kind_primary {
    background: linear-gradient(135deg, #5b7db1 0%, #4a6a9e 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 16px rgba(91,125,177,0.3) !important;
    transition: all 0.2s ease !important;
}
.mx_AuthPage .mx_Login_submit:hover,
.mx_AuthPage .mx_AccessibleButton_kind_primary:hover {
    box-shadow: 0 6px 24px rgba(91,125,177,0.4) !important;
    transform: translateY(-1px) !important;
}

/* === Links on auth pages === */
.mx_AuthPage a {
    color: rgba(180,200,255,0.8) !important;
}
.mx_AuthPage a:hover {
    color: rgba(200,220,255,1) !important;
}

/* === Hide guest error === */
.mx_AuthPage_error {
    display: none !important;
}

/* === Hide broken image === */
.mx_Welcome img[src*='logoUrl'] {
    display: none !important;
}
