/* 电话 APP 容器 */
.calling-app-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 7000;
    background-color: #ffffff;
    color: #000000;
    overflow: hidden;
    display: none;
    flex-direction: column;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 页面子容器 */
.calling-page {
    display: none;
    flex: 1;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.calling-page.calling-active {
    display: flex;
}

/* 白色磨砂毛玻璃 */
.calling-frosted-glass {
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

/* 顶部导航栏 */
.calling-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    padding-top: max(50px, calc(44px + env(safe-area-inset-top)));
    z-index: 50;
    min-height: 94px;
    width: 100%;
    box-sizing: border-box;
}

.calling-header-title {
    font-size: 17px;
    font-weight: 600;
}

/* 磨砂胶囊按钮与磨砂圆圈按钮 */
.calling-frosted-capsule-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    color: #000;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calling-frosted-circle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    cursor: pointer;
}

/* 通话记录分段控制器 */
.calling-frosted-segmented-control {
    display: flex;
    padding: 4px;
    border-radius: 24px;
    background-color: rgba(245, 245, 245, 0.8);
}

.calling-seg-item {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    cursor: pointer;
    transition: all 0.2s;
}

.calling-seg-item.calling-active {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.calling-large-title {
    font-size: 32px;
    font-weight: 700;
    padding: 4px 20px 12px 20px;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
}

/* 搜索栏 */
.calling-search-container {
    padding: 4px 20px 12px 20px;
    z-index: 50;
    width: 100%;
    box-sizing: border-box;
}

.calling-search-bar {
    display: flex;
    align-items: center;
    border-radius: 24px;
    padding: 8px 16px;
    height: 44px;
    width: 100%;
    box-sizing: border-box;
}

.calling-search-icon {
    color: #8e8e93;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
    flex-shrink: 0;
}

.calling-search-input {
    border: none;
    background: transparent;
    flex: 1;
    margin: 0 10px;
    font-size: 16px;
    color: #000;
    outline: none;
    min-width: 0;
}
.calling-search-input::placeholder { color: #8e8e93; }

/* 列表区域 */
.calling-list-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 120px;
    position: relative;
    width: 100%;
}

.calling-list-item {
    display: flex;
    align-items: center;
    padding: 0 20px;
    background-color: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

/* 通讯录角色间距增大 */
.calling-contact-page-item .calling-item-content {
    padding: 24px 0 !important;
}

.calling-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #a3b1c6;
    margin-right: 16px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 16px;
    font-weight: 500;
}

.calling-avatar.calling-default-avatar {
    background: linear-gradient(180deg, #9fb2d8, #7a8ebc);
}

.calling-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 0.5px solid #e5e5ea;
}
.calling-list-item:last-child .calling-item-content { border-bottom: none; }

.calling-item-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.calling-item-title {
    font-size: 17px;
    font-weight: 600;
    color: #000;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
}
.calling-item-title.calling-missed { color: #ff3b30; }

.calling-item-subtitle {
    font-size: 14px;
    color: #8e8e93;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 语音留言最多两行截断 */
.calling-vm-transcription-text {
    font-size: 14px;
    color: #8e8e93;
    line-height: 1.35;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

.calling-outgoing-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #8e8e93;
    display: inline-block;
    vertical-align: middle;
}

.calling-item-right {
    display: flex;
    align-items: center;
    color: #8e8e93;
    font-size: 15px;
    gap: 12px;
    margin-left: 12px;
    flex-shrink: 0;
}

.calling-phone-btn-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f2f2f7;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.calling-phone-btn-circle:active {
    background-color: #e5e5ea;
    transform: scale(0.92);
}

.calling-phone-btn-circle svg {
    width: 18px;
    height: 18px;
    fill: #007aff;
}

/* ==========================================================================
   最近通话编辑模式与多选删除样式
   ========================================================================== */
.calling-select-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #c7c7cc;
    display: none;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.calling-recents-editing .calling-select-circle {
    display: flex;
}

.calling-select-circle.calling-selected {
    background-color: #ff3b30;
    border-color: #ff3b30;
}

.calling-select-circle.calling-selected::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

/* 编辑模式底部删除操作栏 */
.calling-recents-edit-bar {
    position: absolute;
    bottom: 24px;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 16px;
    right: 16px;
    height: 64px;
    border-radius: 32px;
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 150;
    box-sizing: border-box;
}

.calling-recents-edit-btn {
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    user-select: none;
}

.calling-recents-btn-all {
    color: #007aff;
}

.calling-recents-btn-delete {
    color: #ff3b30;
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.calling-recents-btn-delete.calling-can-delete {
    opacity: 1;
    pointer-events: auto;
}

.calling-section-title {
    background-color: #ffffff;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #8e8e93;
    position: sticky;
    top: 0;
    z-index: 10;
}

.calling-alphabet-index {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-45%);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #007aff;
    z-index: 20;
}
.calling-alphabet-index span { margin: 1px 0; }

/* 拨号键盘整体下移与白色磨砂圆圈按键 */
.calling-keypad-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 14vh;
    width: 100%;
}
.calling-number-display {
    font-size: 36px;
    font-weight: 400;
    height: 50px;
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: 1px;
    width: 100%;
}
.calling-keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, 76px);
    gap: 16px 28px;
    justify-content: center;
}
.calling-key-btn {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}
.calling-key-btn:active {
    background-color: rgba(230, 230, 230, 0.85);
    transform: scale(0.96);
}
.calling-key-num { font-size: 34px; font-weight: 400; line-height: 1.1; color: #000; }
.calling-key-letters { font-size: 10px; font-weight: 600; color: #8e8e93; letter-spacing: 1.5px; }

.calling-call-action-row {
    display: grid;
    grid-template-columns: repeat(3, 76px);
    gap: 16px 28px;
    justify-content: center;
    margin-top: 20px;
}
.calling-call-btn {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background-color: #34c759;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    grid-column: 2;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}
.calling-call-btn:active { transform: scale(0.96); }
.calling-delete-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #8e8e93;
    grid-column: 3;
    cursor: pointer;
}

/* 语音留言 */
.calling-carrier-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px 14px 20px;
    border-bottom: 0.5px solid #e5e5ea;
    width: 100%;
    box-sizing: border-box;
}
.calling-carrier-title {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
}
.calling-call-carrier-btn {
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 16px;
}
.calling-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #007aff;
    display: inline-block;
    margin-right: 6px;
    flex-shrink: 0;
}
.calling-vm-tag {
    font-size: 10px;
    border: 1px solid #c7c7cc;
    border-radius: 4px;
    padding: 1px 3px;
    color: #8e8e93;
    margin-right: 4px;
    line-height: 1;
    display: inline-block;
}

/* 悬浮胶囊底栏 */
.calling-floating-tab-bar {
    position: absolute;
    bottom: 24px;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 16px;
    right: 16px;
    height: 76px;
    border-radius: 38px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    z-index: 100;
    box-sizing: border-box;
}

.calling-tab-item {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #000000;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.calling-tab-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60px;
    padding: 0 8px;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.calling-tab-item.calling-active .calling-tab-content {
    background-color: #f0f0f2;
    color: #007aff;
    padding: 0 32px;
}

.calling-tab-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3px;
}

.calling-tab-label {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.calling-tab-icon-wrapper svg { fill: currentColor; }
.calling-tab-item.calling-hollow-icon svg { fill: none; stroke: currentColor; }

/* 联系人详情卡片页样式（低饱和白灰色调） */
.calling-detail-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 16px 120px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
}

.calling-detail-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.calling-detail-avatar {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background-color: #e5e5ea;
    color: #8e8e93;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 38px;
    font-weight: 500;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.calling-detail-sub {
    font-size: 13px;
    color: #8e8e93;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.calling-detail-name {
    font-size: 25px;
    font-weight: 700;
    color: #1c1c1e;
    text-align: center;
    letter-spacing: -0.5px;
    word-break: break-word;
}

.calling-detail-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 330px;
    margin-bottom: 20px;
}

.calling-detail-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.calling-detail-action-circle {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    background-color: #f2f2f7;
    color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.15s ease, transform 0.1s ease;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.calling-detail-action-circle:active {
    background-color: #e5e5ea;
    transform: scale(0.96);
}

.calling-detail-card-group {
    width: 100%;
    margin-bottom: 14px;
}

.calling-detail-card-header {
    font-size: 13px;
    color: #8e8e93;
    margin-bottom: 6px;
    margin-left: 8px;
    font-weight: 500;
}

.calling-detail-card {
    background-color: #f2f2f7;
    border-radius: 14px;
    padding: 14px 16px;
    box-sizing: border-box;
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.calling-detail-card-label {
    font-size: 13px;
    color: #8e8e93;
    margin-bottom: 4px;
}

.calling-detail-card-value {
    font-size: 17px;
    color: #1c1c1e;
    font-weight: 500;
    cursor: pointer;
}

.calling-detail-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
}

.calling-detail-history-item:last-child {
    border-bottom: none;
    padding-bottom: 2px;
}

.calling-detail-history-main {
    display: flex;
    flex-direction: column;
}

.calling-detail-history-title {
    font-size: 15px;
    color: #000000;
    font-weight: 500;
    margin-bottom: 2px;
}

.calling-detail-history-sub {
    font-size: 13px;
    color: #8e8e93;
}

.calling-detail-history-time {
    font-size: 14px;
    color: #8e8e93;
}

/* ==========================================================================
   通话全屏页面与悬浮小窗样式 (iOS 风格暗色渐变)
   ========================================================================== */
.calling-in-call-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: radial-gradient(circle at 50% 15%, #244660 0%, #172532 50%, #0d1217 100%);
    color: #ffffff;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: max(46px, env(safe-area-inset-top)) 24px max(40px, env(safe-area-inset-bottom)) 24px;
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
}

.calling-in-call-screen.calling-screen-active {
    display: flex;
}

/* 顶部小窗控制栏 */
.calling-screen-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 44px;
}

.calling-pip-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.calling-pip-btn:active {
    transform: scale(0.92);
    background-color: rgba(255, 255, 255, 0.28);
}

/* 呼叫对象信息区域（含头像与号码） */
.calling-screen-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 4px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 头像波纹环绕容器 */
.calling-avatar-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.calling-avatar-ripple-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid rgba(52, 199, 89, 0.85);
    opacity: 0;
    pointer-events: none;
    box-sizing: border-box;
}

.calling-avatar-wrapper.calling-speaking .calling-avatar-ripple-ring {
    animation: callingWaveRipple 1.5s infinite ease-out;
}

@keyframes callingWaveRipple {
    0% { transform: scale(0.98); opacity: 0.9; }
    50% { transform: scale(1.22); opacity: 0.45; }
    100% { transform: scale(1.42); opacity: 0; }
}

.calling-screen-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: #9fb2d8;
    background-position: center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.calling-screen-name {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    line-height: 1.2;
    max-width: 90%;
    word-break: break-word;
    transition: all 0.3s ease;
}

.calling-screen-sub-badge {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* 拨号/呼叫中状态：中间大头像、大姓名、大号码、隐藏输入与消息框 */
.calling-in-call-screen.calling-state-dialing .calling-screen-info {
    margin-top: 10vh;
}

.calling-in-call-screen.calling-state-dialing .calling-avatar-wrapper {
    width: 110px;
    height: 110px;
    margin-bottom: 14px;
}

.calling-in-call-screen.calling-state-dialing .calling-screen-avatar {
    width: 110px;
    height: 110px;
    font-size: 46px;
    border-width: 3px;
}

.calling-in-call-screen.calling-state-dialing .calling-screen-name {
    font-size: 28px;
    margin-bottom: 4px;
}

.calling-in-call-screen.calling-state-dialing .calling-screen-sub-badge {
    font-size: 16px;
    margin-bottom: 6px;
}

.calling-in-call-screen.calling-state-dialing .calling-screen-status {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.calling-in-call-screen.calling-state-dialing .calling-screen-dialog-wrapper {
    display: none;
}

.calling-in-call-screen.calling-state-dialing .calling-screen-input-row {
    display: none;
}

.calling-in-call-screen.calling-state-dialing .calling-screen-bottom-container {
    padding-bottom: 30px;
}

/* 状态栏：通话时长与动态语音波形 */
.calling-status-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
}

.calling-screen-status {
    font-size: 13px;
    color: #34c759;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.calling-audio-waves {
    display: none;
    align-items: center;
    gap: 3px;
    height: 16px;
}

.calling-avatar-wrapper.calling-speaking ~ .calling-status-container .calling-audio-waves {
    display: inline-flex;
}

.calling-avatar-wrapper.calling-speaking ~ .calling-status-container .calling-screen-status {
    display: none;
}

.calling-wave-bar {
    width: 3px;
    background-color: #34c759;
    border-radius: 2px;
    animation: callingWaveBar 0.8s ease-in-out infinite alternate;
}

.calling-wave-bar:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.calling-wave-bar:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.calling-wave-bar:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.calling-wave-bar:nth-child(4) { height: 16px; animation-delay: 0.45s; }
.calling-wave-bar:nth-child(5) { height: 8px; animation-delay: 0.15s; }

@keyframes callingWaveBar {
    0% { transform: scaleY(0.4); }
    100% { transform: scaleY(1.3); }
}

/* 中间对话消息预览区域 */
.calling-screen-dialog-wrapper {
    flex: 1;
    min-height: 60px;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 8px 0;
    padding: 6px 2px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}
.calling-screen-dialog-wrapper::-webkit-scrollbar {
    display: none;
}

.calling-dialog-bubble {
    max-width: 82%;
    padding: 8px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: callingFadeIn 0.25s ease-out;
}

@keyframes callingFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.calling-dialog-bubble.calling-bubble-user {
    align-self: flex-end;
    background-color: #34c759;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.calling-dialog-bubble.calling-bubble-char {
    align-self: flex-start;
    background-color: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    border-bottom-left-radius: 4px;
}

/* 底部操作整体容器 (防止溢出) */
.calling-screen-bottom-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-shrink: 0;
    box-sizing: border-box;
    padding-bottom: 6px;
}

/* 第一行：输入框及内部 ↑ 发送按键 */
.calling-screen-input-row {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.calling-msg-input {
    width: 100%;
    height: 42px;
    border-radius: 21px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0 44px 0 16px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}
.calling-msg-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.calling-inner-send-btn {
    position: absolute;
    right: 6px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #34c759;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.15s ease;
}
.calling-inner-send-btn:active {
    transform: scale(0.92);
    background-color: #2da84e;
}

/* 第二行：通话控制栏（静音、挂断、视频通话） */
.calling-screen-controls-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    box-sizing: border-box;
}

.calling-screen-ctrl-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.calling-screen-ctrl-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    margin-bottom: 4px;
    transition: background-color 0.15s ease, transform 0.12s ease;
}
.calling-screen-ctrl-btn:active {
    transform: scale(0.92);
    background-color: rgba(255, 255, 255, 0.3);
}

.calling-screen-ctrl-btn.calling-active-toggle {
    background-color: #ffffff;
    color: #000000;
}

/* 大红色通话挂断键 */
.calling-screen-ctrl-btn.calling-end-btn {
    width: 64px;
    height: 64px;
    background-color: #eb3b30;
    box-shadow: 0 4px 16px rgba(235, 59, 48, 0.45);
}
.calling-screen-ctrl-btn.calling-end-btn:active {
    background-color: #d32f2f;
    transform: scale(0.92);
}

.calling-screen-ctrl-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    font-weight: 400;
    white-space: nowrap;
}

/* 悬浮小窗 (低饱和白灰方块卡片，显示头像 + 绿色时长) */
.calling-pip-widget {
    position: absolute;
    top: 70px;
    right: 16px;
    width: 76px;
    height: 76px;
    border-radius: 18px;
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 10000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6px;
    box-sizing: border-box;
    cursor: grab;
    touch-action: none;
    user-select: none;
    transition: transform 0.1s ease;
}

.calling-pip-widget:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.calling-pip-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #34c759;
    background-position: center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.calling-pip-timer {
    font-size: 13px;
    color: #34c759;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
