@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background: #0f172a;
    overflow: hidden;
}

.bg-grid {
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;

}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

.glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-strong {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.control-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.end-call-pulse {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    50% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
}

.chat-bubble {
    animation: messageSlide 0.3s ease-out;
    margin-bottom: 12px;
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 消息样式 */
.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.message-header img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.message-sender {
    font-size: 12px;
    font-weight: 500;
}

.message-time {
    font-size: 12px;
    color: #94a3b8;
}

.message-content {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    max-width: 70%;
}

/* 系统消息 */
.message-system .message-sender {
    color: #60a5fa;
}

.message-system .message-content {
    background-color: rgba(30, 64, 175, 0.3);
    color: #ffffff;
}

/* 对方消息 */
.message-other .message-sender {
    color: #a5b4fc;
}

.message-other .message-content {
    background-color: #1e293b;
    color: #ffffff;
    border-top-left-radius: 0;
}

/* 自己的消息 */
.message-self {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.message-self .message-header {
    flex-direction: row-reverse;
}

.message-self .message-sender {
    color: #4ade80;
}

.message-self .message-content {
    background-color: #4f46e5;
    color: #ffffff;
    border-top-right-radius: 0;
}

/* 图片消息样式 */
.message-image-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
}

.message-image-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.message-text {
    word-wrap: break-word;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.audio-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
}

.audio-wave span {
    width: 3px;
    background: #10b981;
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.audio-wave span:nth-child(1) { animation-delay: 0s; height: 40%; }
.audio-wave span:nth-child(2) { animation-delay: 0.1s; height: 70%; }
.audio-wave span:nth-child(3) { animation-delay: 0.2s; height: 100%; }
.audio-wave span:nth-child(4) { animation-delay: 0.3s; height: 60%; }
.audio-wave span:nth-child(5) { animation-delay: 0.4s; height: 30%; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

.video-fade-in {
    animation: videoFadeIn 0.5s ease-out;
}

@keyframes videoFadeIn {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
}

/* 数据绑定标记 - 开发调试时显示
[data-field]::after {
    content: attr(data-field);
    position: absolute;
    top: -18px;
    right: 0;
    background: #f59e0b;
    color: #000;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
}
[data-field]:hover::after { opacity: 1; }
[data-field] { position: relative; }*/

/* 分辨率选项样式 */
.resolution-option {
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s;
}
.resolution-option:hover {
    color: white;
}
.resolution-option.active {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}
.resolution-option.active::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    margin-right: 6px;
    color: #818cf8;
}

/* 更多选项菜单动画 */
#moreOptionsMenu {
    animation: menuFadeIn 0.15s ease-out;
}
@keyframes menuFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
