/* ========================================
   VideoCall - 视频通话样式
   ======================================== */

/* ── Overlay 全屏 ── */
.vc-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    background: linear-gradient(145deg, #0a0a1a 0%, #1a1a2e 40%, #16213e 100%);
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.vc-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ── 顶部状态栏 ── */
.vc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    flex-shrink: 0;
}
.vc-char-name-small {
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    font-weight: 500;
}
.vc-timer {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.vc-close-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.vc-close-btn:hover { background: rgba(255,255,255,0.25); }

/* ── 主画面区 ── */
.vc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 呼叫状态 */
.vc-call-status {
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    margin-bottom: 20px;
    animation: vc-pulse 1.5s ease-in-out infinite;
}
@keyframes vc-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* 头像区域 */
.vc-avatar-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 24px;
}
.vc-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.3);
}
.vc-avatar-ring {
    position: absolute;
    top: -8px; left: -8px; right: -8px; bottom: -8px;
    border-radius: 50%;
    border: 2px solid rgba(102, 126, 234, 0.4);
    animation: vc-ring-breathe 3s ease-in-out infinite;
    z-index: 1;
}
@keyframes vc-ring-breathe {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.08); opacity: 0.8; }
}

/* 说话时的声波动画 */
.vc-avatar.speaking {
    animation: vc-speak 0.3s ease-in-out infinite alternate;
}
@keyframes vc-speak {
    0% { box-shadow: 0 0 40px rgba(102, 126, 234, 0.3); }
    100% { box-shadow: 0 0 60px rgba(102, 126, 234, 0.6), 0 0 100px rgba(102, 126, 234, 0.2); }
}

/* ── 字幕区 ── */
.vc-subtitle {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    transition: opacity 0.4s ease;
    opacity: 0;
    z-index: 10;
}
.vc-subtitle span {
    color: #fff;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    display: block;
}

/* ── 用户小窗 ── */
.vc-self-video {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 100px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    z-index: 10;
    background: #000;
}

/* ── 输入区 ── */
.vc-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    flex-shrink: 0;
}
.vc-speech-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.vc-speech-btn:hover { background: rgba(255,255,255,0.2); }
.vc-speech-btn.recording {
    background: rgba(239, 83, 80, 0.8);
    animation: vc-record-pulse 1s ease-in-out infinite;
}
@keyframes vc-record-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 83, 80, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(239, 83, 80, 0); }
}

.vc-user-input {
    flex: 1;
    height: 44px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: #fff;
    padding: 0 16px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}
.vc-user-input::placeholder { color: rgba(255,255,255,0.35); }
.vc-user-input:focus { border-color: rgba(102, 126, 234, 0.6); }

.vc-send-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}
.vc-send-btn:active { transform: scale(0.92); }

/* ── 通话控制栏 ── */
.vc-controls {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 16px 20px 28px;
    flex-shrink: 0;
}
.vc-ctrl-btn {
    width: 56px; height: 56px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.vc-ctrl-btn:hover { background: rgba(255,255,255,0.2); }
.vc-ctrl-btn.active {
    background: rgba(255,255,255,0.3);
}
.vc-end-btn {
    background: rgba(239, 83, 80, 0.8) !important;
    width: 64px; height: 64px;
    font-size: 28px;
}
.vc-end-btn:hover { background: rgba(239, 83, 80, 1) !important; }

/* ── 通话记录气泡（聊天界面中） ── */
.call-record-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 12px;
    font-size: 13px;
    color: #667eea;
    cursor: pointer;
    transition: background 0.2s;
}
.call-record-bubble:hover {
    background: rgba(102, 126, 234, 0.15);
}
.call-record-bubble .call-icon {
    font-size: 18px;
}
.call-record-bubble .call-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.call-record-bubble .call-duration {
    font-size: 12px;
    color: #999;
}

/* ── 响铃动画 ── */
.vc-calling-dots {
    display: inline-flex;
    gap: 4px;
}
.vc-calling-dots span {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    animation: vc-dot-bounce 1.4s ease-in-out infinite;
}
.vc-calling-dots span:nth-child(2) { animation-delay: 0.2s; }
.vc-calling-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes vc-dot-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}
