/* 小智控制样式 */
.xiaozhi-device-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.xiaozhi-device-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.xiaozhi-device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.xiaozhi-device-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.xiaozhi-device-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.xiaozhi-device-status.online {
    background: #d4edda;
    color: #155724;
}

.xiaozhi-device-status.offline {
    background: #f8d7da;
    color: #721c24;
}

.xiaozhi-device-info {
    margin-bottom: 12px;
    font-size: 12px;
    color: #666;
}

.xiaozhi-device-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.xiaozhi-action-btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    color: #495057;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.xiaozhi-action-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.xiaozhi-action-btn.primary {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.xiaozhi-action-btn.primary:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
}

.xiaozhi-action-btn.success {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.xiaozhi-action-btn.success:hover {
    background: #218838;
    border-color: #1e7e34;
}

.xiaozhi-action-btn.warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.xiaozhi-action-btn.warning:hover {
    background: #e0a800;
    border-color: #d39e00;
}

.xiaozhi-action-btn.danger {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.xiaozhi-action-btn.danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* 音乐控制区域样式 */
.music-controls {
    margin: 16px 0;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.music-control-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
    opacity: 0.9;
}

.music-control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.music-control-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.music-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.music-control-btn:active {
    transform: scale(0.95);
}

.music-control-btn.play-pause-btn {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.25);
    font-size: 18px;
}

.music-control-btn.play-pause-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.music-control-btn.stop-btn {
    background: rgba(220, 53, 69, 0.8);
}

.music-control-btn.stop-btn:hover {
    background: rgba(220, 53, 69, 1);
}

/* 播放状态指示 */
.music-control-btn.playing {
    background: rgba(40, 167, 69, 0.8);
}

.music-control-btn.playing:hover {
    background: rgba(40, 167, 69, 1);
}

/* 小智控制模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #666;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.xiaozhi-control-section {
    margin-bottom: 20px;
}

.xiaozhi-control-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 标签页样式 */
.xiaozhi-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.xiaozhi-tab {
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    font-size: 13px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.xiaozhi-tab:hover {
    background: #f8f9fa;
    color: #333;
}

.xiaozhi-tab.active {
    background: #667eea;
    color: white;
}

.xiaozhi-tab-content {
    display: none;
}

.xiaozhi-tab-content.active {
    display: block;
}

/* 控制网格 */
.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.control-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.control-item label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.control-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.control-input-group input[type="range"] {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.control-input-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.control-input-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.control-input-group span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: #667eea;
}

/* 表单控件 */
.form-input, .form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 8px;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-range {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.form-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 按钮样式 */
.btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    color: #495057;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.btn-primary {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
}

.btn-outline {
    background: transparent;
    border-color: #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* 背景图片上传样式 */
.background-upload-container {
    margin-top: 10px;
}

.upload-section {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.image-process-options {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
}

.process-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-group label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.size-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.size-inputs input {
    width: 80px;
    font-size: 12px;
}

.size-inputs span {
    font-size: 12px;
    color: #666;
}

.crop-section {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
}

.crop-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.crop-inputs input {
    font-size: 12px;
}

.process-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.image-preview {
    margin: 12px 0;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    position: relative;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-info {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.image-preview .btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    font-size: 12px;
}

.background-url-section {
    margin-top: 12px;
}

.background-gallery {
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.background-gallery h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #333;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.gallery-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.gallery-item .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item .gallery-actions {
    display: flex;
    gap: 4px;
}

.gallery-item .btn {
    padding: 2px 6px;
    font-size: 10px;
}

.gallery-item .btn-danger {
    background: #dc3545;
    color: white;
    border: none;
}

.gallery-item .btn-primary {
    background: #007bff;
    color: white;
    border: none;
}

/* 消息样式 */
.message {
    padding: 10px 15px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 14px;
    display: none;
}

.message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.message.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 16px;
    }
    
    /* 手机端：只针对"其它控制"部分的控制网格改为横向滑动 */
    .other-control-card .control-grid {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 10px;
        scrollbar-width: thin;
        scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
    }
    
    .other-control-card .control-grid::-webkit-scrollbar {
        height: 6px;
    }
    
    .other-control-card .control-grid::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 3px;
    }
    
    .other-control-card .control-grid::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.3);
        border-radius: 3px;
    }
    
    .other-control-card .control-grid::-webkit-scrollbar-thumb:hover {
        background: rgba(102, 126, 234, 0.5);
    }
    
    .other-control-card .control-item {
        flex-shrink: 0;
        min-width: 280px;
        width: 280px;
    }
    
    .xiaozhi-device-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .xiaozhi-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .xiaozhi-tabs {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .process-options-grid {
        grid-template-columns: 1fr;
    }
    
    .crop-inputs {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .gallery-item img {
        height: 60px;
    }
} 

/* 主页面背景图片上传样式 */
.background-upload-container .upload-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.background-upload-container .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.background-upload-container .image-process-options {
    margin: 15px 0;
}

.background-upload-container .process-options-grid {
    grid-template-columns: 1fr;
    gap: 15px;
}

.background-upload-container .option-group {
    margin-bottom: 10px;
}

.background-upload-container .size-inputs {
    gap: 8px;
}

.background-upload-container .size-inputs input {
    width: 100px;
    font-size: 14px;
}

.background-upload-container .crop-inputs {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.background-upload-container .image-preview {
    margin: 15px 0;
    padding: 15px;
}

.background-upload-container .image-preview img {
    max-height: 250px;
}

.background-upload-container .background-url-section {
    margin-top: 15px;
}

.background-upload-container .background-gallery {
    margin-top: 20px;
    padding: 15px;
}

.background-upload-container .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.background-upload-container .gallery-item img {
    height: 100px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .background-upload-container .upload-section {
        flex-direction: column;
    }
    
    .background-upload-container .process-options-grid {
        grid-template-columns: 1fr;
    }
    
    .background-upload-container .crop-inputs {
        grid-template-columns: 1fr;
    }
    
    .background-upload-container .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
} 

/* 裁剪界面样式 */
.crop-interface {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.crop-interface .btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crop-interface .btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.crop-interface .btn-primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.crop-interface .btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.crop-interface .btn-outline {
    background: transparent;
    color: #007bff;
    border-color: #007bff;
}

.crop-interface .btn-outline:hover {
    background: #007bff;
    color: white;
}

.crop-interface .form-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.crop-interface .form-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

#crop-canvas {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #fff;
    display: block;
}

.crop-control-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: center;
}

.crop-control-panel .btn {
    padding: 4px 8px;
    font-size: 11px;
}

.crop-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.crop-info input {
    width: 100%;
    padding: 4px 6px;
    font-size: 11px;
}

.crop-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.crop-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .crop-interface {
        padding: 12px;
        max-width: 100%;
    }
    
    .crop-info {
        grid-template-columns: 1fr;
    }
    
    .crop-control-panel {
        flex-direction: column;
        align-items: center;
    }
    
    .crop-control-panel .btn {
        width: 100%;
        max-width: 120px;
    }
    
    .crop-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .crop-actions .btn {
        width: 100%;
        max-width: 200px;
    }
}

/* 裁剪选择框样式 */
.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.crop-selection {
    position: absolute;
    border: 2px solid #007bff;
    background: transparent;
    pointer-events: none;
}

.crop-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #007bff;
    border: 1px solid white;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
}

.crop-handle:hover {
    background: #0056b3;
    transform: scale(1.2);
} 

/* 好友在线状态样式 */
.friend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
    transition: all 0.2s ease;
}

.friend-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.friend-info {
    flex: 1;
    min-width: 0;
}

.friend-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.friend-username {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.friend-nickname {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

.friend-status {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.friend-status.online {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.friend-status.offline {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.friend-status i {
    font-size: 10px;
}

.friend-device-info {
    margin-top: 4px;
    font-size: 11px;
    color: #666;
}

.device-count {
    color: #28a745;
    font-weight: 500;
}

.last-seen {
    color: #6c757d;
    font-style: italic;
}

.friend-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.friend-actions .btn {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
}

.friend-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 在线状态动画 */
.friend-status.online {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* 好友申请样式 */
.friend-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
}

.friend-request-info {
    flex: 1;
}

.friend-request-info .friend-username {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.friend-request-info .friend-nickname {
    color: #666;
    font-size: 12px;
    margin-right: 8px;
}

.friend-request-info .friend-remark {
    color: #6c757d;
    font-size: 11px;
    font-style: italic;
}

.request-time {
    display: block;
    color: #999;
    font-size: 10px;
    margin-top: 4px;
}

.friend-request-actions {
    display: flex;
    gap: 6px;
}

.friend-request-actions .btn {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
}

/* 好友标签页徽章 */
.friend-tab-badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 4px;
} 

/* 消息模态框样式 */
#message-modal .modal-content {
    max-width: 500px;
    width: 90%;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

#message-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

#message-modal .modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

#message-modal .modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#message-modal .modal-close:hover {
    background: #f0f0f0;
    color: #666;
}

#message-modal .form-group {
    margin-bottom: 16px;
}

#message-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

#message-modal .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s ease;
}

#message-modal .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

#message-modal .friend-info-preview {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 13px;
    color: #666;
    border-left: 3px solid #667eea;
}

#message-modal .friend-info-preview strong {
    color: #333;
    font-weight: 600;
}

#message-modal .friend-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 4px;
}

#message-modal .friend-status.online {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#message-modal .friend-status.offline {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#message-modal .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#message-modal .btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

#message-modal .btn-primary {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

#message-modal .btn-primary:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
}

#message-modal .btn-outline {
    background: transparent;
    color: #667eea;
    border-color: #667eea;
}

#message-modal .btn-outline:hover {
    background: #667eea;
    color: white;
}

/* 移动端适配 */
@media (max-width: 768px) {
    #message-modal .modal-content {
        width: 95%;
        padding: 16px;
    }
    
    #message-modal .form-control {
        min-height: 80px;
    }
    
    #message-modal .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
} 

/* 音频录制样式 */
.audio-section, .music-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.audio-section label, .music-section label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.audio-controls .btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.audio-controls .btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.audio-controls .btn-danger {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.audio-controls .btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

#recording-time {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
    font-family: monospace;
}

#audio-preview {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
}

#recorded-audio {
    width: 100%;
    margin-bottom: 8px;
    border-radius: 4px;
}

#audio-preview .btn {
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 4px;
}

/* 音乐分享样式 */
.music-section .form-control {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.music-section .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.music-section .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #667eea;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.music-section .btn:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
}

/* 录音按钮动画 */
@keyframes recording-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

#stop-record-btn {
    animation: recording-pulse 2s infinite;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .audio-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .audio-controls .btn {
        justify-content: center;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .music-section .form-control {
        margin-bottom: 8px;
    }
    
    #audio-preview .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
} 

/* 微信风格聊天界面样式 */
.chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.chat-container {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    height: 80vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 聊天头部 */
.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.chat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.chat-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-username {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.chat-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-status.online::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
}

.chat-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 聊天消息区域 */
.chat-messages {
    flex: 1;
    background: #f5f5f5;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 80%;
}

.chat-message.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.received {
    align-self: flex-start;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.chat-message-bubble {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    word-wrap: break-word;
    max-width: calc(100% - 40px);
}

.chat-message.sent .chat-message-bubble {
    background: #667eea;
    color: white;
}

.chat-message.received .chat-message-bubble {
    background: white;
    color: #333;
}

.chat-message-time {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
    text-align: center;
}

.chat-message.sent .chat-message-time {
    color: rgba(255, 255, 255, 0.7);
}

/* 聊天输入区域 */
.chat-input-area {
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-input-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.chat-input-tab {
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-input-tab.active {
    background: #667eea;
    color: white;
}

.chat-input-tab:hover:not(.active) {
    background: #f0f0f0;
}

.chat-input-content {
    display: none;
}

.chat-input-content.active {
    display: block;
}

.chat-text-input {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 14px;
    resize: none;
    min-height: 40px;
    max-height: 120px;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-text-input:focus {
    border-color: #667eea;
}

.chat-send-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 12px 24px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    width: 100%;
    justify-content: center;
}

.chat-send-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.chat-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 语音录制样式 */
.chat-voice-area {
    text-align: center;
    padding: 20px;
}

.chat-voice-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.chat-voice-btn:hover {
    background: #5a6fd8;
    transform: scale(1.05);
}

.chat-voice-btn.recording {
    background: #dc3545;
    animation: recording-pulse 1s infinite;
}

.chat-voice-tip {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.chat-voice-time {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 音乐分享样式 */
.chat-music-area {
    padding: 16px;
}

.chat-music-inputs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.chat-music-inputs input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
}

.chat-music-inputs input:focus {
    border-color: #667eea;
}

.chat-music-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
}

.chat-music-btn:hover {
    background: #5a6fd8;
}

/* 录音动画 */
@keyframes recording-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .chat-container {
        width: 100%;
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }
    
    .chat-header {
        padding: 12px 16px;
    }
    
    .chat-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .chat-username {
        font-size: 15px;
    }
    
    .chat-messages {
        padding: 12px;
    }
    
    .chat-input-area {
        padding: 12px;
    }
    
    .chat-text-input {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 消息类型样式 */
.chat-message-audio {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.chat-message-audio-icon {
    font-size: 16px;
}

.chat-message-audio-duration {
    font-size: 12px;
    opacity: 0.8;
}

.chat-message-music {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin: 4px 0;
}

.chat-message-music-icon {
    font-size: 20px;
    color: #667eea;
}

.chat-message-music-info {
    flex: 1;
    min-width: 0;
}

.chat-message-music-title {
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-message-music-artist {
    font-size: 12px;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-message.sent .chat-message-music {
    background: rgba(255, 255, 255, 0.2);
}

.chat-message.sent .chat-message-music-icon {
    color: white;
} 

/* 控制标签样式 */
.control-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 16px;
    gap: 4px;
}

.control-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.control-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.control-tab.active {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.control-tab-content {
    display: none;
}

.control-tab-content.active {
    display: block;
}

/* 控制列表样式 */
.control-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.control-list-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.control-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.control-header i {
    color: #667eea;
    font-size: 16px;
}

.control-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-inputs .form-input,
.control-inputs .form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.control-inputs .form-input:focus,
.control-inputs .form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.control-inputs .btn {
    align-self: flex-start;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .control-tabs {
        margin-bottom: 12px;
        padding: 3px;
    }
    
    .control-tab {
        padding: 8px 12px;
        font-size: 13px;
        gap: 4px;
    }
    
    .control-list-item {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .control-header {
        margin-bottom: 10px;
        font-size: 13px;
    }
    
    .control-inputs {
        gap: 6px;
    }
    
    .control-inputs .form-input,
    .control-inputs .form-select {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .control-inputs .btn {
        padding: 6px 12px;
        font-size: 12px;
        width: auto;
        min-width: 60px;
    }
    
    /* 音乐控制移动端优化 */
    .music-controls {
        padding: 12px;
        margin: 12px 0;
    }
    
    .music-control-title {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .music-control-buttons {
        gap: 8px;
    }
    
    .music-control-btn {
        width: 40px;
        height: 40px;
    }
    
    .music-control-btn.play-pause-btn {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .control-tabs {
        flex-direction: column;
        gap: 2px;
    }
    
    .control-tab {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .control-list-item {
        padding: 10px;
    }
    
    .control-header {
        font-size: 12px;
    }
    
    .control-inputs .form-input,
    .control-inputs .form-select {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    /* 音乐控制超小屏幕优化 */
    .music-controls {
        padding: 10px;
        margin: 10px 0;
    }
    
    .music-control-title {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .music-control-buttons {
        gap: 6px;
    }
    
    .music-control-btn {
        width: 36px;
        height: 36px;
    }
    
    .music-control-btn.play-pause-btn {
        width: 44px;
        height: 44px;
        font-size: 14px;
    }
}
    
    .control-inputs .btn {
        font-size: 11px;
        padding: 5px 10px;
    }
} 