body {
    font-family:
        "Google Sans",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    margin: 0;
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#chat-window {
    width: 80%;
    max-width: 900px;
    height: 95%;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgb(0 0 0 / 8%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#config-container {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e8eaed;
}

.agent-card-header {
    font-weight: 500;
    font-size: 1.2em;
    color: #202124;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-card-header .chevron {
    transition: transform 0.3s ease-in-out;
}

#config-header {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #202124;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

#config-header .chevron {
    transition: transform 0.3s ease-in-out;
    margin-right: 8px;
}

#config-container.collapsed .chevron {
    transform: rotate(-90deg);
}

#config-body {
    padding: 0 20px 20px;
    max-height: 1000px;
    transition:
        max-height 0.3s ease-in-out,
        padding 0.3s ease-in-out;
    overflow: hidden;
}

#config-container.collapsed #config-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

#agent-card-container {
    padding-top: 20px;
}

#agent-card-container.collapsed .chevron {
    transform: rotate(-90deg);
}

.agent-card-body {
    border-top: 1px solid #e8eaed;
    padding-top: 16px;
    margin-top: 16px;
    transition:
        max-height 0.3s ease-in-out,
        padding 0.3s ease-in-out,
        border 0.3s ease-in-out;
    max-height: 500px;
}

.collapsible {
    background-color: #e8eaed;
    color: #3c4043;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: 1px solid #dadce0;
    text-align: left;
    outline: none;
    font-size: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.collapsible:hover {
    background-color: #e1e3e6;
}

.content {
    padding: 10px 18px;
    display: none;
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 5px;
    border: 1px solid #e8eaed;
}

#chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.config-input-container {
    display: flex;
}

.config-controls-container {
    display: flex;
    align-items: center;
    padding: 10px 0;
}

#message-input-container {
    display: flex;
    align-items: center;
    padding: 20px;
    border-top: 1px solid #e8eaed;
    background-color: #f8f9fa;
}

.auth-toggle {
    display: flex;
    align-items: center;
    margin-left: 16px;
}

#a2a-endpoint,
#message-input {
    flex-grow: 1;
    border: 1px solid #dadce0;
    padding: 12px;
    border-radius: 8px;
    margin-right: 10px;
    font-size: 1em;
}

#a2a-endpoint:focus,
#message-input:focus {
    outline: none;
    border-color: #4285f4;
}

#send-button,
#initialize-button {
    background-color: #4285f4;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition:
        background-color 0.2s,
        box-shadow 0.2s;
}

#send-button:hover,
#initialize-button:hover {
    background-color: #3367d6;
    box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
}

.message {
    margin-bottom: 15px;
    padding: 12px 18px;
    border-radius: 20px;
    max-width: 75%;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message {
    background-color: #4285f4;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background-color: #e8eaed;
    color: #202124;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.typing-indicator {
    display: flex;
    align-items: center;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    margin: 0 2px;
    background-color: #909396;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}
.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%,
    80%,
    100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #f1f3f4;
    border: 1px solid #dadce0;
    padding: 10px;
    border-radius: 8px;
    color: #3c4043;
    max-height: 200px;
    overflow-y: auto;
}

#info-panels {
    display: flex;
    border-top: 1px solid #e8eaed;
    flex-shrink: 0;
}

#debug-container,
#stats-container {
    flex: 1;
}

#debug-toggle,
#stats-toggle {
    width: 100%;
    padding: 10px;
    background-color: #f8f9fa;
    color: #5f6368;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    border-right: 1px solid #e8eaed;
}

#debug-panel,
#stats-panel {
    display: none;
    max-height: 200px;
    overflow-y: scroll;
    background-color: #202124;
    padding: 10px;
    color: #e8eaed;
}

#debug-panel pre,
#stats-panel pre {
    background-color: transparent;
    border: none;
    color: #e8eaed;
    font-size: 0.85em;
}
