:root {
    --primary-color: #10a37f;
    --secondary-color: #0d8a6f;
    --dark-bg: #202123;
    --light-text: #ffffff;
    --dark-text: #333333;
    --light-bg: #f7f7f8;
    --border-color: #e5e5e5;
    --animation-bg: #202123;
}

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

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-bg);
    display: flex;
    flex-direction: column;
}

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

.chat-header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 15px 20px;
    text-align: center;
    font-size: 1.2em;
    border-bottom: 1px solid var(--secondary-color);
    z-index: 10;
}

.chat-box {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: var(--light-bg);
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 15px;
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 75%;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-message {
    background-color: var(--primary-color);
    color: var(--light-text);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.ai-message {
    background-color: #ffffff;
    color: var(--dark-text);
    align-self: flex-start;
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 5px;
}

/* Animation Container - Modal Style */
.animation-container {
    display: none; /* Hidden by default, only shown during active conversation */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.animation-modal {
    background-color: var(--animation-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 300px;
    min-height: 200px;
    animation: modalSlideIn 0.4s ease-out;
    position: relative;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Circle Animation (First Screenshot) */
.circle-animation {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.circle {
    width: 120px;
    height: 120px;
    background-color: white;
    border-radius: 50%;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Wave Animation (Second Screenshot) */
.wave-animation {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 10px;
}

.pill {
    width: 30px;
    height: 60px;
    background-color: white;
    border-radius: 30px;
}

.pill:nth-child(1) {
    animation: sound-wave 1.5s infinite ease-in-out 0.0s;
}

.pill:nth-child(2) {
    animation: sound-wave 1.5s infinite ease-in-out 0.2s;
}

.pill:nth-child(3) {
    animation: sound-wave 1.5s infinite ease-in-out 0.4s;
}

.pill:nth-child(4) {
    animation: sound-wave 1.5s infinite ease-in-out 0.6s;
}

@keyframes sound-wave {
    0%, 100% {
        height: 30px;
    }
    50% {
        height: 80px;
    }
}

/* Chat Controls */
.chat-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background-color: #ffffff;
    z-index: 10;
}

.status-indicator {
    color: #6c757d;
    font-size: 0.9em;
    text-align: center;
    margin-bottom: 15px;
}

.control-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

.control-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    color: white;
    gap: 8px;
}

.control-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.start-button {
    background-color: var(--primary-color);
}

.start-button:hover:not(:disabled) {
    background-color: var(--secondary-color);
}

.pause-button {
    background-color: #f39c12;
}

.pause-button:hover:not(:disabled) {
    background-color: #e67e22;
}

.stop-button {
    background-color: #e74c3c;
}

.stop-button:hover:not(:disabled) {
    background-color: #c0392b;
}

/* Active Animation States */
.listening .circle-animation {
    display: flex;
}

.speaking .wave-animation {
    display: flex;
}

/* Show animation container when in active state */
.active-conversation {
    display: flex;
}

/* Prevent body scroll when modal is active */
body.modal-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Modal close button */
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.modal-close:hover {
    opacity: 1;
}

/* Status text in modal */
.modal-status {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    opacity: 0.8;
}

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

.chat-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-box::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.chat-box::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Responsive design */
@media (max-width: 768px) {
    .control-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .control-button {
        width: 80%;
        max-width: 200px;
    }
}
