body {
    margin: 0px;
    background: linear-gradient(to bottom right,
            #a5df6f 0%,
            #a5df6f 10%,
            #e2ebe9 20%,
            #e2ebe9 70%,
            #b0e093 90%,
            #b0e093 100%);
    font-family: 'Inter', sans-serif;
}

.main-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    padding: 0 10px;
}

/* Main content should not stretch */
.main-content {
    max-width: 1200px;
    flex: 1;
}

/* Vertical ad styling */
.vertical-ad {
    width: 200px;
    height: 600px;
    position: sticky;
    top: 120px;
}

.responsive-ad {
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    text-align: center;
    overflow: hidden;
}

/* background section */
.background-pic {
    background: url(/static/assets/images/particles-4.webp);
    margin-top: 90px;
    height: 620px;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.background-pic-child {
    max-width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.background-pic-child img {
    width: 100%;
    max-width: 500px;
    height: auto;
    animation: floatImage 6s ease-in-out infinite;
}

/* Floating Animation */
@keyframes floatImage {
    0% {
        transform: translateY(0px);
    }

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

    100% {
        transform: translateY(0px);
    }
}

/* Assistant text styles */
.assistant-text {
    font-family: 'Courier New', monospace;
    color: #333;
    text-align: center;
}

.line1 {
    font-size: 20px;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid #333;
    width: 0;
    display: inline-block;
    animation: typewriter 6s steps(28, end) infinite;
    margin-top: 0px;
}

.cursor {
    animation: blink 1s step-end infinite;
}

/* Typewriter Animation */
@keyframes typewriter {
    0% {
        width: 0;
        opacity: 1;
    }

    50% {
        width: 270px;
        opacity: 1;
    }

    90% {
        width: 270px;
        opacity: 1;
    }

    100% {
        width: 0;
        opacity: 0;
    }
}

/* Blinking Cursor */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* chat section */
.chat-section {
    padding: 2rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.title {
    font-size: 60px;
    color: black;
    font-weight: bold;
    margin-bottom: 1rem;
    margin-top: 0px;
}

.badge-container {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 30px;
    margin-bottom: 50px;
}

.badge {
    padding: 0.4rem 0.75rem;
    background-color: #d1f7cc;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #1a1a1a;
    cursor: pointer;
}

.badge.dark {
    background-color: #1a1a1a;
    color: #fff;
}

.topics {
    margin-bottom: 30px;
}

.topics h3 {
    color: black;
    font-size: 20px;
    font-weight: bold;
    text-align: left;
    margin-bottom: 20px;
}

.topics ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.topics li {
    margin-bottom: 0.5rem;
    color: #333;
    position: relative;
    padding-left: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.topics li:hover {
    color: #7ed957;
}

.topics li::before {
    content: '●';
    position: absolute;
    left: 0;
    color: #38c172;
    font-size: 0.75rem;
    top: 0.2rem;
}

.chat-box {
    background-color: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 50px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.chat-header {
    color: #fff;
    background-color: #1a1a1a;
    padding: 20px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.new-chat {
    font-size: 0.875rem;
    color: #cfcfcf;
    cursor: pointer;
    transition: all 0.2s;
}

.new-chat:hover {
    color: #7ed957;
}

.chat-input {
    display: flex;
    background-color: #fff;
    padding: 1rem;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    padding: 15px;
    border: none;
    background: #e9f3fa;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.chat-input input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #7ed957;
}

.send-btn {
    background-color: #7ed957;
    border: none;
    color: #fff;
    padding: 0 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    background-color: #6bc04a;
}

.send-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.loading-dots {
    display: none;
}

.loading-dots div {
    position: absolute;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #7ed957;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.loading-dots div:nth-child(1) {
    left: 8px;
    animation: loading-dots1 0.6s infinite;
}

.loading-dots div:nth-child(2) {
    left: 8px;
    animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(3) {
    left: 32px;
    animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(4) {
    left: 56px;
    animation: loading-dots3 0.6s infinite;
}

@keyframes loading-dots1 {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes loading-dots3 {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
    }
}

@keyframes loading-dots2 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(24px, 0);
    }
}

/* Message animations */
@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.message-bubble {
    animation: messageSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes messageSlideIn {
    0% {
        transform: translateY(10px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Typing indicator */
.typing-indicator {
    display: table;
    background: #e1e1e1;
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 10px;
    align-items: center;
    max-width: 80%;
    position: relative;
}

.typing-indicator:before {
    content: "";
    position: absolute;
    left: -8px;
    bottom: 0;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-right-color: #e1e1e1;
    border-left: 0;
    border-bottom: 0;
    margin-left: -8px;
    margin-bottom: 5px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #7ed957;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    animation: typing-pulse 1.5s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

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

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

@keyframes typing-pulse {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

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

/* Responsive styles */
@media (max-width: 800px) {
    .vertical-ad {
        display: none;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 40px;
    }

    .chat-section {
        padding: 1rem;
    }

    .background-pic {
        height: 450px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 32px;
    }

    .chat-input {
        flex-direction: column;
    }

    .send-btn {
        padding: 12px;
        width: 100%;
    }
}