/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Auth Page Styles */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-box {
    background: white;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
}

.auth-tab.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
    margin-bottom: -2px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.auth-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
    min-height: 20px;
}

/* Chat Page Styles */
.chat-page {
    height: 100vh;
    overflow: hidden;
}

.chat-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px;
    background: #34495e;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: bold;
    font-size: 16px;
    display: block;
}

.online-status {
    font-size: 12px;
    color: #2ecc71;
}

.online-status.offline {
    color: #95a5a6;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    margin-left: 6px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.2);
}

.logout-btn {
    font-size: 12px;
    width: auto;
    padding: 0 10px;
    border-radius: 18px;
}

.lock-btn {
    background: #f39c12;
    font-size: 14px;
}

.friend-requests {
    padding: 15px 20px;
    border-bottom: 1px solid #34495e;
}

.friend-requests h3 {
    font-size: 14px;
    color: #bdc3c7;
    margin-bottom: 10px;
}

.request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #34495e;
}

.request-item:last-child {
    border-bottom: none;
}

.request-actions {
    display: flex;
    gap: 8px;
}

.request-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.request-btn.accept {
    background: #2ecc71;
    color: white;
}

.request-btn.reject {
    background: #e74c3c;
    color: white;
}

.friends-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
}

.friends-list h3 {
    font-size: 14px;
    color: #bdc3c7;
    padding: 0 20px 10px;
}

/* 好友列表项包装器（用于左滑删除） */
.friend-item-wrapper {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
}

.friend-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
    background: #2c3e50;
    z-index: 1;
}

.friend-item-wrapper.swiped .friend-item {
    transform: translateX(-80px);
}

.friend-item:hover,
.friend-item.active {
    background: #34495e;
}

/* 删除按钮 */
.friend-delete-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: #e74c3c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    z-index: 0;
}

.friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

.friend-info {
    flex: 1;
    min-width: 0;
}

.friend-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-status {
    font-size: 12px;
    color: #7f8c8d;
}

.friend-status.online {
    color: #2ecc71;
}

.unread-badge {
    background: #e74c3c;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Chat Main Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #95a5a6;
    font-size: 18px;
}

.chat-window {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.back-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    margin-right: 10px;
    color: #666;
}

.chat-friend-name {
    font-weight: bold;
    font-size: 16px;
}

.typing-indicator {
    font-size: 12px;
    color: #3498db;
    margin-left: 10px;
}

.chat-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s;
    opacity: 0.7;
}

.action-btn:hover {
    background: #e9ecef;
    opacity: 1;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

.load-more {
    text-align: center;
    padding: 10px;
}

.load-more button {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
}

.message {
    display: flex;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.own {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin: 0 10px;
    flex-shrink: 0;
}

.message.own .message-avatar {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.message-content {
    max-width: 60%;
}

.message-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    word-wrap: break-word;
}

.message.own .message-bubble {
    background: #667eea;
    color: white;
}

.message-image {
    max-width: 250px;
    max-height: 250px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.message-image:hover {
    transform: scale(1.02);
}

.message-file {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
}

.message-file-icon {
    font-size: 24px;
    margin-right: 10px;
}

.message-file-info {
    flex: 1;
}

.message-file-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 5px;
}

.message-time {
    font-size: 11px;
    color: #7f8c8d;
    display: block !important;
    min-height: 15px;
}

.message.own .message-time {
    color: #7f8c8d;
    text-shadow: none;
}

.delete-msg-btn {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

.message:hover .delete-msg-btn {
    opacity: 0.6;
}

.delete-msg-btn:hover {
    opacity: 1 !important;
    background: rgba(231, 76, 60, 0.1);
}

/* Location Message */
.message-location {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-location:hover {
    background: #f8f9fa;
}

.location-icon {
    font-size: 28px;
    margin-right: 12px;
}

.location-info {
    flex: 1;
}

.location-name {
    font-weight: 500;
    color: #333;
}

.location-coords {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 2px;
}

/* Voice Message */
.message-voice {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    min-width: 120px;
}

.message-voice:hover {
    background: #f8f9fa;
}

.message-voice.playing {
    background: #e3f2fd;
}

.voice-icon {
    font-size: 18px;
    margin-right: 8px;
}

.voice-wave {
    flex: 1;
    height: 20px;
    background: linear-gradient(to right, #667eea 0%, #667eea 100%);
    background-size: 20px 100%;
    background-repeat: repeat-x;
    border-radius: 10px;
    opacity: 0.5;
}

.message-voice.playing .voice-wave {
    animation: voiceWave 1s ease-in-out infinite;
}

@keyframes voiceWave {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.voice-duration {
    font-size: 12px;
    color: #7f8c8d;
    margin-left: 8px;
}

/* Voice Recorder Modal */
.voice-recorder {
    text-align: center;
    padding: 30px;
}

.recording-status {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.recording-time {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 25px;
    font-family: monospace;
}

.record-btn {
    padding: 12px 24px;
    margin: 5px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

#startRecordBtn {
    background: #e74c3c;
    color: white;
}

#startRecordBtn:hover {
    background: #c0392b;
}

#stopRecordBtn {
    background: #95a5a6;
    color: white;
}

#stopRecordBtn:hover {
    background: #7f8c8d;
}

#sendVoiceBtn {
    background: #2ecc71;
    color: white;
}

#sendVoiceBtn:hover {
    background: #27ae60;
}

/* Chat Input Area */
.chat-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.input-toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.toolbar-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: background 0.3s;
}

.toolbar-btn:hover {
    background: #f0f0f0;
}

.input-row {
    display: flex;
    gap: 10px;
}

#messageInput {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    resize: none;
    font-family: inherit;
    font-size: 15px;
    max-height: 100px;
}

#messageInput:focus {
    outline: none;
    border-color: #667eea;
}

#sendBtn {
    padding: 12px 25px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.3s;
}

#sendBtn:hover {
    background: #5a6fd6;
}

/* Modal Styles */
.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;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

#searchUserInput {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 15px;
}

#searchUserBtn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.search-result-item:last-child {
    border-bottom: none;
}

.add-friend-btn {
    padding: 8px 16px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Image Preview Modal */
.image-preview-modal {
    z-index: 3000;
}

.image-preview-modal .modal-content {
    max-width: 90%;
    max-height: 90vh;
    background: rgba(0, 0, 0, 0.9);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-preview-modal .close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 36px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 3001;
}

.image-preview-modal img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    html, body {
        width: 100%;
        overflow-x: hidden;
    }
    
    .chat-container {
        width: 100%;
        max-width: 100%;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        z-index: 100;
        transform: translateX(0);
        transition: transform 0.3s;
    }
    
    .sidebar.hidden {
        transform: translateX(-100%);
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .user-name {
        font-size: 14px;
    }
    
    .icon-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-left: 4px;
    }
    
    .logout-btn {
        font-size: 11px;
        padding: 0 8px;
    }
    
    .chat-main {
        width: 100%;
    }
    
    .back-btn {
        display: block;
    }
    
    .message-content {
        max-width: 75%;
    }
    
    .message-image {
        max-width: 200px;
        max-height: 200px;
    }
    
    /* Mobile Image Preview */
    .image-preview-modal .modal-content {
        max-width: 100%;
        max-height: 100vh;
        width: 100%;
        height: 100vh;
        border-radius: 0;
        padding: 10px;
    }
    
    .image-preview-modal img {
        max-height: 90vh;
        max-width: 100%;
    }
    
    .image-preview-modal .close-btn {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .auth-box {
        padding: 30px 20px;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* Location Modal Styles */
.location-modal {
    padding: 0;
}

.location-modal-content {
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.location-modal-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(90vh - 70px);
    overflow-y: auto;
}

.location-map {
    height: 350px;
    width: 100%;
    border-radius: 8px;
    min-height: 200px;
}

.location-search-box {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.location-search-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.location-search-btn {
    padding: 10px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.location-info-text {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    min-height: 40px;
}

.location-send-btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    margin-top: 5px;
}

/* Mobile Responsive for Location Modal */
@media (max-width: 768px) {
    .location-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }
    
    .location-modal-body {
        max-height: calc(100vh - 60px);
        padding: 10px;
    }
    
    .location-map {
        height: 50vh;
        min-height: 250px;
        flex: 1;
    }
    
    .location-search-box {
        flex-direction: row;
        gap: 8px;
    }
    
    .location-search-input {
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .location-search-btn {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .location-send-btn {
        padding: 14px;
        font-size: 16px;
        position: sticky;
        bottom: 0;
        margin-top: 10px;
    }
    
    .location-info-text {
        font-size: 14px;
        padding: 12px;
    }
}

/* Small mobile devices */
@media (max-width: 375px) {
    .location-map {
        height: 45vh;
    }
    
    .location-search-btn {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* Location Preview Modal */
.location-preview-modal {
    z-index: 2000;
}

.location-preview-content {
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.location-preview-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.preview-map {
    height: 400px;
    width: 100%;
    border-radius: 8px;
    background: #f0f0f0;
}

.preview-location-info {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
}

.preview-buttons {
    display: flex;
    gap: 10px;
}

.preview-nav-btn {
    flex: 1;
    padding: 12px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.preview-nav-btn:hover {
    background: #27ae60;
}

.preview-close-btn {
    flex: 1;
    padding: 12px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.preview-close-btn:hover {
    background: #7f8c8d;
}

/* Mobile Responsive for Preview Modal */
@media (max-width: 768px) {
    .location-preview-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }
    
    .location-preview-body {
        max-height: calc(100vh - 60px);
        padding: 10px;
    }
    
    .preview-map {
        height: 60vh;
        min-height: 300px;
    }
    
    .preview-buttons {
        flex-direction: column;
    }
    
    .preview-nav-btn,
    .preview-close-btn {
        width: 100%;
        padding: 14px;
    }
}

/* Lock Screen Styles */
.lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.lock-header-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    position: relative;
    height: 60px;
}

.lock-header-bar h2 {
    font-size: 18px;
    margin: 0;
}

.lock-header-bar p {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
}

.lock-time {
    font-size: 24px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.lock-iframe-container {
    flex: 1;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.lock-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Lock button in sidebar */
.lock-btn {
    background: #f39c12;
    color: white;
    font-size: 16px;
}

.lock-btn:hover {
    background: #e67e22;
}

/* Mobile Responsive for Lock Screen */
@media (max-width: 768px) {
    .lock-header-bar {
        padding: 10px 15px;
    }
    
    .lock-header-bar h2 {
        font-size: 16px;
    }
    
    .lock-header-bar p {
        font-size: 11px;
    }
    
    .lock-time {
        font-size: 16px;
    }
}

/* 确认弹框按钮样式 */
.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd6;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* ==================== 视频播放样式 ==================== */

/* 视频消息样式 */
.message-video {
    cursor: pointer;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    max-width: 300px;
}

.message-video .video-thumbnail {
    position: relative;
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-video .video-icon {
    font-size: 48px;
    opacity: 0.8;
}

.message-video .video-play-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #667eea;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.message-video .video-name {
    padding: 8px 12px;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 视频播放弹窗 */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.video-modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    max-width: 90%;
    max-height: 90%;
    width: 800px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
}

.video-modal-title {
    color: #fff;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.video-modal-close {
    color: #999;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.video-modal-close:hover {
    color: #fff;
}

.video-modal-body {
    padding: 0;
    background: #000;
}

.video-player {
    width: 100%;
    max-height: 70vh;
    display: block;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .video-modal-content {
        width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .video-modal {
        padding: 0;
    }
    
    .video-player {
        max-height: 100vh;
    }
}
