* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    color: #0b3f2d;
}

.top-bar {
    width: 100%;
    background: #f6fff9;
    border-bottom: 1px solid #d6f0e0;
    padding: 20px 100px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(11, 63, 45, 0.08);
}

.top-bar .title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #0b3f2d;
}

.chat-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    max-height: calc(100vh - 60px);
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
}

.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #d6f0e0;
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: #bfedd0;
}

.msg {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #d6f0e0;
    box-shadow: 0 4px 12px rgba(11, 63, 45, 0.06);
    animation: slideIn 0.3s ease;
}

.msg p {
    margin: 0;
    line-height: 1.5;
    color: #0b3f2d;
    word-wrap: break-word;
}

.msg .time {
    font-size: 12px;
    color: #3e7a61;
    margin-top: 6px;
}

.msg.user {
    align-self: flex-end;
    max-width: 70%;
    background: linear-gradient(120deg, #7ddf9f, #34c47a);
    border-color: #9fe9c9;
    color: #052117;
    box-shadow: 0 6px 16px rgba(52, 196, 122, 0.2);
}

.msg.user p {
    color: #052117;
}

.msg.user .time {
    color: #1f5837;
}

.msg.assistant {
    align-self: flex-start;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-bar {
    width: 100%;
    background: #ffffff;
    padding: 16px 0;
    border-top: 1px solid #d6f0e0;
    display: flex;
    justify-content: center;
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-shadow: 0 -2px 8px rgba(11, 63, 45, 0.08);
}

.input-inner {
    width: 100%;
    max-width: 900px;
    padding: 0 24px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.input-inner input {
    flex: 1;
    padding: 14px 18px;
    font-size: 15px;
    border-radius: 999px;
    border: 1px solid #d6f0e0;
    background: #ffffff;
    color: #0b3f2d;
    outline: none;
    transition: all 0.2s ease;
}

.input-inner input::placeholder {
    color: #3e7a61;
}

.input-inner input:focus {
    background: #ffffff;
    border-color: #7ddf9f;
    box-shadow: 0 0 0 3px rgba(125, 223, 159, 0.1);
}

.send-btn {
    padding: 0 20px;
    height: 46px;
    border-radius: 999px;
    border: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;

    transition: 0.2s ease;
}

.send-btn.disabled {
    background: #e2f7e6;
    color: #3e7a61;
    opacity: 0.6;
    cursor: not-allowed;
}

.send-btn.active {
    background: linear-gradient(120deg, #34c47a, #7ddf9f);
    color: #052117;
    opacity: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(52, 196, 122, 0.3);
}

.send-btn.active:hover {
    background: linear-gradient(120deg, #2fa86a, #6fd390);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 196, 122, 0.35);
}
