* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #111b21;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    background-color: #222e35;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background-color: #202c33;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #374045;
}

.back-button {
    background: none;
    border: none;
    color: #e9edef;
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    border-radius: 50%;
}

.back-button:hover {
    background-color: #374045;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #6a7175;
}

.chat-info h2 {
    color: #e9edef;
    font-size: 16px;
    font-weight: 500;
}

.chat-info p {
    color: #8696a0;
    font-size: 13px;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    margin-bottom: 2px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #0b141a;
}

.message {
    max-width: 65%;
    padding: 6px 7px 8px 9px;
    border-radius: 7.5px;
    position: relative;
    word-wrap: break-word;
}

.message.sent {
    background-color: #005c4b;
    color: #e9edef;
    margin-left: auto;
    border-top-right-radius: 0;
}

.message.received {
    background-color: #202c33;
    color: #e9edef;
    margin-right: auto;
    border-top-left-radius: 0;
}

.message .time {
    font-size: 11px;
    color: #8696a0;
    margin-top: 4px;
    display: block;
}

.message.sent .time {
    text-align: right;
}

.message.received .time {
    text-align: left;
}

.message .sender {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.message .content {
    font-size: 14px;
    line-height: 1.4;
}

.message .content a {
    color: #53bdeb;
    text-decoration: none;
}

.message .content a:hover {
    text-decoration: underline;
}

.message.system {
    background-color: rgba(225, 245, 254, 0.92);
    color: #54656f;
    text-align: center;
    max-width: 85%;
    margin: 8px auto;
    font-size: 12.5px;
    padding: 5px 10px;
    border-radius: 7.5px;
}

.message.media {
    background-color: #202c33;
    padding: 0;
    overflow: hidden;
}

.message.media .content {
    padding: 6px 7px 8px 9px;
}

.message.media .media-placeholder {
    background-color: #374045;
    padding: 20px;
    text-align: center;
    color: #8696a0;
    font-size: 13px;
}

/* Scrollbar styling */
.messages-container::-webkit-scrollbar {
    width: 6px;
}

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

.messages-container::-webkit-scrollbar-thumb {
    background: #374045;
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: #444c52;
}

.file-input-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    background-color: #222e35;
    display: flex;
    justify-content: center;
    align-items: center;
}

.file-input-content {
    text-align: center;
    color: #e9edef;
    padding: 20px;
}

.file-input-content h2 {
    margin-bottom: 10px;
    font-size: 24px;
}

.file-input-content p {
    margin-bottom: 20px;
    color: #8696a0;
}

.file-input-content input[type="file"] {
    background-color: #005c4b;
    color: #e9edef;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.file-input-content input[type="file"]:hover {
    background-color: #006d5a;
}

.load-button {
    background-color: #005c4b;
    color: #e9edef;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    font-size: 14px;
    margin-bottom: 15px;
    width: 200px;
}

.load-button:hover {
    background-color: #006d5a;
}

.preset-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.chat-preset {
    background-color: #202c33;
    color: #e9edef;
    padding: 10px 20px;
    border-radius: 5px;
    border: 1px solid #374045;
    font-size: 14px;
    width: 200px;
    cursor: pointer;
}

.chat-preset:hover {
    border-color: #005c4b;
}

.chat-preset:focus {
    outline: none;
    border-color: #005c4b;
}

.or-divider {
    color: #8696a0;
    margin: 15px 0;
    font-size: 14px;
}

.loading-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    background-color: #222e35;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.loading-container p {
    color: #e9edef;
    font-size: 16px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #374045;
    border-top: 4px solid #005c4b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 