/* ==========================================
   DIVI AI — COMPLETE SKY BLUE DESIGN
   Homepage + Separate Pages + Chat
========================================== */

:root {
    --sky: #38bdf8;
    --sky-dark: #0284c7;
    --sky-deep: #075985;
    --sky-light: #e0f2fe;
    --background: #f0f9ff;
    --surface: #ffffff;
    --surface-soft: #eaf6ff;
    --text: #163047;
    --text-soft: #58738a;
    --border: #cfe8f8;
    --danger: #dc2626;
    --shadow: 0 8px 30px rgba(14, 116, 144, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    width: 100%;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--sky-dark);
    outline-offset: 3px;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* IMPORTANT:
   Never allow another CSS rule to override hidden.
*/

[hidden] {
    display: none !important;
}

#aiAppScreen:not([hidden]) {
    display: flex;
}
/* ==========================================
   HOMEPAGE CONTAINER
========================================== */

body:not(.chat-app) {
    overflow-x: hidden;
    overflow-y: auto;
    background: #f5faff;
}

.home-page {
    min-height: 100vh;
    overflow: clip;
    background:
        radial-gradient(
            ellipse at 80% 10%,
            rgba(125, 211, 252, 0.24),
            transparent 34%
        ),
        radial-gradient(
            ellipse at 5% 40%,
            rgba(186, 230, 253, 0.25),
            transparent 32%
        ),
        #f7fbff;
}

.home-page button,
.home-page a {
    -webkit-tap-highlight-color: transparent;
}

.home-page button {
    font-family: inherit;
}

/* ==========================================
   HOMEPAGE NAVIGATION
========================================== */

.home-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    min-height: 82px;
    padding: 15px 6%;
    border-bottom: 1px solid rgba(186, 230, 253, 0.75);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
}

.home-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
    color: var(--sky-deep);
    text-decoration: none;
}

.home-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #38bdf8, #0369a1);
    color: white;
    font-size: 25px;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.2);
}

.home-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.home-logo strong {
    display: block;
    font-size: 18px;
    letter-spacing: 1.3px;
}

.home-logo span {
    display: block;
    margin-top: 4px;
    color: #6b879d;
    font-size: 10px;
}

/* Navigation tabs */

.home-nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.home-nav-links .nav-tab {
    padding: 11px 15px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #526e84;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.home-nav-links .nav-tab:hover,
.home-nav-links .nav-tab.active {
    background: #e0f2fe;
    color: var(--sky-dark);
}

.home-nav-links .nav-tab.active {
    font-weight: 800;
}

/* Shared primary buttons */

.open-ai-button,
.hero-primary-button,
.about-button,
.contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 21px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: white;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 7px 18px rgba(2, 132, 199, 0.17);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.open-ai-button {
    flex-shrink: 0;
}

.open-ai-button:hover,
.hero-primary-button:hover,
.about-button:hover,
.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.24);
}

/* ==========================================
   SEPARATE WEBSITE VIEWS
========================================== */

/*
   The JavaScript switches the hidden attribute.
   Each view takes the place of the previous view.
*/

.home-page .site-view {
    display: none;
    min-height: 72vh;
    animation: pageFadeIn 0.25s ease;
}

.home-page .site-view:not([hidden]) {
    display: flex;
    flex-direction: column;
}

.home-page #homeHero:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
}

.home-page #homeFeatures:not([hidden]) {
    display: block;
}

.home-page #homeAbout:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
}

.home-page #homeContact:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   HOME HERO
========================================== */

.hero-section {
    gap: 45px;
    width: 100%;
    max-width: 1300px;
    min-height: 610px;
    margin: auto;
    padding: 75px 7% 85px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--sky-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero-badge {
    padding: 10px 13px;
    border: 1px solid #c7eaff;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.8);
}

.hero-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0ea5e9;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

.hero-content h1 {
    margin-top: 28px;
    color: #12354f;
    font-size: clamp(42px, 5.3vw, 70px);
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 1.08;
}

.hero-content h1 span,
.section-heading h2 span,
.about-content h2 span,
.contact-card h2 span {
    color: var(--sky-dark);
}

.hero-description {
    max-width: 490px;
    margin-top: 24px;
    color: #617d92;
    font-size: 15px;
    line-height: 1.95;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 31px;
}

.hero-primary-button {
    min-height: 51px;
    padding: 0 24px;
    border-radius: 13px;
    font-size: 14px;
}

.hero-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 49px;
    padding: 0 20px;
    border: 1px solid #c9e5f5;
    border-radius: 13px;
    background: white;
    color: #24546f;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s ease;
}

.hero-secondary-button:hover {
    background: #eaf7ff;
}

.hero-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    color: #7a95a9;
    font-size: 11px;
}

.hero-note span {
    color: var(--sky-dark);
    font-size: 17px;
}

/* ==========================================
   HERO AI CARD
========================================== */

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 430px;
}

.ai-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.2);
    filter: blur(65px);
}

.orbit {
    position: absolute;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 50%;
}

.orbit-two {
    width: 430px;
    height: 430px;
    border-color: rgba(125, 211, 252, 0.18);
}

.hero-ai-card {
    position: relative;
    z-index: 2;
    width: min(100%, 390px);
    padding: 23px;
    border: 1px solid #bfe2f6;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 30px 80px rgba(14, 116, 144, 0.13);
    backdrop-filter: blur(15px);
    transform: rotate(-2deg);
}

.hero-ai-card-top {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-bottom: 19px;
    border-bottom: 1px solid #e6f3fa;
}

.mini-logo,
.response-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: white;
    font-size: 20px;
    font-weight: 800;
}

.hero-ai-card-top strong,
.hero-ai-card-top div:nth-child(2) span {
    display: block;
}

.hero-ai-card-top strong {
    color: #164663;
    font-size: 13px;
}

.hero-ai-card-top div:nth-child(2) span {
    margin-top: 4px;
    color: #829caf;
    font-size: 10px;
}

.hero-online-dot {
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-radius: 50%;
    background: #22c55e;
}

.hero-message {
    margin-top: 20px;
    padding: 13px 15px;
    border-radius: 13px;
    font-size: 12px;
    line-height: 1.8;
}

.hero-user-message {
    margin-left: 35px;
    background: #e7f6ff;
    color: #285b77;
}

.hero-response-message {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    background: #f7fbff;
    color: #45667b;
}

.response-icon {
    width: 29px;
    height: 29px;
    border-radius: 9px;
    font-size: 15px;
}

.hero-response-message p {
    flex: 1;
}

.hero-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 19px;
    padding: 12px;
    border: 1px solid #dceef8;
    border-radius: 12px;
    color: #8aa2b4;
    font-size: 11px;
}

.demo-send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    border-radius: 8px;
    background: var(--sky-dark);
    color: white;
    font-size: 15px;
}

.floating-card {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 17px;
    border: 1px solid #bfe2f6;
    border-radius: 15px;
    background: white;
    box-shadow: 0 12px 35px rgba(14, 116, 144, 0.12);
    animation: homeFloat 4s ease-in-out infinite;
}

.floating-card-top {
    top: 37px;
    right: -12px;
}

.floating-card-bottom {
    bottom: 29px;
    left: -15px;
    animation-delay: -2s;
}

.floating-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 11px;
    background: #e2f5ff;
    color: var(--sky-dark);
    font-size: 19px;
}

.floating-card strong,
.floating-card small {
    display: block;
}

.floating-card strong {
    color: #1e4a64;
    font-size: 11px;
}

.floating-card small {
    margin-top: 4px;
    color: #819bad;
    font-size: 10px;
}

@keyframes homeFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* ==========================================
   INTRODUCTION STRIP
========================================== */

.intro-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 27px;
    padding: 23px 7%;
    border-top: 1px solid #e0f0fa;
    border-bottom: 1px solid #e0f0fa;
    background: rgba(232, 246, 255, 0.7);
}

.intro-strip > p {
    color: #7894a8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.intro-items {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
}

.intro-items span {
    color: #386780;
    font-size: 12px;
    font-weight: 700;
}

/* ==========================================
   FEATURES PAGE
========================================== */

.home-features-section {
    padding: 85px 7%;
}

.section-heading {
    max-width: 660px;
    margin: 0 auto 48px;
    text-align: center;
}

.section-heading h2,
.about-content h2,
.contact-card h2 {
    margin-top: 17px;
    color: #153a54;
    font-size: clamp(31px, 4vw, 45px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.2;
}

.section-heading > p {
    max-width: 560px;
    margin: 18px auto 0;
    color: #6a8498;
    font-size: 14px;
    line-height: 1.9;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
    margin: auto;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 250px;
    padding: 27px;
    border: 1px solid #d9edf9;
    border-radius: 19px;
    background: white;
    box-shadow: 0 7px 25px rgba(14, 116, 144, 0.035);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(14, 116, 144, 0.09);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    border-radius: 15px;
    font-size: 23px;
}

.feature-blue {
    background: #e0f2fe;
    color: #0284c7;
}

.feature-purple {
    background: #ede9fe;
    color: #7c3aed;
}

.feature-cyan {
    background: #cffafe;
    color: #0891b2;
}

.feature-pink {
    background: #fce7f3;
    color: #db2777;
}

.feature-card h3 {
    color: #20465f;
    font-size: 15px;
    line-height: 1.5;
}

.feature-card p {
    flex: 1;
    margin-top: 11px;
    color: #71899b;
    font-size: 12px;
    line-height: 1.9;
}

.feature-card button {
    margin-top: 20px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--sky-dark);
    font-size: 12px;
    font-weight: 800;
}

.feature-card button span {
    margin-left: 5px;
}

.view-action {
    display: flex;
    justify-content: center;
    margin-top: 38px;
}

/* ==========================================
   ABOUT PAGE
========================================== */

.home-about-section {
    gap: 65px;
    padding: 85px 9%;
    border-top: 1px solid #e6f3fb;
    border-bottom: 1px solid #e6f3fb;
    background: linear-gradient(120deg, #eaf7ff, #f8fcff 65%);
}

.about-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 350px;
}

.about-orb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 250px;
    height: 250px;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #fff, #c5eaff 65%, #83d3fb);
    box-shadow: 0 25px 75px rgba(2, 132, 199, 0.14);
}

.about-orb-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 125px;
    height: 125px;
    border-radius: 35px;
    background: linear-gradient(135deg, #38bdf8, #0369a1);
    box-shadow: 0 15px 35px rgba(2, 132, 199, 0.25);
    color: white;
    font-size: 75px;
    font-weight: 800;
    transform: rotate(-8deg);
}

.about-small-card {
    position: absolute;
    padding: 13px 17px;
    border: 1px solid #d3eaf8;
    border-radius: 13px;
    background: white;
    box-shadow: 0 10px 30px rgba(14, 116, 144, 0.08);
    color: #355d76;
    font-size: 12px;
    font-weight: 700;
}

.about-small-card span {
    margin-right: 7px;
    color: var(--sky-dark);
}

.about-small-one {
    top: 38px;
    right: 0;
}

.about-small-two {
    bottom: 39px;
    left: 0;
}

.about-content > p {
    margin-top: 20px;
    color: #637f93;
    font-size: 14px;
    line-height: 2;
}

.about-button {
    margin-top: 27px;
}

/* ==========================================
   CONTACT PAGE
========================================== */

.home-contact-section {
    padding: 80px 7%;
}

.contact-card {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: auto;
    padding: 75px 25px;
    overflow: hidden;
    border: 1px solid #bce5fb;
    border-radius: 28px;
    background:
        radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.7), transparent 27%),
        linear-gradient(125deg, #dff4ff, #edf8ff 60%, #d4efff);
    text-align: center;
}

.contact-decoration {
    position: absolute;
    top: 15px;
    right: 8%;
    color: rgba(2, 132, 199, 0.13);
    font-size: 120px;
}

.contact-card h2 {
    position: relative;
    font-size: clamp(32px, 4vw, 47px);
}

.contact-card > p {
    position: relative;
    max-width: 500px;
    margin: 20px auto 0;
    color: #638197;
    font-size: 14px;
    line-height: 1.9;
}

.contact-button {
    position: relative;
    margin-top: 28px;
    min-height: 50px;
}

/* ==========================================
   FOOTER
========================================== */

.home-footer {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    align-items: center;
    gap: 22px;
    padding: 30px 7%;
    border-top: 1px solid #deedf7;
    background: rgba(255, 255, 255, 0.7);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: none;
    background: transparent;
    color: var(--sky-deep);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    border-radius: 10px;
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: white;
    font-size: 19px;
}

.home-footer > p {
    color: #8098a9;
    font-size: 11px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links button {
    border: none;
    background: transparent;
    color: #526e84;
    font-size: 11px;
}

.footer-links button:hover {
    color: var(--sky-dark);
}

.home-footer .copyright {
    grid-column: 1 / -1;
    padding-top: 20px;
    border-top: 1px solid #e6f2f9;
    text-align: center;
}

/* ==========================================
   CHAT APPLICATION
========================================== */

body.chat-app {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    background: var(--background);
}

.chat-app-screen {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.app {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 75% 5%,
            rgba(125, 211, 252, 0.2),
            transparent 35%
        ),
        var(--background);
}

/* ==========================================
   CHAT SIDEBAR
========================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    width: 280px;
    min-width: 280px;
    height: 100%;
    padding: 22px 16px 15px;
    overflow: hidden;
    border-right: 1px solid var(--border);
    background: rgba(224, 242, 254, 0.95);
    z-index: 20;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 3px 6px 23px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: white;
    font-size: 25px;
    font-weight: 800;
}

.logo-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text h2 {
    color: var(--sky-deep);
    font-size: 19px;
    letter-spacing: 1.2px;
}

.brand-text span {
    display: block;
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 11px;
}

.home-return-button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    margin-bottom: 10px;
    padding: 10px 13px;
    border: 1px solid #c5e7f8;
    border-radius: 11px;
    background: #f7fcff;
    color: var(--sky-deep);
    font-size: 12px;
    font-weight: 700;
}

.home-return-button:hover {
    background: #e0f2fe;
}

.home-return-button span {
    font-size: 18px;
}

/* New Chat */

.new-chat {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 47px;
    padding: 12px 15px;
    border: 1px solid #7dd3fc;
    border-radius: 13px;
    background: white;
    color: var(--sky-deep);
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

.new-chat span {
    font-size: 22px;
    line-height: 1;
}

.new-chat:hover {
    background: #dff4ff;
    transform: translateY(-1px);
}

/* Conversation history */

.history-container {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    margin-top: 28px;
    overflow: hidden;
}

.history-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 5px;
    color: #608096;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.history-title button {
    padding: 5px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #64839a;
    font-size: 11px;
}

.history-title button:hover {
    background: #ccecff;
    color: var(--danger);
}

.chat-history {
    flex: 1;
    min-height: 0;
    padding-right: 3px;
    overflow-y: auto;
}

.no-history {
    padding: 14px 7px;
    color: #7792a6;
    font-size: 12px;
    line-height: 1.7;
}

.history-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 5px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.history-row:hover {
    background: #d4efff;
}

.history-row.selected {
    background: #c6eaff;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    min-width: 0;
    padding: 11px 9px;
    border: none;
    background: transparent;
    color: #284e68;
    text-align: left;
    font-size: 12px;
}

.history-icon {
    flex-shrink: 0;
    font-size: 14px;
}

.history-text {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.delete-chat-button {
    width: 29px;
    height: 29px;
    flex-shrink: 0;
    margin-right: 4px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #7190a6;
    font-size: 19px;
    opacity: 0;
    transition: 0.2s ease;
}

.history-row:hover .delete-chat-button,
.history-row:focus-within .delete-chat-button {
    opacity: 1;
}

.delete-chat-button:hover {
    background: #fee2e2;
    color: var(--danger);
}

.sidebar-bottom {
    flex-shrink: 0;
    padding: 17px 6px 2px;
    border-top: 1px solid #cce5f4;
    color: #658398;
    font-size: 11px;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #286b87;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

/* ==========================================
   CHAT MAIN PANEL
========================================== */

.main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 83px;
    padding: 17px 25px;
    border-bottom: 1px solid rgba(186, 230, 253, 0.85);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
}

.topbar-title {
    flex: 1;
    min-width: 0;
}

.topbar h1 {
    overflow: hidden;
    color: var(--sky-deep);
    font-size: 21px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar p {
    margin-top: 5px;
    color: #68869b;
    font-size: 12px;
}

.online {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    color: #39768b;
    font-size: 12px;
}

.online span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: white;
    color: var(--sky-deep);
    font-size: 18px;
}

.chat-home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    flex-shrink: 0;
    padding: 8px 12px;
    border: 1px solid #c5e7f8;
    border-radius: 10px;
    background: #f7fcff;
    color: var(--sky-deep);
    font-size: 12px;
    font-weight: 700;
}

.chat-home-button:hover {
    background: #e0f2fe;
}

/* ==========================================
   CHAT AREA
========================================== */

#chat.page-section {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#chat.page-section[hidden] {
    display: none !important;
}

.chat-box {
    flex: 1;
    min-height: 0;
    padding: 30px 24px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Welcome screen */

.welcome {
    width: 100%;
    max-width: 720px;
    margin: auto;
    padding: 30px 10px;
    text-align: center;
}

.welcome-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 22px;
    border: 1px solid #7dd3fc;
    border-radius: 22px;
    background: linear-gradient(135deg, #7dd3fc, #0284c7);
    box-shadow: 0 10px 28px rgba(2, 132, 199, 0.18);
    color: white;
    font-size: 35px;
    font-weight: 800;
}

.welcome h2 {
    color: var(--sky-deep);
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -0.7px;
    line-height: 1.3;
}

.welcome > p {
    max-width: 480px;
    margin: 13px auto 0;
    color: #66859b;
    font-size: 14px;
    line-height: 1.8;
}

/* Suggested prompts */

.suggestions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
}

.suggestions button {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    min-height: 86px;
    padding: 15px;
    border: 1px solid #c7e7f9;
    border-radius: 15px;
    background: white;
    color: #31566f;
    text-align: left;
    font-size: 12px;
    line-height: 1.5;
    transition: 0.2s ease;
}

.suggestions button:hover {
    border-color: #7dd3fc;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.suggestions button > span:first-child {
    flex-shrink: 0;
    font-size: 20px;
}

.suggestions button > span:last-child {
    overflow-wrap: anywhere;
}

/* Chat messages */

.message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    max-width: 850px;
    margin: 0 auto 23px;
    animation: messageIn 0.2s ease;
}

.message-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border: 1px solid #b7e4fa;
    border-radius: 11px;
    background: #d9f2ff;
    color: #0369a1;
    font-size: 10px;
    font-weight: 800;
}

.ai-message .message-avatar {
    border-color: #7dd3fc;
    background: linear-gradient(135deg, #7dd3fc, #0284c7);
    color: white;
    font-size: 16px;
}

.message-content {
    flex: 1;
    min-width: 0;
    padding: 10px 0;
    color: #29485d;
    font-size: 14px;
    line-height: 1.9;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.user-message .message-content {
    padding: 13px 17px;
    border: 1px solid #bae6fd;
    border-radius: 16px;
    background: #dff4ff;
    color: #164e70;
}

.ai-message .message-content {
    color: #29485d;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search sources */

.search-results {
    margin-top: -10px;
}

.search-results h3 {
    margin: 0 0 10px;
    color: var(--sky-deep);
    font-size: 13px;
}

.search-result-link {
    display: block;
    margin: 7px 0;
    color: var(--sky-dark);
    font-size: 12px;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.search-result-link:hover {
    text-decoration: underline;
}

/* ==========================================
   CHAT COMPOSER
========================================== */

.input-container {
    flex-shrink: 0;
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    padding: 12px 24px 20px;
}

.input-area {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    width: 100%;
    padding: 8px;
    border: 1px solid #b9e1f5;
    border-radius: 19px;
    background: white;
    box-shadow: 0 5px 25px rgba(14, 116, 144, 0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-area:focus-within {
    border-color: var(--sky);
    box-shadow: 0 5px 28px rgba(14, 165, 233, 0.13);
}

#userInput {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    max-height: 180px;
    resize: none;
    padding: 11px 5px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

#userInput::placeholder {
    color: #8ba8ba;
}

#userInput:focus-visible {
    outline: none;
}

.voice-button,
.send-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: none;
    border-radius: 13px;
    transition: 0.2s ease;
}

.voice-button {
    background: #e7f6ff;
    color: #0369a1;
    font-size: 17px;
}

.voice-button:hover {
    background: #cdeeff;
}

.send-button {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: white;
    font-size: 20px;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.18);
}

.send-button:hover {
    transform: translateY(-1px);
}

.disclaimer {
    margin-top: 10px;
    color: #819daf;
    font-size: 10px;
    line-height: 1.6;
    text-align: center;
}

/* Loading */

.loading-message .message-content {
    color: #63869c;
    animation: loadingPulse 1.2s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}

/* Notices */

.divi-notice {
    position: fixed;
    z-index: 1000;
    bottom: 25px;
    left: 50%;
    width: max-content;
    max-width: calc(100% - 30px);
    padding: 13px 18px;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    background: white;
    color: var(--sky-deep);
    box-shadow: var(--shadow);
    font-size: 13px;
    line-height: 1.6;
    transform: translateX(-50%);
}

/* Scrollbars */

.chat-box::-webkit-scrollbar,
.chat-history::-webkit-scrollbar {
    width: 6px;
}

.chat-box::-webkit-scrollbar-thumb,
.chat-history::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: #b6dff3;
}

.chat-box,
.chat-history {
    scrollbar-color: #b6dff3 transparent;
    scrollbar-width: thin;
}

/* ==========================================
   TABLET LAYOUT
========================================== */

@media (max-width: 1000px) {
    .home-navbar {
        padding-right: 4%;
        padding-left: 4%;
    }

    .home-nav-links {
        gap: 2px;
    }

    .home-nav-links .nav-tab {
        padding: 10px;
    }

    .hero-section {
        gap: 25px;
        padding-right: 5%;
        padding-left: 5%;
    }

    .hero-content h1 {
        letter-spacing: -2px;
    }

    .sidebar {
        width: 240px;
        min-width: 240px;
    }

    .feature-grid {
        max-width: 750px;
    }
}

/* ==========================================
   MOBILE LAYOUT
========================================== */

@media (max-width: 760px) {
    .home-navbar {
        flex-wrap: wrap;
        gap: 13px;
        padding: 14px 5%;
    }

    .home-logo {
        margin-right: auto;
    }

    .open-ai-button {
        min-height: 40px;
        padding: 0 13px;
        font-size: 11px;
    }

    .home-nav-links {
        order: 3;
        justify-content: space-between;
        width: 100%;
        gap: 4px;
        padding-top: 12px;
        border-top: 1px solid #e0f0fa;
    }

    .home-nav-links .nav-tab {
        padding: 9px 12px;
        font-size: 12px;
    }

    .home-page .site-view {
        min-height: 65vh;
    }

    .home-page #homeHero:not([hidden]) {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .hero-section {
        padding: 60px 7%;
    }

    .hero-content {
        text-align: center;
    }

    .hero-badge,
    .hero-buttons,
    .hero-note {
        justify-content: center;
    }

    .hero-content h1 {
        font-size: clamp(42px, 9vw, 62px);
        letter-spacing: -2px;
    }

    .hero-description {
        margin-right: auto;
        margin-left: auto;
        font-size: 14px;
    }

    .hero-visual {
        min-height: 390px;
        margin-top: 10px;
    }

    .hero-ai-card {
        width: min(88%, 390px);
    }

    .orbit {
        width: 300px;
        height: 300px;
    }

    .orbit-two {
        width: 360px;
        height: 360px;
    }

    .floating-card-top {
        top: 15px;
        right: 0;
    }

    .floating-card-bottom {
        bottom: 12px;
        left: 0;
    }

    .intro-strip {
        flex-direction: column;
        gap: 15px;
    }

    .home-features-section {
        padding: 65px 6%;
    }

    .home-page #homeAbout:not([hidden]) {
        display: grid;
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .home-about-section {
        padding: 65px 7%;
    }

    .about-visual {
        min-height: 310px;
    }

    .about-content {
        text-align: center;
    }

    .about-orb {
        width: 220px;
        height: 220px;
    }

    .about-orb-inner {
        width: 110px;
        height: 110px;
        font-size: 65px;
    }

    .home-contact-section {
        padding: 55px 5%;
    }

    .contact-card {
        padding: 55px 20px;
    }

    .home-footer {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 28px 6%;
    }

    .home-footer .copyright {
        grid-column: auto;
        width: 100%;
    }

    .footer-links {
        justify-content: center;
    }

    /* Chat mobile */

    body.chat-app {
        overflow: hidden;
    }

    .app {
        position: relative;
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(300px, 86vw);
        min-width: 0;
        height: 100vh;
        height: 100dvh;
        padding: 20px 15px;
        box-shadow: 15px 0 40px rgba(7, 89, 133, 0.12);
        transform: translateX(-110%);
        visibility: hidden;
        transition: transform 0.25s ease, visibility 0.25s ease;
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
        visibility: visible;
    }

    .sidebar-toggle {
        display: flex;
    }

    .topbar {
        min-height: 70px;
        gap: 9px;
        padding: 12px;
    }

    .topbar h1 {
        max-width: 40vw;
        font-size: 17px;
    }

    .topbar p {
        font-size: 10px;
    }

    .chat-home-button {
        padding: 8px 9px;
        font-size: 10px;
    }

    .online {
        display: none;
    }

    .chat-box {
        padding: 20px 13px;
    }

    .welcome {
        padding: 22px 2px;
    }

    .welcome-icon {
        width: 59px;
        height: 59px;
        border-radius: 18px;
        font-size: 29px;
    }

    .welcome h2 {
        font-size: 25px;
    }

    .welcome > p {
        font-size: 13px;
    }

    .suggestions {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 25px auto 0;
    }

    .suggestions button {
        min-height: 60px;
        padding: 12px;
    }

    .message {
        gap: 9px;
        margin-bottom: 17px;
    }

    .message-avatar {
        width: 30px;
        height: 30px;
    }

    .message-content {
        font-size: 13px;
        line-height: 1.8;
    }

    .user-message .message-content {
        padding: 10px 13px;
    }

    .input-container {
        padding: 10px 12px 13px;
    }

    .input-area {
        gap: 5px;
        padding: 6px;
        border-radius: 16px;
    }

    #userInput {
        min-height: 39px;
        padding: 9px 4px;
        font-size: 13px;
    }

    .voice-button,
    .send-button {
        width: 37px;
        height: 37px;
        border-radius: 11px;
    }

    .disclaimer {
        font-size: 9px;
    }

    .delete-chat-button {
        opacity: 1;
    }
}

/* Smaller phones */

@media (max-width: 480px) {
    .home-logo strong {
        font-size: 16px;
    }

    .home-logo span {
        font-size: 9px;
    }

    .home-logo-icon {
        width: 39px;
        height: 39px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-description {
        font-size: 13px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-primary-button,
    .hero-secondary-button {
        width: 100%;
        max-width: 280px;
    }

    .hero-visual {
        min-height: 350px;
    }

    .hero-ai-card {
        padding: 17px;
    }

    .floating-card {
        padding: 10px;
    }

    .floating-card strong {
        font-size: 10px;
    }

    .floating-card small {
        font-size: 9px;
    }

    .floating-icon {
        width: 29px;
        height: 29px;
    }

    .intro-items {
        gap: 14px;
    }

    .intro-items span {
        font-size: 11px;
    }

    .section-heading h2,
    .about-content h2,
    .contact-card h2 {
        font-size: 32px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: 230px;
    }

    .about-small-one {
        right: -5px;
    }

    .about-small-two {
        left: -5px;
    }

    .chat-home-button {
        padding: 7px 8px;
    }
}

/* ==========================================
   REDUCED MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
```css
[hidden] {
    display: none !important;
}
```
```css
/* Keep hidden pages and screens hidden. */
[hidden] {
    display: none !important;
}

/* Homepage layout */
#homePage {
    width: 100%;
    min-height: 100vh;
}

/* Chat application layout */
#aiAppScreen {
    width: 100%;
    min-height: 100vh;
}

#aiAppScreen:not([hidden]) {
    display: flex;
}

/* Homepage navigation buttons */
.nav-tab,
[data-open-page],
.open-ai-button,
.hero-primary-button,
.hero-secondary-button,
.home-return-button,
.chat-home-button {
    cursor: pointer;
}
```
/* DIVI AI CONTACT EMAIL */

.contact-email-card {
    margin: 25px auto;
    padding: 25px;
    max-width: 500px;
    text-align: center;
    background: rgba(135, 206, 250, 0.12);
    border: 1px solid rgba(135, 206, 250, 0.4);
    border-radius: 18px;
}

.contact-email-card h3 {
    margin-bottom: 12px;
    font-size: 24px;
}

.contact-email-card p {
    line-height: 1.7;
    margin-bottom: 20px;
}

.contact-email {
    display: inline-block;
    color: #168bd2;
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.contact-email:hover {
    text-decoration: underline;
}
/* ==========================================
   DIVI AI — CHAT POLISH
========================================== */

/* Keep longer answers readable */
.message-content {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.7;
}

/* Typing indicator */
.loading-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    color: #52677f;
}

.loading-label {
    font-size: 14px;
}

/* Animated dots */
.loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.loading-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2588e8;
    animation: diviTyping 1.2s infinite ease-in-out;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes diviTyping {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* Disabled send button */
#sendButton:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .loading-dot {
        animation: none;
        opacity: 1;
    }
}
```css
/* =====================================
   DIVI AI — LOGIN & SIGNUP DESIGN
===================================== */

.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 16px;
    background: linear-gradient(135deg, #e0f2fe, #f0f9ff, #dbeafe);
    font-family: Arial, sans-serif;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 38px 32px;
    background: #ffffff;
    border: 1px solid #e5eef8;
    border-radius: 22px;
    box-shadow: 0 15px 45px rgba(37, 99, 235, 0.12);
    box-sizing: border-box;
    animation: authFadeIn 0.4s ease;
}

.auth-logo {
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    color: #ffffff;
    font-size: 27px;
    font-weight: 700;
}

.auth-card h1 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
}

.auth-subtitle {
    margin: 0 0 28px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form label {
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    outline: none;
    background: #f8fafc;
    color: #0f172a;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-form input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.auth-form input::placeholder {
    color: #94a3b8;
}

.auth-button {
    width: 100%;
    min-height: 49px;
    margin-top: 5px;
    border: none;
    border-radius: 11px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.auth-switch {
    margin: 24px 0 0;
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

.auth-switch a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.auth-switch a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.auth-message {
    display: none;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-message.success {
    display: block;
    background: #dcfce7;
    color: #166534;
}

.auth-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
}

.auth-back {
    display: inline-block;
    margin-top: 22px;
    color: #64748b;
    font-size: 13px;
    text-decoration: none;
}

.auth-back:hover {
    color: #2563eb;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile screens */
@media (max-width: 480px) {
    .auth-container {
        padding: 20px 14px;
    }

    .auth-card {
        padding: 30px 22px;
        border-radius: 18px;
    }

    .auth-card h1 {
        font-size: 25px;
    }
}
```
```css
/* =========================================
   DIVI AI — LOGIN & SIGNUP SCREEN
   Matches your existing HTML
========================================= */

.auth-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    box-sizing: border-box;
    background: linear-gradient(
        135deg,
        #e0f2fe 0%,
        #f0f9ff 50%,
        #dbeafe 100%
    );
    font-family: Arial, sans-serif;
}

/* Respect the HTML hidden attribute */
.auth-screen[hidden],
#loginForm[hidden],
#registerForm[hidden] {
    display: none !important;
}

/* Main white card */
.auth-screen .auth-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    margin: auto;
    padding: 38px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(30, 64, 175, 0.14);
    animation: authAppear 0.3s ease-out;
}

/* Back button */
.auth-back-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 24px;
    padding: 8px 12px;
    border: none;
    border-radius: 9px;
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.auth-back-button:hover {
    background: #e0f2fe;
    color: #1d4ed8;
}

/* Divi logo */
.auth-screen .auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 22px;
    border-radius: 20px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 9px 22px rgba(37, 99, 235, 0.2);
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
}

/* Heading and description */
.auth-screen #authTitle {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 29px;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    letter-spacing: -0.7px;
}

.auth-screen #authDescription {
    margin: 0 0 28px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

/* Login and signup forms */
.auth-screen #loginForm,
.auth-screen #registerForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-screen #loginForm[hidden],
.auth-screen #registerForm[hidden] {
    display: none !important;
}

/* Labels */
.auth-screen #loginForm label,
.auth-screen #registerForm label {
    margin-top: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

/* Input fields */
.auth-screen #loginForm input,
.auth-screen #registerForm input {
    display: block;
    width: 100%;
    min-height: 49px;
    padding: 13px 15px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    outline: none;
    background: #f8fafc;
    color: #0f172a;
    font-family: Arial, sans-serif;
    font-size: 14px;
    transition:
        border-color 0.2s,
        background 0.2s,
        box-shadow 0.2s;
}

.auth-screen #loginForm input::placeholder,
.auth-screen #registerForm input::placeholder {
    color: #94a3b8;
}

.auth-screen #loginForm input:hover,
.auth-screen #registerForm input:hover {
    border-color: #93c5fd;
}

.auth-screen #loginForm input:focus,
.auth-screen #registerForm input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

/* Login and create-account buttons */
.auth-screen .auth-submit-button {
    width: 100%;
    min-height: 50px;
    margin-top: 15px;
    padding: 13px 18px;
    border: none;
    border-radius: 11px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 7px 18px rgba(37, 99, 235, 0.17);
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-screen .auth-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 11px 24px rgba(37, 99, 235, 0.25);
}

.auth-screen .auth-submit-button:active {
    transform: translateY(0);
}

.auth-screen .auth-submit-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Login and registration feedback messages */
.auth-screen .auth-message {
    margin: 5px 0 0;
    padding: 0;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.auth-screen .auth-message:empty {
    display: none;
}

/* Account switch text */
.auth-screen .auth-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 25px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

.auth-screen #authSwitchButton {
    padding: 2px 0;
    border: none;
    background: transparent;
    color: #2563eb;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.auth-screen #authSwitchButton:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Entrance animation */
@keyframes authAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile layout */
@media (max-width: 480px) {
    .auth-screen {
        padding: 15px;
    }

    .auth-screen .auth-card {
        padding: 28px 22px;
        border-radius: 19px;
    }

    .auth-screen #authTitle {
        font-size: 25px;
    }

    .auth-screen .auth-logo {
        width: 56px;
        height: 56px;
        font-size: 27px;
    }
}
```
```css
/* DIVI AI LOGIN AND SIGNUP TEST */

#authScreen:not([hidden]) {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    overflow-y: auto !important;
    background: #e0f2fe !important;
    font-family: Arial, sans-serif !important;
}

#authScreen .auth-card {
    width: 100% !important;
    max-width: 420px !important;
    padding: 35px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border: 1px solid #dbeafe !important;
    border-radius: 20px !important;
    box-shadow: 0 15px 50px rgba(37, 99, 235, 0.18) !important;
}

#authScreen .auth-logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 60px !important;
    height: 60px !important;
    margin: 0 auto 20px !important;
    border-radius: 16px !important;
    background: #2563eb !important;
    color: white !important;
    font-size: 28px !important;
    font-weight: bold !important;
}

#authScreen #authTitle {
    color: #0f172a !important;
    font-size: 28px !important;
    text-align: center !important;
}

#authScreen #authDescription {
    margin-bottom: 25px !important;
    color: #64748b !important;
    text-align: center !important;
}

#authScreen #loginForm label,
#authScreen #registerForm label {
    display: block !important;
    margin: 12px 0 7px !important;
    color: #334155 !important;
    font-size: 14px !important;
    font-weight: bold !important;
}

#authScreen #loginForm input,
#authScreen #registerForm input {
    display: block !important;
    width: 100% !important;
    min-height: 47px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    font-size: 14px !important;
}

#authScreen #loginForm input:focus,
#authScreen #registerForm input:focus {
    border-color: #2563eb !important;
    outline: 2px solid #bfdbfe !important;
}

#authScreen .auth-submit-button {
    width: 100% !important;
    min-height: 48px !important;
    margin-top: 20px !important;
    border: none !important;
    border-radius: 10px !important;
    background: #2563eb !important;
    color: white !important;
    font-size: 15px !important;
    font-weight: bold !important;
    cursor: pointer !important;
}

#authScreen .auth-submit-button:hover {
    background: #1d4ed8 !important;
}

#authScreen .auth-switch {
    margin-top: 22px !important;
    color: #64748b !important;
    text-align: center !important;
}

#authScreen #authSwitchButton {
    border: none !important;
    background: transparent !important;
    color: #2563eb !important;
    font-weight: bold !important;
    cursor: pointer !important;
}

#authScreen[hidden],
#authScreen #loginForm[hidden],
#authScreen #registerForm[hidden] {
    display: none !important;
}

@media (max-width: 480px) {
    #authScreen .auth-card {
        padding: 25px 20px !important;
    }
}
```
/* ==========================================
   DIVI AI — FINAL VISUAL UPGRADE
========================================== */

/* Smooth, consistent appearance */
body {
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
a,
input,
textarea {
    transition-duration: 0.2s;
}

/* ==========================================
   LOGIN AND SIGNUP SCREEN
========================================== */

#authScreen:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(56, 189, 248, 0.30),
            transparent 35%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(37, 99, 235, 0.18),
            transparent 35%
        ),
        linear-gradient(135deg, #e0f2fe, #f8fbff 55%, #dbeafe);
}

#authScreen .auth-card {
    width: 100%;
    max-width: 440px;
    padding: 42px 36px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 30px 80px rgba(7, 89, 133, 0.13),
        0 5px 18px rgba(37, 99, 235, 0.06);
    backdrop-filter: blur(18px);
}

#authScreen .auth-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 24px;
    border-radius: 22px;
    background: linear-gradient(135deg, #7dd3fc, #0284c7, #1d4ed8);
    box-shadow: 0 12px 28px rgba(2, 132, 199, 0.25);
    color: white;
    font-size: 32px;
}

#authScreen #authTitle {
    margin-bottom: 12px;
    color: #0c3553;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
    text-align: center;
}

#authScreen #authDescription {
    margin-bottom: 30px;
    color: #68839a;
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
}

#authScreen #loginForm,
#authScreen #registerForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#authScreen #loginForm[hidden],
#authScreen #registerForm[hidden] {
    display: none !important;
}

#authScreen #loginForm label,
#authScreen #registerForm label {
    margin-top: 8px;
    color: #294b65;
    font-size: 13px;
    font-weight: 700;
}

#authScreen #loginForm input,
#authScreen #registerForm input {
    width: 100%;
    min-height: 51px;
    padding: 14px 15px;
    border: 1px solid #d2e5f3;
    border-radius: 13px;
    background: #f6fbff;
    color: #17364d;
    font-size: 14px;
    outline: none;
}

#authScreen #loginForm input:focus,
#authScreen #registerForm input:focus {
    border-color: #38bdf8;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

#authScreen .auth-submit-button {
    min-height: 52px;
    margin-top: 18px;
    border: none;
    border-radius: 13px;
    background: linear-gradient(120deg, #38bdf8, #0284c7, #2563eb);
    color: white;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 9px 22px rgba(2, 132, 199, 0.20);
}

#authScreen .auth-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 13px 28px rgba(2, 132, 199, 0.28);
}

#authScreen .auth-switch {
    margin-top: 25px;
    color: #6b8296;
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
}

#authScreen #authSwitchButton {
    color: #0284c7;
    font-weight: 800;
}

#authScreen .auth-back-button {
    border-radius: 10px;
    background: #eff8ff;
    color: #075985;
}

/* ==========================================
   CHAT INTERFACE ENHANCEMENTS
========================================== */

.chat-app-screen,
.app {
    background-color: #f0f9ff;
}

.sidebar {
    border-right: 1px solid #cce8f8;
    background: linear-gradient(180deg, #e5f5ff, #f2f9ff);
}

.logo-icon {
    border-radius: 15px;
    box-shadow: 0 7px 20px rgba(2, 132, 199, 0.22);
}

.new-chat {
    border-color: #bae6fd;
    border-radius: 13px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.05);
}

.new-chat:hover {
    border-color: #38bdf8;
    box-shadow: 0 7px 18px rgba(2, 132, 199, 0.10);
}

.history-row {
    border: 1px solid transparent;
}

.history-row.selected {
    border-color: #a5dcf8;
    background: #d6efff;
}

.topbar {
    border-bottom: 1px solid #d9edf9;
    background: rgba(255, 255, 255, 0.92);
}

.topbar h1 {
    color: #075985;
    font-weight: 800;
}

.welcome-icon {
    border-radius: 23px;
    box-shadow: 0 15px 35px rgba(2, 132, 199, 0.22);
}

.welcome h2 {
    color: #075985;
    font-weight: 800;
}

.suggestions button {
    border-color: #d1eafa;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 18px rgba(14, 116, 144, 0.035);
}

.suggestions button:hover {
    border-color: #7dd3fc;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(14, 116, 144, 0.09);
}

.input-area {
    border-color: #c4e4f5;
    border-radius: 21px;
    box-shadow: 0 8px 30px rgba(14, 116, 144, 0.09);
}

.input-area:focus-within {
    border-color: #38bdf8;
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.14);
}

.send-button {
    border-radius: 13px;
    background: linear-gradient(135deg, #38bdf8, #0284c7);
}

.user-message .message-content {
    border-color: #b8e5fb;
    border-radius: 17px;
    background: linear-gradient(135deg, #e4f6ff, #d5efff);
}

/* ==========================================
   SMALL SCREEN IMPROVEMENTS
========================================== */

@media (max-width: 480px) {
    #authScreen {
        padding: 16px;
    }

    #authScreen .auth-card {
        padding: 30px 23px;
        border-radius: 22px;
    }

    #authScreen #authTitle {
        font-size: 26px;
    }
}
/* =========================================
   DIVI AI — LOGIN AND SIGNUP DESIGN
========================================= */

#authScreen[hidden],
#aiAppScreen[hidden],
#homePage[hidden] {
    display: none !important;
}

#authScreen:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
    overflow-y: auto;
    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(125, 211, 252, 0.55),
            transparent 35%
        ),
        radial-gradient(
            circle at 85% 85%,
            rgba(165, 180, 252, 0.45),
            transparent 35%
        ),
        linear-gradient(135deg, #effaff, #e5edff 55%, #f5f7ff);
}

#authScreen .auth-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: auto;
    padding: 42px 36px 32px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 25px 80px rgba(51, 91, 150, 0.16),
        0 5px 20px rgba(51, 91, 150, 0.06);
    animation: diviAuthAppear 0.35s ease-out;
}

#authScreen .auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #38bdf8, #6366f1, #818cf8);
}

@keyframes diviAuthAppear {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back button */

#authScreen .auth-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 30px;
    padding: 9px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

#authScreen .auth-back-button:hover {
    border-color: #7dd3fc;
    background: #f0f9ff;
    color: #0369a1;
}

/* Logo */

#authScreen .auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.25);
    color: white;
    font-size: 34px;
    font-weight: 800;
}

/* Headings */

#authScreen #authTitle {
    margin: 0 0 10px;
    color: #172554;
    font-size: clamp(26px, 5vw, 32px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
    text-align: center;
}

#authScreen #authDescription {
    margin: 0 auto 28px;
    max-width: 310px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

/* Form */

#authScreen #loginForm,
#authScreen #registerForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#authScreen #loginForm[hidden],
#authScreen #registerForm[hidden] {
    display: none !important;
}

#authScreen #loginForm label,
#authScreen #registerForm label {
    margin-top: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

#authScreen #loginForm input,
#authScreen #registerForm input {
    box-sizing: border-box;
    width: 100%;
    min-height: 49px;
    padding: 13px 15px;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    outline: none;
    background: #f8fafc;
    color: #172554;
    font: inherit;
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

#authScreen #loginForm input::placeholder,
#authScreen #registerForm input::placeholder {
    color: #94a3b8;
}

#authScreen #loginForm input:focus,
#authScreen #registerForm input:focus {
    border-color: #38bdf8;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

/* Main action button */

#authScreen .auth-submit-button {
    width: 100%;
    min-height: 50px;
    margin-top: 16px;
    padding: 13px 18px;
    border: none;
    border-radius: 13px;
    background: linear-gradient(110deg, #0284c7, #4f46e5);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

#authScreen .auth-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.28);
    filter: brightness(1.05);
}

#authScreen .auth-submit-button:active {
    transform: translateY(0);
}

/* Login and registration messages */

#authScreen .auth-message {
    min-height: 0;
    margin: 4px 0 0;
    color: #dc2626;
    font-size: 13px;
    line-height: 1.5;
}

/* Switch between forms */

#authScreen .auth-switch {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 25px 0 0;
    padding-top: 20px;
    border-top: 1px solid #edf2f7;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

#authScreen #authSwitchButton {
    padding: 4px;
    border: none;
    background: transparent;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

#authScreen #authSwitchButton:hover {
    color: #0284c7;
    text-decoration: underline;
}

/* Mobile layout */

@media (max-width: 480px) {
    #authScreen:not([hidden]) {
        padding: 16px;
    }

    #authScreen .auth-card {
        padding: 32px 22px 25px;
        border-radius: 22px;
    }

    #authScreen .auth-back-button {
        margin-bottom: 24px;
    }

    #authScreen .auth-logo {
        width: 60px;
        height: 60px;
        border-radius: 19px;
        font-size: 30px;
    }
}
/* DIVI AI — NAVY BLUE LOGIN BUTTON */

#authScreen .auth-submit-button {
    background: #001f4d !important;
    color: #ffffff !important;
    border: 1px solid #001f4d !important;
    border-radius: 12px;
    box-shadow: 0 5px 14px rgba(0, 31, 77, 0.18);
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

#authScreen .auth-submit-button:hover {
    background: #003366 !important;
    border-color: #003366 !important;
    transform: translateY(-1px);
}
/* DIVI AI — NAVY BLUE AUTH BUTTONS */

#authScreen .auth-submit-button {
    background: #001f4d !important;
    color: #ffffff !important;
    border: 1px solid #001f4d !important;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 5px 14px rgba(0, 31, 77, 0.18);
    transition: background 0.2s ease, transform 0.2s ease;
}

#authScreen .auth-submit-button:hover {
    background: #003366 !important;
    border-color: #003366 !important;
}

#authScreen .auth-submit-button:disabled {
    opacity: 0.65;
    cursor: wait;
}
