:root {
    --primary-color: #6a5acd;
    --secondary-color: #9370db;
    --accent-color: #ffa07a;
    --text-color: #333;
    --light-bg: #f9f7ff;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

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

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.section {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.hidden {
    display: none;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--secondary-color);
}

.secondary-btn {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.secondary-btn:hover {
    background-color: #ff8c66;
}

/* Pet Info Styles */
.pet-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.pet-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pet-details {
    flex-grow: 1;
}

.stamina-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 5px 0;
    overflow: hidden;
}

#stamina-fill {
    height: 100%;
    background-color: var(--accent-color);
    width: 100%;
    transition: width 0.3s ease;
}

/* Chat Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 10px;
    margin-bottom: 15px;
    height: 300px;
}

.message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
    max-width: 80%;
}

.user-message {
    background-color: var(--primary-color);
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.pet-message {
    background-color: #e0e0e0;
    align-self: flex-start;
}

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

.chat-input input {
    flex-grow: 1;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 14px;
}

/* Message styling */
.message-container {
    display: flex;
    margin-bottom: 15px;
}

.message-container.user {
    justify-content: flex-end;
}

.message-bubble {
    padding: 12px 15px;
    border-radius: 18px;
    max-width: 80%;
}

.user .message-bubble {
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 5px;
}

.pet .message-bubble {
    background-color: #e9e9eb;
    color: var(--text-color);
    border-bottom-left-radius: 5px;
}

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

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

/* Text-to-speech styles */
.tts-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.tts-toggle.active {
    background-color: var(--accent-color);
}

.tts-toggle:hover {
    transform: scale(1.1);
}

.play-tts-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    margin-left: 8px;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: all 0.2s ease;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.play-tts-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Mood indicators */
.mood-indicator {
    font-size: 12px;
    font-style: italic;
    margin-top: 3px;
}

.mood-happy {
    color: #4caf50;
}

.mood-playful {
    color: #2196f3;
}

.mood-sleepy {
    color: #9e9e9e;
}

.mood-curious {
    color: #ff9800;
}

.mood-affectionate {
    color: #e91e63;
}

.mood-neutral {
    color: #607d8b;
}
