/* === SAYARIX DARK BLUE ANIME THEME === */

/* Global background */
.mx_MatrixChat {
    background: linear-gradient(135deg, #070b14 0%, #0d1224 40%, #111d3a 100%) !important;
}

/* Auth page (login/register) */
.mx_AuthPage {
    background: linear-gradient(135deg, #070b14 0%, #0f1a33 50%, #1a1040 100%) !important;
}

.mx_AuthPage::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(108, 99, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(99, 179, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(167, 99, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.mx_AuthPage_modal {
    background: rgba(10, 14, 26, 0.85) !important;
    border: 1px solid rgba(108, 99, 255, 0.15) !important;
    backdrop-filter: blur(20px) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 60px rgba(108, 99, 255, 0.05) !important;
}

/* Sidebar */
.mx_LeftPanel {
    background: linear-gradient(180deg, #0a0e1a 0%, #0d1226 100%) !important;
}

/* Room list hover */
.mx_RoomTile:hover {
    background: rgba(108, 99, 255, 0.08) !important;
    border-radius: 10px !important;
}

/* Active room */
.mx_RoomTile.mx_RoomTile_selected,
.mx_RoomTile[aria-selected="true"] {
    background: rgba(108, 99, 255, 0.15) !important;
    border-radius: 10px !important;
}

/* Timeline / message area */
.mx_RoomView {
    background: linear-gradient(180deg, #111827 0%, #0f1526 100%) !important;
}

/* Message bubbles */
.mx_EventTile {
    border-radius: 12px !important;
}

.mx_EventTile:hover {
    background: rgba(108, 99, 255, 0.04) !important;
    border-radius: 12px !important;
}

/* Own messages */
.mx_EventTile[data-self="true"] .mx_EventTile_line {
    background: rgba(108, 99, 255, 0.08) !important;
    border-radius: 12px !important;
}

/* Message input */
.mx_MessageComposer {
    background: rgba(10, 14, 26, 0.6) !important;
    border-top: 1px solid rgba(108, 99, 255, 0.1) !important;
}

.mx_BasicMessageComposer_input {
    color: #e2e8f0 !important;
}

/* Buttons - accent glow */
.mx_AccessibleButton_kind_primary {
    background: linear-gradient(135deg, #6C63FF 0%, #7B6CFF 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3) !important;
    transition: all 0.3s ease !important;
}

.mx_AccessibleButton_kind_primary:hover {
    box-shadow: 0 6px 25px rgba(108, 99, 255, 0.5) !important;
    transform: translateY(-1px) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(108, 99, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 99, 255, 0.5);
}

/* Room header */
.mx_RoomHeader {
    background: rgba(10, 14, 26, 0.5) !important;
    border-bottom: 1px solid rgba(108, 99, 255, 0.08) !important;
    backdrop-filter: blur(10px) !important;
}

/* User info panel */
.mx_RightPanel {
    background: linear-gradient(180deg, #0d1226 0%, #0a0e1a 100%) !important;
}

/* Dialog/Modal */
.mx_Dialog {
    background: rgba(13, 18, 38, 0.95) !important;
    border: 1px solid rgba(108, 99, 255, 0.12) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

/* Notification badge */
.mx_NotificationBadge {
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E) !important;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4) !important;
}

/* Search bar */
.mx_SearchBar,
.mx_RoomSearch {
    background: rgba(15, 21, 38, 0.8) !important;
    border: 1px solid rgba(108, 99, 255, 0.1) !important;
    border-radius: 10px !important;
}

/* Subtle glow on links */
a {
    color: #8B9FFF !important;
    transition: color 0.2s ease !important;
}

a:hover {
    color: #A8B4FF !important;
    text-shadow: 0 0 8px rgba(108, 99, 255, 0.3) !important;
}

/* Floating particles effect on auth page via pseudo-element */
.mx_AuthPage::after {
    content: "";
    position: fixed;
    width: 300px;
    height: 300px;
    top: -50px;
    right: -50px;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-30px, 30px) scale(1.1); }
    50% { transform: translate(-20px, -20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.05); }
}

/* Space panel */
.mx_SpacePanel {
    background: #080c17 !important;
}

/* Tooltips */
.mx_Tooltip {
    background: rgba(13, 18, 38, 0.95) !important;
    border: 1px solid rgba(108, 99, 255, 0.15) !important;
    border-radius: 8px !important;
    color: #c8cfdd !important;
}

/* Code blocks in messages */
.mx_EventTile pre,
.mx_EventTile code {
    background: rgba(6, 10, 20, 0.8) !important;
    border: 1px solid rgba(108, 99, 255, 0.1) !important;
    border-radius: 8px !important;
}
