:root {
    --primary: #20B2AA;    /* Light sea green */
    --secondary: #48D1CC;  /* Medium turquoise */
    --accent: #00CED1;    /* Dark turquoise */
    --text: #2C3E50;     /* Dark blue-gray */
    --background: #F8FFFF; /* Very light cyan */
    --card-bg: #ffffff;
    --shadow: rgba(32, 178, 170, 0.1);
    --timestamp: #20B2AA80;
}

body {
    font-family: 'Source Serif Pro', serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

/* Top Navigation */
.top-menu {
    background: var(--card-bg);
    box-shadow: 0 2px 10px var(--shadow);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.site-logo {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    font-family: 'Source Sans Pro', sans-serif;
}

.menu-items a {
    color: var(--secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-family: 'Source Sans Pro', sans-serif;
}

.menu-items a:hover {
    background: var(--accent);
    color: white;
}

/* Chat Container */
.chat-container {
    max-width: 1000px;
    margin: 80px auto 20px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 4px 30px var(--shadow);
    display: flex;
    flex-direction: column;
    height: calc(90vh - 100px);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Chat Header */
.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    background: var(--card-bg);
    gap: 1rem;
}

.avatar-main {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.avatar-main:hover {
    transform: scale(1.05);
}

.header-text {
    flex-grow: 1;
}

.header-text h1 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--primary);
    font-family: 'Source Serif Pro', serif;
}

.tagline {
    margin: 0;
    color: var(--accent);
    font-style: italic;
}

/* Chat Messages */
.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    scroll-behavior: smooth;
    background: linear-gradient(to bottom, rgba(32, 178, 170, 0.05), transparent);
}

.message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    animation: messageAppear 0.3s ease forwards;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing Indicator */
.typing-indicator {
    padding: 0.5rem 1rem;
    display: block;  /* Changed from 'none' to 'block' */
}

.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 3px;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.message.user-message {
    flex-direction: row-reverse;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    margin: 0 10px;
}

.message-content {
    max-width: 70%;
    padding: 1rem;
    border-radius: 15px;
    background: var(--background);
    position: relative;
    box-shadow: 0 2px 5px var(--shadow);
}

.user-message .message-content {
    background: var(--accent);
    color: white;
}

.bot-message .message-content {
    background: var(--background);
    border-left: 3px solid var(--accent);
}

/* Chat Input */
.chat-input {
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 1rem;
    background: var(--card-bg);
}

.chat-input input {
    flex-grow: 1;
    padding: 1rem;
    border: 2px solid var(--accent);
    border-radius: 25px;
    font-size: 1rem;
    font-family: 'Source Serif Pro', serif;
    background: var(--card-bg);
    color: var(--text);
}

.chat-input input:focus {
    outline: none;
    box-shadow: 0 0 10px var(--shadow);
}

.chat-input button {
    padding: 1rem 2rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Source Serif Pro', serif;
}

.chat-input button:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

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

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80vh;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: auto;
    border-radius: 10px;
}

.close-modal {
    position: absolute;
    right: -30px;
    top: -30px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

/* Counter Elements */
.counter-trigger {
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    background: transparent;
}

.counter-display {
    display: none;
    position: fixed;
    bottom: 40px;
    right: 20px;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
    font-family: 'Source Sans Pro', sans-serif;
}

#resetConfirm {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 20px var(--shadow);
    z-index: 1001;
    text-align: center;
    font-family: 'Source Sans Pro', sans-serif;
}

#resetConfirm button {
    margin: 0 5px;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: var(--accent);
    color: white;
}

/* Disclaimer */
.disclaimer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(800px, 90%);
    background: rgba(44, 62, 80, 0.95);
    color: white;
    padding: 10px 20px;
    border-radius: 15px 15px 0 0;
    font-size: 0.9rem;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 -4px 20px var(--shadow);
    line-height: 1.4;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .chat-container {
        margin: 60px 1rem 1rem;
        height: calc(100vh - 80px);
    }

    .message-content {
        max-width: 85%;
    }

    .menu-container {
        padding: 0 1rem;
    }

    .avatar-main {
        width: 60px;
        height: 60px;
    }

    .chat-input {
        padding: 1rem;
    }

    .chat-input input {
        padding: 0.8rem;
    }

    .chat-input button {
        padding: 0.8rem 1.5rem;
    }
}
