
* {
    box-sizing: border-box;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #000;
    color: #ededed;
    font-family: 'Inter', sans-serif;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: #0f0f0f;
    color: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 60px;
    background: transparent;
}

.header-chat-wrapper {
    padding-inline: 10px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    margin-top: 10px;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 16px;
}

.sidebar.collapsed .sidebar-header {
    padding-inline: 0;
}

.logo {
    font-size: 22px;
}

.logo img {
    width: 25px;
}

.sidebar.collapsed .logo img {
    display: none;
}

.toggle-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    border-radius: 5px;
}

.toggle-btn:hover {
    background: #373737;
}

.toggle-btn i {
    padding: 0;
}

.new-chat {
    background: transparent;
    border: none;
    width: 100%;
    padding-inline: 10px;
    border-radius: 5px;
    margin-bottom: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.sidebar.collapsed .new-chat {
    width: 30px;
}

.new-chat:hover {
    background: #373737;
}

.new-chat i {
    line-height: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
}

.sidebar.collapsed .new-chat {
    padding: 5px;
    justify-content: center;
    align-items: center;
}


.sidebar.collapsed .new-chat i {
    font-size: 20px;
}

.chat-text, .chat-history ul {
    color: #fff;
    font-size: 14px;
    border-radius: 8px;
    opacity: 1;
    max-width: 200px;
    transition: opacity 1s ease-in-out, max-width 1s ease-in-out, padding 1s ease-in-out !important;
    white-space: nowrap;
    overflow: hidden;
}

.chat-text {
    padding: 6px 8px;
}

.chat-history ul {
    padding: 0 !important;
}

.sidebar.collapsed .chat-text {
    opacity: 0;
    max-width: 0;
    padding: 0;
}

.chat-icon {
    font-size: 24px;
    color: #fff;
    padding: 0;
}

.chat-icon i {
    font-size: 20px;
    line-height: 1;
}

.sidebar.collapsed .chat-text {
    display: none;
}

.sidebar.collapsed .chat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
}

.sidebar.collapsed .chat-history {
    display: none;
}

.history-title {
    padding-left: 10px;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 8px;
}

.chat-history ul {
    list-style: none;
}

.chat-history li {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    /* text-overflow: ellipsis; */
}

.chat-history li:hover {
    background: #373737;
}

.navbar {
    flex-wrap: nowrap;
    width: 100%;
}

.navbar-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-left {
    display: flex;
    align-items: center;
    white-space: nowrap;
    height: 36px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-self: end;
    min-width: 0;
}

.logo-text {
    font-weight: 600;
    font-size: 24px;
    display: inline-block;
    background:
        radial-gradient(circle at 25% 30%, #8fd3ff 0%, transparent 50%),
        radial-gradient(circle at 75% 70%, #ff9bd6 0%, transparent 50%),
        linear-gradient(120deg, #6c63ff, #4a3fcf 60%, #2a2f7a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 18px rgba(108, 99, 255, 0.35);
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.hero-video {
    width: 230px;
    height: 230px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 16px;
    opacity: 1;
    display: block;
    pointer-events: none;
}

.hero-video video {
    pointer-events: auto;
}

.join-btn {
    position: relative;
    padding: 8px 18px;
    width: 100px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #2a2a2a;
    background: transparent;
    color: #e5e5e5;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.2s ease;
}

.join-btn:hover {
    background: #373737;
}

.join-btn .text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.join-btn .default {
    opacity: 1;
    transform: translateY(0);
}

.join-btn .hover {
    opacity: 0;
    transform: translateY(100%);
}

.join-container:hover .join-btn .default {
    opacity: 0;
    transform: translateY(-100%);
}

.join-container:hover .join-btn .hover {
    opacity: 1;
    transform: translateY(0);
}

.join-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min-content;
    flex-shrink: 0;
}

.login-btn {
    height: 36px;
    padding: 0 14px;
    width: 100px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: #d6d6d6;
    font-size: 13px;
    cursor: pointer;
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}

.join-container:hover .login-btn {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.login-btn:hover {
    background: #373737;
}


.main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 24px;
    text-align: center;
}

.app {
    margin-left: 260px;
    width: calc(100% - 72px);
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .app {
    margin-left: 60px;
}

.navbar {
    left: 260px;
    width: calc(100% - 260px);
    transition: left 0.3s ease, width 0.3s ease;
}

.sidebar.collapsed ~ .app .navbar {
    left: 72px;
    width: calc(100% - 72px);
}

.main-content {
    min-height: calc(100vh - 80px);
    padding-top: 80px;
    /* padding-bottom: -500px !important; */
}

h1 {
    font-weight: 500;
    font-size: 38px;
    margin-bottom: 48px;
}

.input-shell {
    position: relative;
    width: 700px;
    max-width: 100%;
    min-height: 62px;
    background: #373737;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    transition: height 0.2s ease, border-radius 0.2s ease, padding 0.2s ease;
}

.input-shell.has-multiline {
    height: auto;
    border-radius: 30px;
    padding: 14px 16px;
}

.input-shell.has-file {
    height: auto;
    min-height: 132px;
    border-radius: 30px;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px 10px;
}

.composer-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 42px;
}

.input-shell.has-multiline .composer-row {
    align-items: flex-end;
}

.upload-control {
    position: relative;
    flex: 0 0 auto;
}

.input-shell .message-input {
    flex: 1;
    min-width: 80px;
    min-height: 24px;
    max-height: 150px;
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    background-color: transparent !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    color: #ededed;
    display: block;
    font-size: 16px;
    line-height: 1.45;
    outline: none;
    overflow-y: hidden;
    padding: 0;
    resize: none;
}

.input-shell .message-input:focus {
    background: transparent !important;
    background-color: transparent !important;
    border: none;
    box-shadow: none;
    color: #ededed;
    outline: none;
}

.input-shell .message-input::placeholder {
    color: #9a9a9a;
}

.input-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #bdbdbd;
    border: none;
    display: flex;
    background: transparent;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
    transform: rotate(0deg);
}

.input-icon i {
    font-size: 30px;
    line-height: 1;

}

.input-icon:hover {
    background: #2a2a2a;
}

.input-icon.active {
    transform: rotate(45deg);
    background: #2a2a2a;
}

.input-icon.active:hover {
    transform: rotate(45deg);
}

.upload-dropup {
    position: absolute;
    left: -8px;
    bottom: calc(100% + 16px);
    min-width: 180px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    background: #1f1f1f;
    box-shadow: 0 18px 44px rgba(0,0,0,0.42);
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

.upload-dropup.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.upload-dropup::after {
    content: "";
    position: absolute;
    left: 18px;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: #1f1f1f;
    border-right: 1px solid rgba(255,255,255,0.12);
    border-bottom: 1px solid rgba(255,255,255,0.12);
    transform: rotate(45deg);
}

.upload-option {
    width: 100%;
    min-height: 40px;
    padding: 0 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #ededed;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.upload-option:hover {
    background: rgba(255,255,255,0.08);
}

.upload-option i {
    color: #8fd3ff;
    font-size: 18px;
}

.file-input {
    position: fixed;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    inset: auto auto 0 0;
}

.file-preview-list {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 8px 2px 10px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.file-preview-list::-webkit-scrollbar {
    display: none;
}

.file-preview-list[hidden] {
    display: none;
}

.file-preview {
    width: 240px;
    min-height: 58px;
    padding: 8px 30px 8px 10px;
    border-radius: 12px;
    background: #242424;
    border: 1px solid rgba(255,255,255,0.13);
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    min-width: 0;
    position: relative;
    scroll-snap-align: start;
}

.file-preview[hidden] {
    display: none;
}

.file-progress {
    --progress: 0%;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f3f6fb;
    border: 1px solid rgba(255,255,255,0.18);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 -10px 18px rgba(15,23,42,0.1);
}

.file-progress::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: conic-gradient(#8fd3ff var(--progress), rgba(255,255,255,0.22) 0);
    opacity: 0;
    transition: opacity 0.18s ease, background 0.18s ease;
    z-index: 2;
}

.file-progress::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.48);
    backdrop-filter: blur(1px);
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 1;
}

.file-type-icon {
    position: relative;
    color: #172033;
    font-size: 18px;
    line-height: 1;
    z-index: 3;
}

.file-preview.uploading .file-progress::before,
.file-preview.failed .file-progress::before,
.file-preview.uploading .file-progress::after,
.file-preview.failed .file-progress::after {
    opacity: 1;
}

.file-preview.uploading .file-type-icon,
.file-preview.failed .file-type-icon {
    color: #ffffff;
}

.file-preview.uploaded .file-progress {
    background: #f3f6fb;
}

.file-preview.uploaded .file-progress::before {
    display: none;
}

.file-preview.uploaded .file-progress::after {
    display: none;
}

.file-preview.failed .file-progress {
    background: #f87171;
}

.file-preview.failed .file-progress::before {
    background: conic-gradient(#fca5a5 var(--progress), rgba(255,255,255,0.22) 0);
}

.file-preview.failed .file-progress::after {
    background: #f87171;
}

.file-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    gap: 4px;
}

.file-name-row {
    width: 100%;
    max-width: 170px;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.file-name {
    flex: 1 1 auto;
    min-width: 0;
    color: #f4f4f4;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-inline-type {
    flex: 0 0 auto;
    margin-left: auto;
    max-width: 42px;
    padding: 2px 5px;
    border-radius: 5px;
    background: rgba(143,211,255,0.15);
    color: #9fdcff;
    border: 1px solid rgba(143,211,255,0.3);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
}

.file-status {
    color: #cfcfcf;
    font-size: 12px;
}

.remove-file-btn {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 19px;
    height: 19px;
    border: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f2f2f2;
    color: #111;
    font-size: 8px;
    font-weight: 400 !important;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.28);
}

.remove-file-btn:hover {
    background: #ffffff;
}

.drop-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,0.72);
    border: 2px dashed rgba(143, 211, 255, 0.78);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 20000;
}

.drop-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.drop-overlay-content {
    width: min(460px, calc(100vw - 48px));
    padding: 28px;
    text-align: center;
}

.drop-overlay-content i {
    display: block;
    margin-bottom: 14px;
    font-size: 58px;
    color: #f2f2f2 !important;
}

.drop-overlay-content p {
    margin: 0;
    color: #f2f2f2;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
}

.replace-file-modal {
    position: fixed;
    inset: 0;
    z-index: 21000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0,0,0,0.62);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.replace-file-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.replace-file-dialog {
    width: min(380px, calc(100vw - 40px));
    padding: 20px;
    border-radius: 16px;
    background: #202020;
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 22px 60px rgba(0,0,0,0.48);
    color: #ededed;
    text-align: left;
}

/* make this icon and the warning text in a side by side */
.replace-file-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(143,211,255,0.14);
    color: #8fd3ff;
    font-size: 20px;
}

.replace-file-copy h2 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
}

.replace-file-copy p {
    margin: 0;
    color: #cfcfcf;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.replace-file-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.replace-file-actions button {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    color: #ededed;
    font-size: 14px;
    font-weight: 600;
}

.replace-cancel-btn {
    background: transparent;
}

.replace-cancel-btn:hover {
    background: rgba(255,255,255,0.08);
}

.replace-confirm-btn {
    background: #f2f2f2;
    color: #101010 !important;
    border: 1px solid rgba(255,255,255,0.12);
}

.replace-confirm-btn:hover {
    background: #f2f2f2;
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    font-size: 16px;
    font-weight: bolder;
    color: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    transition: color 0.2s ease;
}

.send-btn i {
    font-size: 36px;
    color: #f7f7f7;
    font-weight: 800 !important;
    filter: none;
    line-height: 1;
    background-color: black;
    border-radius: 50%;
}

.send-btn:hover {
    background: transparent;
    box-shadow: none;
    color: #ffffff;
    transform: none;
}

.send-btn:hover i {
    color: #ffffff;
}

.send-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    box-shadow: none;
    filter: grayscale(0.45);
}

.send-btn:disabled:hover {
    transform: none;
}

.actions {
    margin-top: 30px;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.actions button {
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: #d6d6d6;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.actions button:hover {
    background: rgba(255,255,255,0.05);
}

@media (max-width: 520px) {   
    body {
        overflow-y: hidden;
    }    
       
    .app {
        margin-left: 260px;
        width: 100%;
        height: 100dvh !important;
    }

    .main-content {
        padding-top: 20px;
    }
    
    .logo-text {
        white-space: nowrap;
        line-height: 1;
        font-size: 20px;
        margin: 0;
    }

    .sidebar.collapsed .new-chat {
        display: none;
    }

    .sidebar {
        background-color: transparent;
        padding-top: 0;
        z-index: 10000;
    }

    /* .sidebar { */
        /* transform: translateX(-100%); */
        /* transition: transform 0.3s ease; */
    /* } */

    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }

    .sidebar-header {
        display: flex;
        height: 68px;
        align-items: center;
        padding-block: 0;
        margin-top: 0;
        margin-left: -10px;
    }
        
    .toggle-btn {
        font-size: 20px;
    }

    .sidebar.collapsed .sidebar-header {
        justify-content: flex-start;
    }

    .app {
        margin-left: 0 !important;
    }

    .navbar {
        left: 0 !important;
        width: 100% !important;
    }

    .navbar-grid {
        gap: 10px;
    }

    .nav-left {
        flex: 1;
        min-width: min-content;
        margin-left: 10px;
    }

    .nav-right {
        margin-right: 200px;
    }

    .join-container {
        display: flex;
        gap: 4px;
        max-width: 150px;
        left: 0;
    }

    .login-btn,
    .join-btn {
        width: 90px;
        padding: 2px 4px;
        font-size: 11px;
        white-space: nowrap;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .app.blur {
        filter: blur(6px);
        pointer-events: none;
        user-select: none;
        transition: filter 0.3s ease;
    }
    
    .actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        align-items: center;
        max-width: 90vw;
        box-sizing: border-box;
        padding: 0 5px;
        gap: 10px !important;
        margin-top: 20px;
        margin: 0 auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .actions::-webkit-scrollbar {
        display: none;
    }

    .actions button {
        flex: 0 0 auto;
        min-width: max-content;
        height: 40px;
        padding: 0 18px;
        white-space: nowrap;
    }

    .input-suggestions {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }    

    h1 {
        font-size: 24px;
        margin-bottom: 28px;
    }

    .hero-video {
        width: 250px;
        height: 250px;
    }

    .input-shell {
        min-height: 54px;
        gap: 8px;
        padding: 0 12px;
    }

    .input-shell.has-multiline {
        height: auto;
        padding: 10px 12px;
    }

    .input-shell.has-file {
        height: auto;
        min-height: 124px;
        padding: 10px 12px 8px;
    }

    .message-input {
        min-width: 0;
        min-height: 24px;
        max-height: 120px;
    }

    .send-btn {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .input-icon {
        width: 26px;
        height: 26px;
    }

    .upload-dropup {
        left: -6px;
        min-width: 168px;
    }

    .file-preview {
        width: 220px;
        min-height: 56px;
        padding: 8px 28px 8px 9px;
    }

    .file-progress {
        width: 36px;
        height: 36px;
    }

    .file-name {
        font-size: 12px;
    }

    .file-status {
        font-size: 12px;
    }

    .drop-overlay-content p {
        font-size: 16px;
    }

    .send-btn {
        flex: 0 0 auto;
    }
}
