:root {
    /* Color Palette */
    --primary-blue: #184073;
    --primary-dark: #0d2542;
    --primary-gradient: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
    --accent-green: #34c759;
    --bg-body: #f0f2f5;
    --bg-container: #f7f8fa;
    --text-main: #1f2329;
    --text-secondary: #646a73;
    --border-light: #e4e6eb;
    
    /* Dimensions */
    --header-height: 64px;
    --mobile-width: 375px;
    --mobile-height: 812px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-body);
}

/* --- Layout Container --- */
.chatbox-container {
    width: var(--mobile-width);
    height: var(--mobile-height);
    max-height: 90vh;
    background-color: var(--bg-container);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 8px solid #1a1a1a;
}

@media (max-width: 480px) {
    .chatbox-container {
        width: 100%;
        height: 100vh;
        max-height: none;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
}

/* --- Header --- */
.chatbox-header-bg {
    background: var(--primary-gradient);
    height: var(--header-height);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(24, 64, 115, 0.15);
}

.chatbox-header {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 11;
}

.digital-human-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: #fff;
    object-fit: cover;
}

.header-title-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.header-title {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

/* Capsule Button */
.capsule-button {
    width: 80px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    margin-left: auto;
    backdrop-filter: blur(8px);
    box-sizing: border-box;
}

.capsule-left { display: flex; gap: 3px; align-items: center; }
.capsule-dot { width: 4px; height: 4px; background-color: #fff; border-radius: 50%; }
.capsule-divider { width: 1px; height: 14px; background-color: rgba(255, 255, 255, 0.25); }
.capsule-right { display: flex; align-items: center; justify-content: center; }
.capsule-circle-icon {
    width: 14px; height: 14px; border: 1.5px solid #fff;
    border-radius: 50%; box-sizing: border-box; position: relative;
}
.capsule-circle-icon::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 4px; height: 4px; background-color: #fff;
    border-radius: 50%; transform: translate(-50%, -50%);
}

/* --- Footer --- */
.chatbox-footer {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background-color: #fff;
    border-top: 1px solid var(--border-light);
}

.chatbox-footer input {
    flex-grow: 1;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 15px;
    outline: none;
    margin-right: 12px;
    background-color: #f5f6f7;
    transition: all 0.2s;
    color: var(--text-main);
}

.chatbox-footer input:focus {
    border-color: var(--primary-blue);
    background-color: #fff;
}

.chatbox-footer button {
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.chatbox-footer button:hover {
    background-color: #f0f2f5;
}
