/* Pro Matrix Code Custom Theme */
body {
    background: #0a0e27 !important;
    position: relative;
}

body::before {
    content: 'Pro Matrix Code';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    font-weight: 300;
    color: #1a1f3a;
    letter-spacing: 8px;
    z-index: 0;
    white-space: nowrap;
    pointer-events: none;
}

/* Force hide left sidebar */
.mx_AuthPage_modal > div:first-child {
    display: none !important;
}

/* Hide language selector and footer */
.mx_LanguageDropdown,
.mx_AuthFooter,
footer {
    display: none !important;
}

/* Hide logos */
.mx_Icon,
img[src*="logo"],
.mx_AuthPage_logo {
    display: none !important;
}

/* Center modal */
.mx_AuthPage {
    background: #0a0e27 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Main panel - DARK background */
.mx_AuthPage_modal {
    background: rgba(15, 20, 40, 0.95) !important;
    border: 1px solid #1a2847 !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8) !important;
    max-width: 500px !important;
    width: 100% !important;
    padding: 40px !important;
    z-index: 2 !important;
    margin: 0 !important;
}

.mx_AuthBody,
.mx_AuthBody_content,
.mx_Login {
    background: transparent !important;
    width: 100% !important;
}

/* Remove gray background overlays */
.mx_AuthPage_modalBlur,
.mx_AuthBody::before {
    display: none !important;
}

/* Header */
.mx_AuthHeader {
    text-align: center !important;
    margin-bottom: 30px !important;
}

.mx_AuthHeader h1,
.mx_AuthHeader_title,
.mx_Login h1 {
    font-size: 32px !important;
    font-weight: 300 !important;
    letter-spacing: 6px !important;
    color: #e2e8f0 !important;
    margin-bottom: 10px !important;
}

/* Homeserver label and domain */
.mx_ServerPicker,
.mx_ServerPicker_server,
.mx_ServerPicker_serverName {
    color: #94a3b8 !important;
    font-size: 13px !important;
    letter-spacing: 2px !important;
    margin-bottom: 20px !important;
}

/* Domain text specifically */
.mx_ServerPicker_server,
.mx_ServerPicker_address {
    color: #64748b !important;
    font-size: 12px !important;
}

/* Field rows spacing */
.mx_AuthBody_fieldRow,
.mx_Field,
.mx_Login_field {
    margin-bottom: 20px !important;
}

/* Labels */
.mx_AuthBody .mx_Field label,
.mx_Field label,
.mx_Field_labelAlwaysTopLeft {
    color: #e2e8f0 !important;
    margin-bottom: 8px !important;
    display: block !important;
    font-weight: 600 !important;
}

/* Input fields */
.mx_Field input,
.mx_Field select,
.mx_Field textarea {
    background: #1e293b !important;
    border: 2px solid #334155 !important;
    color: #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    width: 100% !important;
    font-size: 14px !important;
}

.mx_Field input:focus,
.mx_Field select:focus,
.mx_Field textarea:focus {
    border-color: #3b82f6 !important;
    background: #1e293b !important;
    outline: none !important;
}

.mx_Field input::placeholder {
    color: #64748b !important;
}

/* Tabs spacing */
.mx_AuthBody_tabs,
.mx_AuthBody_tabButtons {
    margin-bottom: 20px !important;
}

/* Tabs (Username/Phone) */
.mx_AuthBody_tabButton,
.mx_AuthBody_tabs button {
    background: #1e293b !important;
    border: 2px solid #334155 !important;
    color: #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    margin-right: 10px !important;
}

.mx_AuthBody_tabButton_active,
.mx_AuthBody_tabs button[aria-selected="true"] {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
    background: #1e293b !important;
}

/* Sign in button */
.mx_AccessibleButton_kind_primary,
button.mx_Login_submit {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 14px !important;
    color: white !important;
    border: none !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: transform 0.2s !important;
    margin-top: 10px !important;
}

.mx_AccessibleButton_kind_primary:hover,
button.mx_Login_submit:hover {
    transform: translateY(-2px) !important;
}

/* Links */
.mx_AuthBody a,
.mx_Login_links a {
    color: #3b82f6 !important;
    text-decoration: none !important;
}

.mx_AuthBody a:hover,
.mx_Login_links a:hover {
    text-decoration: underline !important;
}

/* Additional text - all gray text */
.mx_Login_subtext,
.mx_AuthBody_fieldRow label,
.mx_ServerPicker_label,
p {
    color: #94a3b8 !important;
}

/* Forgot password link */
.mx_AuthBody_forgot-password {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    text-align: center !important;
    color: #64748b !important;
}

/* Info icons */
.mx_InfoTooltip,
.mx_Field_tooltip {
    color: #64748b !important;
}

/* Edit button */
.mx_ServerPicker button,
.mx_ServerPicker_change {
    color: #3b82f6 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
}

/* Sign in with text */
.mx_Login_type_label {
    color: #94a3b8 !important;
    font-size: 13px !important;
}

/* New here / Create account */
.mx_AuthBody_create {
    color: #94a3b8 !important;
    text-align: center !important;
    margin-top: 15px !important;
}

.mx_AuthBody_create a {
    color: #3b82f6 !important;
}
