* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background: rgb(244, 240, 239);
    height: 100dvh;
    width: 100dvw;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.dev-header {
    color: red;
    font-size: 3rem;
    flex-shrink: 0;
}

.chat-container {
    width: 60vw;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin: 2dvh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1280px) {
    .chat-container {
        border-radius: 0;
        width: 100%;
        margin: 0;
    }
}

.chat-header {
    background: linear-gradient(to right, #ef396c, #fbb070);
    color: white;
    padding: 5px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-head {
    flex: 1;
}

.chat-head p {
    color: rgb(238, 238, 238);
    font-size: 0.8rem;
    opacity: 0.8;
}

.chat-header button {
    color: white;
}

.icon-button {
    font-size: 1.5rem;
    height: 1.5em;
    width: 1.5em;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    border: 0;

    background-color: transparent;

    cursor: pointer;
}

.menu-container {
    position: relative;
    display: inline-block;
}

.menu-dropdown {
    position: absolute;
    display: inline-block;

    right: 0;
    top: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    z-index: 1000;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    color: rgb(38, 38, 38);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.menu-item:hover {
    background: #f5f5f5;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f4f0ef;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    position: relative;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.user-message {
    background: white;
    color: rgb(38, 38, 38);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background: white;
    color: rgb(38, 38, 38);
    border: 1px solid #df4974;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.bot-message ul,
.bot-message ol {
    margin-left: 25px;
    margin-bottom: 15px;
}

.bot-message li {
    margin-left: 10px;
    margin-bottom: 5px;
}

.bot-message h1 {
    margin-left: 0;
    font-size: 24px;
}

.bot-message h2 {
    margin-left: 5px;
    font-size: 20px;
}

.bot-message h3 {
    margin-left: 10px;
    font-size: 18px;
}

.bot-message table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
}

.bot-message th,
.bot-message td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 5px;
    text-align: right;
}

.input-area {
    padding: 10px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.input-area textarea {
    resize: none;
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    outline: none;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-area textarea:focus {
    border-color: #df4974;
}

.input-area button {
    color: #df4974;
}

.input-area button:disabled {
    color: gray;
    cursor: not-allowed;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 12px 16px;
    background: white;
    border-radius: 15px;
    align-self: flex-start;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

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

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

@keyframes typing {

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

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

.hidden {
    display: none;
}