/* ==================== 统一提示框样式 ==================== */
.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%) scale(0.9);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    max-width: 400px;
    word-wrap: break-word;
    color: white;
    cursor: pointer;
}

.toast-message.toast-show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.toast-message.toast-success {
    background: #10b981;
}

.toast-message.toast-error {
    background: #ef4444;
}

.toast-message.toast-warning {
    background: #f59e0b;
}

.toast-message.toast-info {
    background: #3b82f6;
}

.toast-message i {
    font-size: 1.1em;
    flex-shrink: 0;
}

/* ==================== 微信分享模态框样式 ==================== */
.wechat-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wechat-share-modal.modal-show {
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.floating-modal {
    position: relative;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.wechat-share-modal.modal-show .floating-modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px 20px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header .fab.fa-weixin {
    color: #07c160;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2em;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background: var(--hover-bg);
    color: var(--text-color);
}

.modal-body {
    padding: 0 20px 20px 20px;
    text-align: center;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
    margin-bottom: 16px;
}

.qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.qr-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.qr-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.retry-qr-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.retry-qr-btn:hover {
    background: var(--primary-hover);
}

.share-tip {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin: 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.copy-link-btn,
.modal-cancel {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-link-btn {
    background: var(--primary-color);
    color: white;
}

.copy-link-btn:hover {
    background: var(--primary-hover);
}

.copy-link-btn.btn-success {
    background: #10b981;
}

.copy-link-btn.btn-error {
    background: #ef4444;
}

.modal-cancel {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.modal-cancel:hover {
    background: var(--hover-bg);
    color: var(--text-color);
}

/* ==================== 手动复制对话框样式 ==================== */
.manual-copy-dialog {
    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: 10001;
}

.dialog-content {
    background: var(--bg-color);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    width: 400px;
}

.dialog-content h4 {
    margin: 0 0 16px 0;
    color: var(--text-color);
}

.copy-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin: 10px 0 16px 0;
    font-family: monospace;
    word-break: break-all;
    background: var(--bg-secondary);
    color: var(--text-color);
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

/* ==================== 微博分享模态框样式 ==================== */
.weibo-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.weibo-share-modal.modal-show {
    opacity: 1;
}

.weibo-share-modal .floating-modal {
    max-width: 450px;
}

.weibo-share-content {
    padding: 0 20px 20px 20px;
    text-align: center;
}

.share-preview {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.share-preview-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 1em;
    line-height: 1.4;
}

.share-preview-desc {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.3;
    margin-bottom: 12px;
}

.share-preview-url {
    color: var(--primary-color);
    font-size: 0.8em;
    word-break: break-all;
    background: rgba(var(--primary-color-rgb), 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.share-platform-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.weibo-icon {
    color: #e6162d;
}

/* ==================== QQ分享模态框样式 ==================== */
.qq-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qq-share-modal.modal-show {
    opacity: 1;
}

.qq-share-modal .floating-modal {
    max-width: 450px;
}

.qq-icon {
    color: #12b7f5;
}

/* ==================== 分享确认操作 ==================== */
.share-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.share-confirm-btn,
.share-cancel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.share-confirm-btn {
    background: var(--primary-color);
    color: white;
}

.share-confirm-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.share-confirm-btn.weibo-btn {
    background: #e6162d;
}

.share-confirm-btn.weibo-btn:hover {
    background: #c41227;
}

.share-confirm-btn.qq-btn {
    background: #12b7f5;
}

.share-confirm-btn.qq-btn:hover {
    background: #0ea5e0;
}

.share-cancel-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.share-cancel-btn:hover {
    background: var(--hover-bg);
    color: var(--text-color);
}

/* ==================== 分享成功提示 ==================== */
.share-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-success-modal.modal-show {
    opacity: 1;
}

.share-success-content {
    padding: 30px;
    text-align: center;
    min-width: 300px;
}

.share-success-icon {
    font-size: 3em;
    color: #10b981;
    margin-bottom: 16px;
    animation: bounceIn 0.6s ease;
}

.share-success-text {
    color: var(--text-color);
    font-size: 1.1em;
    margin-bottom: 8px;
}

.share-success-desc {
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
    .toast-message,
    .notification {
        right: 16px;
        left: 16px;
        max-width: none;
        font-size: 0.9em;
    }
    
    .floating-modal {
        width: 95%;
        margin: 0 16px;
        max-height: 85vh;
    }
    
    .modal-actions,
    .share-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .copy-link-btn,
    .modal-cancel,
    .share-confirm-btn,
    .share-cancel-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 1em;
    }
    
    .share-preview {
        padding: 12px;
    }
    
    .share-preview-title {
        font-size: 0.95em;
    }
    
    .share-preview-desc {
        font-size: 0.85em;
    }
    
    /* 移动端模态框头部优化 */
    .modal-header {
        padding: 16px 16px 0 16px;
        margin-bottom: 16px;
    }
    
    .modal-header h3 {
        font-size: 1.1em;
    }
    
    .modal-body,
    .weibo-share-content {
        padding: 0 16px 16px 16px;
    }
    
    /* 移动端分享成功内容优化 */
    .share-success-content {
        padding: 24px 20px;
    }
    
    .share-success-icon {
        font-size: 2.5em;
        margin-bottom: 12px;
    }
    
    .share-success-text {
        font-size: 1em;
        margin-bottom: 6px;
    }
    
    .share-success-desc {
        font-size: 0.85em;
    }
    
    /* 移动端提示信息优化 */
    .share-tip {
        font-size: 0.85em;
        margin: 12px 0;
    }
    
    /* 移动端按钮触摸优化 */
    .modal-close {
        padding: 8px;
        font-size: 1.1em;
    }
    
    .retry-qr-btn {
        padding: 10px 18px;
        font-size: 0.9em;
    }
    
    /* 移动端原生分享提示 */
    .native-share-tip {
        background: rgba(var(--primary-color-rgb), 0.1);
        border: 1px solid rgba(var(--primary-color-rgb), 0.2);
        border-radius: 8px;
        padding: 12px;
        margin: 16px 0;
        text-align: center;
        color: var(--primary-color);
        font-size: 0.9em;
    }
    
    .native-share-tip i {
        margin-right: 6px;
    }
}

/* ==================== 移动端手势支持 ==================== */
@media (max-width: 768px) and (pointer: coarse) {
    .floating-modal {
        /* 增加触摸目标大小 */
    }
    
    .copy-link-btn,
    .modal-cancel,
    .share-confirm-btn,
    .share-cancel-btn {
        min-height: 44px; /* iOS 推荐的最小触摸目标 */
    }
    
    .modal-close {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ==================== 微信浏览器特殊样式 ==================== */
.wechat-browser-tip {
    background: #07c160;
    color: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin: 16px 0;
    font-size: 0.9em;
}

.wechat-browser-tip i {
    margin-right: 6px;
    font-size: 1.1em;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
