/* SEVEN AI - Core Viewport Mechanics */
html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    height: 100dvh;
    background-color: #000000;
    color: #f1f5f9;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow: hidden;
}

#app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: relative;
}

#main-sidebar {
    width: 280px;
    height: 100%;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #000000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#chat-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #000000;
    position: relative;
}

#chat-messages-viewport {
    flex-grow: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Premium Instagram/WhatsApp style lifted bottom tray layout */
#input-container-box {
    width: 100%;
    background: #000000;
    padding: 0.75rem 1rem 1.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    box-sizing: border-box;
}

.custom-scroll::-webkit-scrollbar {
    width: 4px;
}
.custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(157, 78, 221, 0.3);
    border-radius: 10px;
}

.fused-text {
    background: linear-gradient(90deg, #00F0FF, #9D4EDD);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

/* Splash Screen Layout System */
#app-splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #000000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fadeIn { animation: fadeIn 0.25s ease-out forwards; }

/* Mobile Layout Overrides */
@media (max-width: 768px) {
    #main-sidebar {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 100;
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.75);
    }
    #main-sidebar.open {
        transform: translateX(0);
    }
    #input-container-box {
        padding-bottom: 1.5rem; /* Structural clearance safety spacing for mobile keyboards */
    }
}