/* voice-call.css - 语音通话模式样式 */

/* ==================== 语音通话模式 ==================== */
/* 通讯录页面 */
.vc-contact-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.vc-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    transition: background 0.15s;
}
.vc-contact-item:active {
    background: rgba(0,0,0,0.05);
}
.vc-contact-avatar {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: linear-gradient(135deg, #e0d5e8, #c9b8d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}
.vc-contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vc-contact-name {
    font-size: 16px;
    color: var(--text-primary);
}
/* 设置页面 */
.vc-settings-section {
    padding: 16px;
}
.vc-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.vc-settings-item:last-child {
    border-bottom: none;
}
.vc-settings-label {
    font-size: 15px;
    color: var(--text-primary);
}
.vc-settings-input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    background: var(--bg-primary);
}
/* 拨号确认弹窗 */
.vc-dial-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.vc-dial-modal.show {
    display: flex;
}
.vc-dial-content {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    width: 280px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.vc-dial-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #e0d5e8, #c9b8d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    overflow: hidden;
}
.vc-dial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vc-dial-name {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
}
.vc-dial-hint {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}
.vc-dial-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.vc-dial-btn {
    padding: 10px 28px;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    cursor: pointer;
}
.vc-dial-btn.cancel {
    background: #f0f0f0;
    color: #666;
}
.vc-dial-btn.call {
    background: #4caf50;
    color: #fff;
}
.vc-dial-btn.call:active {
    background: #43a047;
}
/* 拨号动画页面 */
.vc-dialing-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
}
.vc-dialing-avatar-wrap {
    position: relative;
    margin-bottom: 20px;
}
.vc-dialing-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0d5e8, #c9b8d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}
.vc-dialing-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vc-dialing-ripple {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    animation: vc-ripple 1.5s ease-out infinite;
}
.vc-dialing-ripple:nth-child(2) { animation-delay: 0.5s; }
.vc-dialing-ripple:nth-child(3) { animation-delay: 1s; }
@keyframes vc-ripple {
    0% { width: 100px; height: 100px; opacity: 1; }
    100% { width: 200px; height: 200px; opacity: 0; }
}
.vc-dialing-name {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 8px;
}
.vc-dialing-status {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}
/* 通话界面 */
.vc-active-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-primary);
}
.vc-header {
    padding: 10px 16px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-shrink: 0;
}
.vc-header-name {
    font-size: 17px;
    font-weight: 500;
}
.vc-header-timer {
    font-size: 14px;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}
.vc-messages {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.vc-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
}
.vc-msg-user {
    align-self: flex-end;
    background: #95ec69;
    color: #000;
    border-bottom-right-radius: 4px;
}
.vc-msg-assistant {
    align-self: flex-start;
    background: #fff;
    color: #000;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.vc-msg-loading {
    align-self: flex-start;
    padding: 12px 18px;
}
.vc-msg-loading .vc-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    margin: 0 2px;
    animation: vc-dot-bounce 1.4s ease-in-out infinite;
}
.vc-dots span:nth-child(2) { animation-delay: 0.2s; }
.vc-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes vc-dot-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}
/* 声纹效果 */
.vc-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 36px;
    padding: 0 16px;
    flex-shrink: 0;
}
.vc-waveform-bar {
    width: 3px;
    height: 6px;
    border-radius: 2px;
    background: #4caf50;
    transition: height 0.1s ease;
}
.vc-waveform.active .vc-waveform-bar {
    animation: vc-wave 0.6s ease-in-out infinite alternate;
}
.vc-waveform-bar:nth-child(1) { animation-delay: 0s; }
.vc-waveform-bar:nth-child(2) { animation-delay: 0.1s; }
.vc-waveform-bar:nth-child(3) { animation-delay: 0.2s; }
.vc-waveform-bar:nth-child(4) { animation-delay: 0.3s; }
.vc-waveform-bar:nth-child(5) { animation-delay: 0.15s; }
.vc-waveform-bar:nth-child(6) { animation-delay: 0.25s; }
.vc-waveform-bar:nth-child(7) { animation-delay: 0.05s; }
@keyframes vc-wave {
    0% { height: 6px; }
    100% { height: 28px; }
}
/* 输入区 */
.vc-bottom-area {
    flex-shrink: 0;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(0,0,0,0.06);
}
.vc-input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}
.vc-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.4;
    background: var(--bg-primary);
    outline: none;
    resize: none;
    min-height: 20px;
    max-height: 84px;
    overflow-y: auto;
    font-family: inherit;
}
.vc-mic-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}
.vc-mic-btn.recording {
    background: #f44336;
    color: #fff;
    animation: vc-mic-pulse 1.5s ease-in-out infinite;
}
@keyframes vc-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(244,67,54,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(244,67,54,0); }
}
.vc-send-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #4caf50;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.vc-send-btn:active {
    background: #43a047;
}
.vc-hangup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto;
    padding: 10px 32px;
    border: none;
    border-radius: 24px;
    background: #e53935;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.vc-hangup-btn:active {
    background: #c62828;
}
/* 保存确认弹窗 */
.vc-save-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.vc-save-modal.show {
    display: flex;
}
.vc-save-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    width: 260px;
}
.vc-save-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
}
.vc-save-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.vc-save-btn {
    padding: 8px 24px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}
.vc-save-btn.discard {
    background: #f0f0f0;
    color: #666;
}
.vc-save-btn.save {
    background: #4caf50;
    color: #fff;
}
/* 通话记录日历页 */
.vc-records-page {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.vc-calendar {
    background: #fff;
    padding: 12px;
}
.vc-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 16px;
}
.vc-calendar-nav {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
}
.vc-calendar-title {
    font-size: 16px;
    font-weight: 500;
}
.vc-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
}
.vc-calendar-weekday {
    font-size: 12px;
    color: #999;
    padding: 8px 0;
}
.vc-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.vc-calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    font-size: 14px;
    color: #333;
}
.vc-calendar-day:hover {
    background: #f5f5f5;
}
.vc-calendar-day.other-month {
    color: #ccc;
}
.vc-calendar-day.today {
    background: #f0f4ff;
    font-weight: 500;
}
.vc-calendar-day.selected {
    background: #4caf50;
    color: #fff;
}
.vc-calendar-day.has-records {
    background: rgba(76, 175, 80, 0.1);
}
.vc-calendar-dots {
    position: absolute;
    bottom: 3px;
    display: flex;
    gap: 2px;
}
.vc-calendar-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4caf50;
}
.vc-calendar-day.selected .vc-calendar-dot {
    background: rgba(255,255,255,0.8);
}
/* 记录列表 */
.vc-record-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px;
}
.vc-record-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    cursor: pointer;
}
.vc-record-card:active {
    background: #f9f9f9;
}
.vc-record-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vc-record-assistant {
    font-size: 15px;
    font-weight: 500;
}
.vc-record-time {
    font-size: 12px;
    color: #999;
}
.vc-record-duration {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}
/* 记录详情页 */
.vc-detail-header {
    padding: 16px;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    text-align: center;
}
.vc-detail-date {
    font-size: 14px;
    color: #999;
}
.vc-detail-meta {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}
.vc-detail-assistant {
    font-size: 17px;
    font-weight: 500;
    margin-top: 4px;
}
.vc-detail-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px;
    background: #fff;
}
.vc-detail-nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}
.vc-detail-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.vc-detail-nav-text {
    font-size: 13px;
    color: #999;
}
.vc-detail-messages {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.vc-detail-msg {
    max-width: 80%;
}
.vc-detail-msg-name {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}
.vc-detail-msg-user .vc-detail-msg-name {
    text-align: right;
}
.vc-detail-msg-user {
    align-self: flex-end;
}
.vc-detail-msg-assistant {
    align-self: flex-start;
}
.vc-detail-msg-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
}
.vc-detail-msg-user .vc-detail-msg-bubble {
    background: #95ec69;
    color: #000;
    border-bottom-right-radius: 4px;
}
.vc-detail-msg-assistant .vc-detail-msg-bubble {
    background: #fff;
    color: #000;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.vc-detail-play-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    color: #4caf50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: 4px;
}
.vc-detail-play-btn:active {
    opacity: 0.6;
}
/* PWA standalone 适配 */
html.standalone .vc-header {
    padding-top: env(safe-area-inset-top, 0px);
}
html.standalone .vc-bottom-area {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* 语音通话图标 */
.app-voice-call .app-icon-img {
    background: linear-gradient(135deg, #5b86e5 0%, #36d1dc 100%);
}
