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

body {
    font-family: Arial, sans-serif;

    background:
        radial-gradient(circle at top left,
        #1e3a8a,
        transparent 30%),

        radial-gradient(circle at bottom right,
        #7c3aed,
        transparent 30%),

        #050816;

    color: white;

    min-height: 100vh;

    overflow-y: auto;
}

.app-container {

    display: flex;

    min-height: 100vh;

    backdrop-filter: blur(20px);
}

.sidebar {

    width: 260px;

    background: rgba(17, 24, 39, 0.65);

    backdrop-filter: blur(20px);

    border-right: 1px solid rgba(255,255,255,0.08);

    padding: 25px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;
}

.logo {

    font-size: 28px;

    font-weight: bold;

    margin-bottom: 35px;

    background: linear-gradient(
        to right,
        #60a5fa,
        #a78bfa
    );

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;
}

.sidebar button {

    width: 100%;

    margin-bottom: 14px;

    padding: 15px;

    border: 1px solid rgba(255,255,255,0.08);

    border-radius: 14px;

    background: rgba(255,255,255,0.04);

    color: white;

    cursor: pointer;

    transition: 0.3s;
}

.sidebar button:hover {

    transform: translateY(-2px);

    background: linear-gradient(
        to right,
        #2563eb,
        #7c3aed
    );

    box-shadow:
        0 0 20px rgba(124,58,237,0.5);
}

.sidebar-tools h3 {

    margin-bottom: 15px;

    color: #cbd5e1;
}

.main-content {

    flex: 1;

    display: flex;

    flex-direction: column;
}

.topbar {

    padding: 25px;

    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.topbar h1 {

    font-size: 36px;

    margin-bottom: 8px;

    background: linear-gradient(
        to right,
        #ffffff,
        #93c5fd
    );

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;
}

.topbar p {
    color: #94a3b8;
}

.tools-row {

    display: flex;

    gap: 20px;

    padding: 20px;
}

.tool-card {

    flex: 1;

    background: rgba(255,255,255,0.04);

    border: 1px solid rgba(255,255,255,0.06);

    backdrop-filter: blur(20px);

    border-radius: 20px;

    padding: 20px;

    box-shadow:
        0 0 30px rgba(0,0,0,0.2);
}

.tool-card h3 {
    margin-bottom: 15px;
}

textarea,
.input-area input {

    width: 100%;

    background: rgba(15,23,42,0.7);

    border: 1px solid rgba(255,255,255,0.05);

    border-radius: 14px;

    padding: 15px;

    color: white;

    font-size: 15px;
}

textarea {

    height: 120px;

    resize: none;

    margin-bottom: 15px;
}

.tool-card button,
.input-area button {

    padding: 14px 22px;

    border: none;

    border-radius: 14px;

    background: linear-gradient(
        to right,
        #2563eb,
        #7c3aed
    );

    color: white;

    cursor: pointer;

    transition: 0.3s;
}

.tool-card button:hover,
.input-area button:hover {

    transform: scale(1.03);

    box-shadow:
        0 0 20px rgba(124,58,237,0.5);
}

#chat-box {

    flex: 1;

    overflow-y: auto;

    padding: 25px;

    display: flex;

    flex-direction: column;

    gap: 20px;

    scroll-behavior: smooth;
}

.message {

    max-width: 85%;

    padding: 18px 22px;

    border-radius: 22px;

    line-height: 1.7;

    animation: fadeIn 0.4s ease;

    position: relative;

    backdrop-filter: blur(12px);

    box-shadow:
        0 0 20px rgba(99,102,241,0.15);
}

.message.user {

    align-self: flex-end;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #7c3aed
        );

    border-bottom-right-radius: 8px;
}

.message.ai {

    align-self: flex-start;

    background:
        rgba(20, 25, 45, 0.9);

    border: 1px solid rgba(255,255,255,0.06);

    border-bottom-left-radius: 8px;
}

.message strong {

    font-size: 15px;

    color: #93c5fd;
}

.copy-btn {

    position: absolute;

    top: 12px;

    right: 14px;

    background:
        rgba(255,255,255,0.08);

    border: none;

    color: white;

    padding: 6px 12px;

    border-radius: 10px;

    cursor: pointer;

    transition: 0.3s;
}

.copy-btn:hover {

    background:
        rgba(255,255,255,0.15);
}

@keyframes fadeIn {

    from {

        opacity: 0;

        transform:
            translateY(10px);
    }

    to {

        opacity: 1;

        transform:
            translateY(0);
    }
}

.user {

    margin-left: auto;

    background: linear-gradient(
        to right,
        #2563eb,
        #1d4ed8
    );

    box-shadow:
        0 0 20px rgba(37,99,235,0.4);
}

.ai {

    background: rgba(255,255,255,0.05);

    border: 1px solid rgba(255,255,255,0.06);

    backdrop-filter: blur(20px);
}

.input-area {

    display: flex;

    padding: 20px;

    border-top: 1px solid rgba(255,255,255,0.06);

    background: rgba(17,24,39,0.55);

    backdrop-filter: blur(20px);
}

.input-area button {
    margin-left: 12px;
}

.copy-btn {

    float: right;

    background: rgba(255,255,255,0.08);

    border: none;

    padding: 6px 12px;

    border-radius: 10px;

    color: white;

    cursor: pointer;
}

.copy-btn:hover {
    background: #2563eb;
}

pre {

    background: #020617;

    padding: 15px;

    border-radius: 14px;

    overflow-x: auto;

    margin-top: 12px;
}

code {
    color: #38bdf8;
}

.footer {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    padding: 30px;

    background: rgba(255,255,255,0.04);

    border-top: 1px solid rgba(255,255,255,0.06);

    backdrop-filter: blur(20px);

    color: #cbd5e1;
}

.footer h3,
.footer h4 {

    margin-bottom: 10px;

    color: white;
}

.footer p {

    margin-bottom: 8px;

    line-height: 1.5;
}

.footer-left,
.footer-center,
.footer-right {

    max-width: 30%;
}

@keyframes fadeIn {

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

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

    display: flex;

    gap: 6px;

    align-items: center;

    height: 20px;
}

.typing span {

    width: 10px;

    height: 10px;

    background: #60a5fa;

    border-radius: 50%;

    animation: bounce 1s infinite;
}

.typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {

    0%, 80%, 100% {
        transform: scale(0.7);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {

    margin-top: 15px;
    margin-bottom: 10px;
}

.markdown-body p {
    margin-bottom: 12px;
}

.markdown-body ul {

    padding-left: 20px;

    margin-bottom: 12px;
}

.markdown-body li {
    margin-bottom: 8px;
}

.hljs {

    border-radius: 14px;

    padding: 18px !important;
}
body::before {

    content: "";

    position: fixed;

    width: 500px;

    height: 500px;

    background:
        radial-gradient(
            circle,
            rgba(124,58,237,0.35),
            transparent 70%
        );

    top: -120px;

    right: -120px;

    z-index: -1;

    filter: blur(50px);
}

body::after {

    content: "";

    position: fixed;

    width: 400px;

    height: 400px;

    background:
        radial-gradient(
            circle,
            rgba(37,99,235,0.30),
            transparent 70%
        );

    bottom: -120px;

    left: -120px;

    z-index: -1;

    filter: blur(60px);
}
