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

body {
    font-family: 'Courier New', monospace;
    background-color: #0f0f0f;
    color: #e0e0e0;
    height: 100vh;
    display: flex;
}

.container {
    display: flex;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

#chat-container {
    flex: 3;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    overflow: hidden;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

header h1 {
    color: #00ff88;
    font-size: 2.2rem;
    margin-bottom: 5px;
}

header p {
    color: #888;
    font-size: 1rem;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 20px;
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
}

.message.user {
    align-self: flex-end;
    background-color: #004400;
    padding: 10px 15px;
    border-radius: 15px 15px 0 15px;
}

.message.assistant {
    align-self: flex-start;
    background-color: #003344;
    padding: 10px 15px;
    border-radius: 15px 15px 15px 0;
}

.message-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

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

.input-area {
    display: flex;
    gap: 10px;
}

#user-input {
    flex: 1;
    padding: 12px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    font-family: inherit;
}

#user-input:focus {
    outline: none;
    border-color: #00ff88;
}

#send-btn {
    padding: 12px 20px;
    background-color: #00ff88;
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: font-family: inherit;
    font-weight: bold;
}

#send-btn:hover {
    background-color: #00cc66;
}

.sidebar {
    flex: 1;
    border-left: 1px solid #333;
    padding: 20px;
    overflow-y: auto;
}

.sidebar h2 {
    color: #00ff88;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

#notes-list {
    margin-bottom: 20px;
}

.note-item {
    background-color: #1a1a1a;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 3px solid #00ff88;
}

.note-title {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.note-title span {
    font-size: 0.8rem;
    color: #888;
}

.note-content {
    font-size: 0.9rem;
    color: #ccc;
}

#add-note-btn {
    width: 100%;
    padding: 12px;
    background-color: #004488;
    color: #e0e0e0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

#add-note-btn:hover {
    background-color: #003366;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 15% auto;
    padding: 25px;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #fff;
}

.modal h2 {
    color: #00ff88;
    margin-bottom: 20px;
}

.modal input, .modal textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    font-family: inherit;
}

.modal input:focus, .modal textarea:focus {
    outline: none;
    border-color: #00ff88;
}

#save-note-btn {
    width: 100%;
    padding: 12px;
    background-color: #00ff88;
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
}

#save-note-btn:hover {
    background-color: #00cc66;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    #chat-container, .sidebar {
        flex: none;
        height: 50%;
    }
    
    .sidebar {
        border-left: none;
        border-top: 1px solid #333;
    }
}