
/* ==============================
   SHIVIX.AI - PROFESSIONAL CSS
================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
}

body {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #090b14;
    color: #ffffff;
    overflow: hidden;
}

/* MAIN APP */

.app-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    margin: auto;
}

/* HEADER */

.header {
    width: 100%;
    height: 85px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #101421;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(156,39,176,0.4);
}

.logo h1 {
    font-size: 27px;
    letter-spacing: 2px;
    font-weight: bold;
}

.logo h1 span {
    color: #a78bfa;
}

.status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #b5bfd4;
    font-size: 14px;
}

.status-dot {
    width: 9px;
    height: 9px;
    background: #39d98a;
    border-radius: 50%;
    box-shadow: 0 0 10px #39d98a;
}

/* CHAT CONTAINER */

.chat-container {
    width: 100%;
    flex: 1;
    min-height: 0;
    background: radial-gradient(circle at top, #202039, #0d101b 65%);
    padding: 25px 5%;
    display: flex;
    flex-direction: column;
    gap: 25px;
    font-size: 18px;
    overflow-y: auto;
}

/* WELCOME SECTION */

.welcome-section {
    text-align: center;
    padding: 25px 10px;
}

.welcome-section img {
    width: 75px;
    height: 75px;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 0 25px rgba(167,139,250,0.35);
    margin-bottom: 15px;
}

.welcome-section h2 {
    font-size: 30px;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.welcome-section p {
    color: #929bb2;
    font-size: 15px;
}

/* USER CHAT */

.user-chat-box {
    width: 60%;
    position: relative;
    left: 40%;
    animation: chatAppear 0.3s ease;
}

.user-chat-area {
    width: 90%;
    margin-left: auto;
    padding: 18px 22px;
    background: linear-gradient(135deg, #7958df, #a06be8);
    color: white;
    border-radius: 22px 5px 22px 22px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.25);
    display: flex;
    gap: 10px;
    flex-direction: column;
    overflow-wrap: anywhere;
    line-height: 1.6;
}

/* AI CHAT */

.ai-chat-box {
    width: 60%;
    position: relative;
    animation: chatAppear 0.3s ease;
}

.ai-chat-area {
    width: 90%;
    padding: 18px 22px;
    background: #171d2d;
    position: relative;
    left: 10%;
    color: #e5e7f0;
    border: 1px solid rgba(167,139,250,0.17);
    border-radius: 5px 22px 22px 22px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    overflow-wrap: anywhere;
    line-height: 1.7;
}

/* CHAT IMAGES */

#userImage {
    position: absolute;
    right: 0;
    filter: drop-shadow(2px 2px 10px black);
}

#aiImage {
    position: absolute;
    left: 0;
    filter: drop-shadow(2px 2px 10px black);
}

.chooseimg {
    width: 30%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 15px;
    margin-top: 10px;
}

.choose {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.load {
    filter: drop-shadow(2px 2px 10px black);
}

/* PROMPT CONTAINER */

.prompt-container {
    width: 100%;
    padding: 15px 5%;
    background: #101421;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.prompt-area {
    width: 100%;
    max-width: 950px;
    min-height: 68px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 12px;
    background: #191f30;
    border: 1px solid rgba(167,139,250,0.25);
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.25);
    transition: 0.3s;
}

.prompt-area:focus-within {
    border-color: #a78bfa;
    box-shadow: 0 0 15px rgba(167,139,250,0.15);
}

.prompt-area input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 50px;
    background: transparent;
    color: white;
    border: none;
    outline: none;
    padding: 12px 15px;
    font-size: 17px;
}

.prompt-area input::placeholder {
    color: #858da3;
}

/* BUTTONS */

.prompt-area button {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    background: #292e43;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prompt-area button img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.prompt-area button:hover {
    transform: translateY(-2px);
    background: #414762;
}

/* SEND BUTTON */

#submit {
    background: linear-gradient(135deg, #a78bfa, #7654ed);
    box-shadow: 0 4px 15px rgba(117,84,246,0.3);
}

#submit:hover {
    background: linear-gradient(135deg, #b69cff, #896bff);
    box-shadow: 0 5px 20px rgba(117,84,246,0.5);
}

/* IMAGE UPLOAD BUTTON */

#image {
    background: #292e43;
}

#image:hover {
    background: #414762;
}

/* FOOTER */

.footer-text {
    text-align: center;
    color: #737e96;
    font-size: 11px;
    margin-top: 12px;
}

/* SCROLLBAR */

.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #7654ed;
    border-radius: 20px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

/* ANIMATION */

@keyframes chatAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* TABLET RESPONSIVE */

@media (max-width: 900px) {

    .user-chat-box,
    .ai-chat-box {
        width: 80%;
    }

    .user-chat-box {
        left: 20%;
    }

}

/* MOBILE RESPONSIVE */

@media (max-width: 600px) {

    .header {
        height: 70px;
        padding: 0 15px;
    }

    .logo h1 {
        font-size: 21px;
    }

    .logo img {
        width: 40px;
        height: 40px;
    }

    .status {
        font-size: 11px;
    }

    .chat-container {
        padding: 18px 12px;
        gap: 20px;
    }

    .welcome-section {
        padding: 20px 5px;
    }

    .welcome-section h2 {
        font-size: 23px;
    }

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

    .user-chat-box,
    .ai-chat-box {
        width: 95%;
    }

    .user-chat-box {
        left: 5%;
    }

    .user-chat-area,
    .ai-chat-area {
        width: 88%;
        padding: 14px;
        font-size: 15px;
    }

    .prompt-container {
        padding: 12px 10px;
    }

    .prompt-area {
        min-height: 58px;
        gap: 7px;
        padding: 6px;
        border-radius: 16px;
    }

    .prompt-area input[type="text"] {
        font-size: 14px;
        padding: 8px;
    }

    .prompt-area button {
        width: 43px;
        height: 43px;
        border-radius: 12px;
    }

    .prompt-area button img {
        width: 21px;
        height: 21px;
    }

    .footer-text {
        font-size: 9px;
    }

}

/* SMALL MOBILE */

@media (max-width: 360px) {

    .logo h1 {
        font-size: 18px;
    }

    .status {
        font-size: 10px;
    }

    .prompt-area {
        gap: 4px;
    }

    .prompt-area button {
        width: 38px;
        height: 38px;
    }

}

/* FIX AI CHAT ALIGNMENT */

.ai-chat-box {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    left: 0;
}

#aiImage {
    position: static;
    flex-shrink: 0;
    width: 42px !important;
    height: 42px;
    object-fit: cover;
    border-radius: 12px;
}

.ai-chat-area {
    position: static;
    width: auto;
    max-width: 80%;
    min-width: 0;
    margin: 0;
}

/* FIX USER CHAT ALIGNMENT */

.user-chat-box {
    width: 100%;
    left: 0;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 12px;
}

#userImage {
    position: static;
    flex-shrink: 0;
    width: 42px !important;
    height: 42px;
    object-fit: cover;
    border-radius: 12px;
}

.user-chat-area {
    width: auto;
    max-width: 80%;
    min-width: 0;
    margin: 0;
}


/* LOGIN / LOGOUT BUTTON */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-action {
    padding: 10px 18px;
    border: 1px solid rgba(167, 139, 250, 0.55);
    border-radius: 10px;
    background: linear-gradient(135deg, #7654ed, #9874f5);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s ease;
}

.auth-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(118, 84, 237, 0.3);
}

.auth-action.logout {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-action.logout:hover {
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

@media (max-width: 600px) {
    .header { padding: 0 4%; }
    .header-actions { gap: 9px; }
    .status { font-size: 12px; }
    .auth-action { padding: 8px 11px; font-size: 12px; }
    .logo h1 { font-size: 21px; }
}
/* AI Response Formatting */

.ai-chat-area {
    line-height: 1.7;
    font-size: 15px;
    color: #e5e7eb;
    overflow-wrap: anywhere;
}

.ai-chat-area h1,
.ai-chat-area h2,
.ai-chat-area h3 {
    color: #ffffff;
    margin: 20px 0 10px;
    font-weight: 700;
}

.ai-chat-area h1 {
    font-size: 24px;
}

.ai-chat-area h2 {
    font-size: 20px;
}

.ai-chat-area h3 {
    font-size: 17px;
}

.ai-chat-area p {
    margin: 10px 0;
}

.ai-chat-area strong {
    color: #a78bfa;
    font-weight: 700;
}

.ai-chat-area ul,
.ai-chat-area ol {
    padding-left: 25px;
    margin: 12px 0;
}

.ai-chat-area li {
    margin: 7px 0;
}

.ai-chat-area table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    display: block;
    overflow-x: auto;
}

.ai-chat-area th,
.ai-chat-area td {
    border: 1px solid #343b53;
    padding: 10px;
    text-align: left;
}

.ai-chat-area th {
    background: #292342;
    color: #c4b5fd;
}

.ai-chat-area tr:nth-child(even) {
    background: #20273a;
}

.ai-chat-area pre {
    background: #101522;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 12px 0;
}

.ai-chat-area code {
    background: #252b3d;
    padding: 3px 6px;
    border-radius: 5px;
    color: #c4b5fd;
}

.ai-chat-area pre code {
    background: transparent;
    padding: 0;
}

.ai-chat-area blockquote {
    border-left: 3px solid #a78bfa;
    padding-left: 12px;
    color: #b8bfd0;
    margin: 12px 0;
}

.ai-chat-area a {
    color: #a78bfa;
}