:root {
    --brand-primary: #FF6B6B;
    --brand-primary-light: #FF8E8E;
    --brand-primary-dark: #EE5253;
    --bg-page: #FFFBF2;
    /* 暖黄色背景 */
    --bg-surface: #FFFFFF;
    --bg-subtle: #F9F3E8;
    /* 略深的暖黄背景，用于分割或触感反馈 */
    --text-title: #2D3436;
    --text-body: #636E72;
    --text-caption: #B2BEC3;
    --text-white: #FFFFFF;
    --divider: #ECE4D9;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-page);
    color: var(--text-body);
    font-family: 'Inter', -apple-system, sans-serif;
    overflow-x: hidden;
    height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 角色列表容器增强 */
#role-selection-wrapper {
    padding-top: 24px;
}

.logo {
    display: none;
    /* 在本设计中隐藏原始 logo */
}

.page-header h1 {
    font-size: 32px;
    color: var(--text-title);
}

.page-header p {
    color: var(--text-body);
    font-size: 14px;
    margin-top: 4px;
}

/* 角色列表 (通讯录风格) */
.role-grid {
    padding: 0;
    flex: 1;
    overflow-y: auto;
}

.role-card {
    background: transparent;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: none;
}

.role-card:active {
    background: var(--bg-subtle);
}

.role-card.selected {
    border-color: var(--brand-primary);
}

.avatar-container {
    width: 48px;
    height: 48px;
    background: var(--bg-subtle);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.role-info {
    margin-left: 16px;
    flex: 1;
}

.role-info h3 {
    font-size: 16px;
    color: var(--text-title);
    margin-bottom: 2px;
}

.role-info p {
    font-size: 13px;
    color: var(--text-body);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.check-mark {
    width: 24px;
    height: 24px;
    color: var(--brand-primary);
    display: none;
}

.role-card.selected .check-mark {
    display: block;
}

/* 通话界面 */
.call-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-page);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.call-header {
    padding: 40px 24px 0;
}

.call-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.role-brief h2 {
    font-size: 28px;
    color: var(--text-title);
    margin-bottom: 4px;
}

.mode-toggle-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    padding: 8px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-body);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.switch-box {
    width: 32px;
    height: 18px;
    background: #e2e8f0;
    border-radius: 100px;
    position: relative;
    transition: background 0.3s;
}

.switch-dot {
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: left 0.3s;
}

.mode-toggle-compact.active .switch-box {
    background: var(--brand-primary);
}

.mode-toggle-compact.active .switch-dot {
    left: 16px;
}

.breath-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.breath-pulse {
    width: 160px;
    height: 160px;
    background: var(--brand-primary);
    border-radius: 50%;
    opacity: 0.1;
    animation: pulse 2s infinite ease-in-out;
}

.breath-core {
    width: 72px;
    height: 72px;
    background: var(--brand-primary);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.3;
    }

    100% {
        transform: scale(0.8);
        opacity: 0.1;
    }
}

/* 通话控制 */
.bottom-controls {
    padding: 0 24px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.action-hint {
    font-size: 12px;
    color: var(--text-caption);
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.main-actions {
    display: flex;
    align-items: center;
    gap: 32px;
}

.secondary-btn {
    width: 56px;
    height: 56px;
    background: var(--bg-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-body);
    box-shadow: var(--shadow);
    cursor: pointer;
    border: none;
}

.secondary-btn.active {
    color: var(--brand-primary);
}

.primary-btn {
    width: 88px;
    height: 88px;
    background: var(--brand-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.primary-btn:active {
    transform: scale(0.95);
}

.primary-btn.hanging-up {
    background: #FF4757;
}

/* 文字记录区域 */
.transcript-box {
    width: 100%;
    padding: 24px;
    font-size: 14px;
    color: var(--text-body);
    max-height: 100px;
    overflow-y: auto;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* 状态标签 */
#status {
    position: fixed;
    top: 24px;
    right: 24px;
    font-size: 12px;
    color: var(--text-caption);
    background: var(--bg-surface);
    padding: 4px 12px;
    border-radius: 100px;
    box-shadow: var(--shadow);
}