body {
    font-family: 'Roboto', sans-serif;
    background-color: #2d2d2a;
    color: #FFFFFF;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 24px;
    margin: 0;
}

.plan-badge {
    background-color: #4B4C55;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
}

.chat-area {
    background-color: #333331;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.greeting {
    font-size: 32px;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    margin-right: 10px;
    font-size: 36px;
}

.message-container {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    max-height: 60vh;
}

.message {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 15px;
}

.user-message {
    background-color: #393937;
    align-self: flex-end;
}

.ai-message {
    background-color: #333331;
    align-self: flex-start;
}

.input-area {
    display: flex;
    flex-direction: column;
    background-color: #393937;
    border-radius: 15px;
    overflow: hidden;
}

textarea {
    width: 100%;
    height: 100px;
    background-color: transparent;
    border: none;
    padding: 10px 15px;
    color: #FFFFFF;
    font-size: 16px;
    resize: none;
    font-family: 'Roboto', sans-serif;
}

textarea::placeholder {
    color: #A9A9B2;
}

.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #333331;
}

.new-chat-btn, .add-content-btn, .send-btn, .settings-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: #FFFFFF;
    padding: 5px 10px;
    font-family: 'Roboto', sans-serif;
}

.new-chat-btn, .settings-btn {
    background-color: #7B61FF;
    border-radius: 15px;
    padding: 10px 15px;
    margin-bottom: 20px;
}

.settings-btn {
    margin-left: 10px;
}

.send-icon {
    width: 24px;
    height: 24px;
    color: #FFFFFF;
}

.recent-chats h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.chat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.chat-item {
    background-color: #333331;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    position: relative;
}

.chat-icon {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.chat-item h4 {
    font-size: 16px;
    margin: 0 0 5px 0;
}

.chat-item p {
    font-size: 14px;
    color: #A9A9B2;
    margin: 0;
}

.view-all {
    color: #7B61FF;
    text-decoration: none;
    font-size: 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
}

.delete-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
    font-size: 18px;
    color: #A9A9B2;
}

.delete-icon:hover {
    color: #FF6B6B;
}

.hidden {
    display: none;
}

.file-input {
    display: none;
}

.file-label {
    cursor: pointer;
    color: #7B61FF;
    text-decoration: underline;
}

/* Add styles for the typing animation */
.loading-message {
    display: inline-block;
    min-width: 80px;
}

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

.modal-content {
    background-color: #333331;
    margin: 15% auto;
    padding: 20px;
    border-radius: 15px;
    width: 80%;
    max-width: 500px;
}

.modal-content h2 {
    margin-top: 0;
}

.modal-content label {
    display: block;
    margin-top: 10px;
}

.modal-content select {
    width: 100%;
    padding: 5px;
    margin-top: 5px;
    background-color: #393937;
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
}

.modal-content button {
    margin-top: 20px;
    padding: 10px 15px;
    background-color: #7B61FF;
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal-content button:last-child {
    background-color: #FF6B6B;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .chat-area {
        padding: 10px;
    }

    .greeting {
        font-size: 24px;
    }

    .logo {
        font-size: 28px;
    }

    .message-container {
        max-height: 50vh;
    }

    .input-area textarea {
        height: 80px;
    }

    .chat-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
}

/* Styles for when added to home screen */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .container {
        height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .chat-area {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    .message-container {
        flex-grow: 1;
        max-height: none;
    }
}