/**
 * 喵呜小手机 - 组件样式
 * 各种UI组件的样式定义
 */

/* ========== 底部导航栏 ========== */
.bottom-nav {
    display: flex;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-sm) 0;
    padding-bottom: calc(var(--spacing-sm) + var(--safe-area-bottom));
    flex-shrink: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs) 0;
    color: var(--text-gray);
    font-size: var(--font-size-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item.active {
    color: var(--theme-primary);
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-icon {
    font-size: 22px;
    margin-bottom: var(--spacing-xs);
    transition: transform var(--transition-bounce);
}

.nav-item span {
    font-size: 11px;
}

.nav-badge {
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: 8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background-color: var(--soft-red);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-dot {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(10px);
    width: 8px;
    height: 8px;
    background-color: var(--soft-red);
    border-radius: 50%;
    border: 1px solid white;
}

/* ========== 页面头部 ========== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    padding-top: calc(var(--spacing-md) + var(--safe-area-top));
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    min-height: var(--header-height);
}

/* API风格头部 (对齐 downloaded_site) */
.api-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background-color: rgba(220, 237, 200, 0.7);
    backdrop-filter: blur(12px);
    color: var(--text-dark);
    flex-shrink: 0;
}

.api-header .back-btn {
    font-size: 20px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.api-header .back-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.api-header .api-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.page-header-green {
    background-color: rgba(129, 199, 132, 0.9);
    color: white;
    border-bottom: none;
}

.page-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    flex-grow: 1;
    text-align: center;
}

.header-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: inherit;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color var(--transition-fast);
}

.header-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.page-header-green .header-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 微博橙色发帖按钮 */
.header-btn-orange {
    background: linear-gradient(135deg, #ff8200 0%, #ff9500 100%);
    color: white !important;
}

.header-btn-orange:hover {
    background: linear-gradient(135deg, #ff9500 0%, #ffa500 100%);
    box-shadow: 0 2px 8px rgba(255, 130, 0, 0.3);
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* ========== 列表项 ========== */
.list-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: white;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.list-item:hover {
    background-color: var(--background-gray);
}

.list-item:active {
    background-color: var(--border-color);
}

.list-item + .list-item {
    border-top: 1px solid var(--border-light);
}

.list-item-avatar {
    margin-right: var(--spacing-md);
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.list-item-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-gray);
}

.list-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: var(--spacing-sm);
}

.list-item-time {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

.list-item-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background-color: var(--soft-red);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== 消息气泡 ========== */
.message-wrapper {
    display: flex;
    max-width: 85%;
    margin-bottom: 2px;
    animation: slideUp 0.3s ease;
}

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

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    margin: 0 var(--spacing-sm);
    flex-shrink: 0;
    visibility: hidden;
}

.message-wrapper.show-avatar .message-avatar {
    visibility: visible;
}

.message-body {
    display: flex;
    flex-direction: column;
}

.message-wrapper.sent .message-body {
    align-items: flex-end;
}

.message-wrapper.received .message-body {
    align-items: flex-start;
}

.message-author {
    font-size: var(--font-size-xs);
    color: var(--text-gray);
    margin-bottom: 4px;
    display: none;
}

.message-wrapper.show-avatar .message-author {
    display: block;
}

.message-bubble {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 18px;
    max-width: 100%;
    word-wrap: break-word;
    white-space: pre-wrap;
    font-size: var(--font-size-base);
    line-height: 1.4;
    position: relative;
}

.message-wrapper.sent .message-bubble {
    background-color: var(--sent-message-bg);
    color: var(--sent-message-text);
    border-top-right-radius: var(--radius-xs);
}

.message-wrapper.received .message-bubble {
    background-color: var(--received-message-bg);
    color: var(--received-message-text);
    border-top-left-radius: var(--radius-xs);
    box-shadow: var(--shadow-sm);
}

.message-time {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
    padding: 0 var(--spacing-xs);
}

/* ========== 输入区域 ========== */
.chat-input-area {
    display: flex;
    align-items: flex-end;
    padding: var(--spacing-sm) var(--spacing-md);
    padding-bottom: calc(var(--spacing-sm) + var(--safe-area-bottom));
    background-color: #f8f9fa;
    border-top: 1px solid var(--border-color);
    gap: var(--spacing-sm);
}

.chat-input-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background-color: var(--background-gray);
    color: var(--text-gray);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.chat-input-btn:hover {
    background-color: var(--border-color);
}

.chat-input-btn:active {
    transform: scale(0.95);
}

.chat-input-field {
    flex: 1;
    min-height: 36px;
    max-height: 100px;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    font-size: var(--font-size-base);
    resize: none;
    outline: none;
    background-color: white;
    line-height: 1.4;
}

.chat-input-field:focus {
    border-color: var(--theme-primary);
}

.chat-send-btn {
    background-color: var(--theme-primary);
    color: white;
}

.chat-send-btn:hover {
    background-color: var(--theme-primary-hover);
}

/* ========== Toast提示 ========== */
.toast {
    position: fixed;
    bottom: calc(80px + var(--safe-area-bottom));
    left: 50%;
    transform: translateX(-50%);
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: var(--font-size-sm);
    border-radius: var(--radius-full);
    z-index: var(--z-toast);
    animation: fadeIn 0.2s ease, fadeOut 0.2s ease 2.8s;
}

.toast.success {
    background-color: var(--color-success);
}

.toast.error {
    background-color: var(--color-danger);
}

.toast.warning {
    background-color: var(--color-warning);
}

/* ========== 弹窗 ========== */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
    z-index: 100;
}

.modal-content {
    width: 90%;
    max-width: 360px;
    max-height: 85%;
    background-color: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.25s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--theme-primary);
    color: white;
}

.modal-title {
    font-size: var(--font-size-md);
    font-weight: 600;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: var(--spacing-sm);
}

/* ========== 表单组 ========== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-gray);
    margin-bottom: var(--spacing-sm);
}

.form-input {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-input:focus {
    border-color: var(--theme-primary);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23757575' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-button {
    width: 100%;
    padding: 15px;
    background-color: var(--theme-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-button:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.form-button:active {
    transform: translateY(0);
}

.form-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-button i {
    font-size: 14px;
}

/* ========== 开关 ========== */
.switch {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    inset: 0;
    background-color: var(--border-color);
    border-radius: var(--radius-full);
    transition: background-color var(--transition-fast);
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .switch-slider {
    background-color: var(--theme-primary);
}

.switch input:checked + .switch-slider::before {
    transform: translateX(20px);
}

/* ========== 标签页 ========== */
.tabs {
    display: flex;
    background-color: white;
    border-bottom: 1px solid var(--border-light);
}

.tab-item {
    flex: 1;
    padding: var(--spacing-md);
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--text-gray);
    cursor: pointer;
    position: relative;
    transition: color var(--transition-fast);
}

.tab-item.active {
    color: var(--theme-primary);
    font-weight: 500;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background-color: var(--theme-primary);
    border-radius: 1px;
}

/* ========== 菜单项 ========== */
.menu-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-lg);
    background-color: white;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.menu-item:hover {
    background-color: var(--background-gray);
}

.menu-item + .menu-item {
    border-top: 1px solid var(--border-light);
}

.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background-color: var(--background-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--theme-primary);
    margin-right: var(--spacing-md);
}

.menu-content {
    flex: 1;
}

.menu-title {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-dark);
}

.menu-desc {
    font-size: var(--font-size-sm);
    color: var(--text-gray);
    margin-top: 2px;
}

.menu-arrow {
    color: var(--text-light);
    font-size: 14px;
}

/* ========== 附件菜单 ========== */
.attachment-menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background-color: white;
    border-top: 1px solid var(--border-light);
}

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

.attachment-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background-color: var(--background-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--theme-primary);
    margin-bottom: var(--spacing-sm);
    transition: transform var(--transition-bounce);
}

.attachment-item:active .attachment-icon {
    transform: scale(0.9);
}

.attachment-label {
    font-size: var(--font-size-xs);
    color: var(--text-gray);
}

/* ========== 表情选择器 ========== */
.emoticon-picker {
    background-color: white;
    border-top: 1px solid var(--border-color);
    max-height: 200px;
    overflow-y: auto;
}

.emoticon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px;
}

.emoticon-item {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.emoticon-item:hover {
    transform: scale(1.1);
}

.emoticon-item:active {
    transform: scale(0.95);
}

/* ========== 红包消息 ========== */
.red-packet-msg {
    display: flex;
    align-items: center;
    padding: 12px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-radius: 12px;
    color: white;
    min-width: 180px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.red-packet-msg:hover {
    transform: scale(1.02);
}

.red-packet-msg.claimed {
    opacity: 0.7;
}

.red-packet-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
}

.red-packet-info {
    flex: 1;
}

.red-packet-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.red-packet-status {
    font-size: 12px;
    opacity: 0.8;
}

/* ========== 转账消息 ========== */
.transfer-msg {
    display: flex;
    align-items: center;
    padding: 12px;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    border-radius: 12px;
    color: white;
    min-width: 180px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.transfer-msg:hover {
    transform: scale(1.02);
}

.transfer-msg.accepted {
    opacity: 0.7;
}

.transfer-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
}

.transfer-info {
    flex: 1;
}

.transfer-amount {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.transfer-label {
    font-size: 12px;
    opacity: 0.8;
}

/* 通话界面样式 */
.call-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    color: white;
}

.call-screen .voice-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.call-screen .video-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.call-screen .remote-video {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-screen .local-video {
    position: absolute;
    top: 80px;
    right: 16px;
    width: 100px;
    height: 140px;
    background: #333;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.call-screen .call-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 60px;
}

.call-screen .contact-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background-size: cover;
    background-position: center;
}

.call-screen .contact-name {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.call-screen .call-status {
    font-size: 16px;
    opacity: 0.8;
}

.call-screen .call-type-badge {
    margin-top: 12px;
    padding: 6px 16px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 13px;
}

.call-screen .incoming-actions {
    display: flex;
    justify-content: space-around;
    padding: 40px 60px 60px;
}

.call-screen .incoming-actions .call-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.call-screen .incoming-actions .call-action i {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.call-screen .incoming-actions .reject i {
    background: #f44336;
}

.call-screen .incoming-actions .answer i {
    background: #4caf50;
}

.call-screen .call-actions {
    padding: 20px 30px 50px;
}

.call-screen .action-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.call-screen .call-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.call-screen .call-action-btn i {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.call-screen .call-action-btn.active i {
    background: white;
    color: #333;
}

.call-screen .call-action-btn span {
    font-size: 12px;
    opacity: 0.8;
}

.call-screen .end-call-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f44336;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 20px auto 0;
    cursor: pointer;
    transition: transform 0.2s;
}

.call-screen .end-call-btn:hover {
    transform: scale(1.1);
}

.call-screen .keypad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.call-screen .keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 24px;
}

.call-screen .keypad-key {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.call-screen .keypad-key:hover {
    background: rgba(255,255,255,0.2);
}

/* ========== 聊天搜索界面 ========== */
.chat-search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    z-index: 150;
    display: flex;
    flex-direction: column;
}

.search-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    padding-top: calc(12px + var(--safe-area-top));
    background: white;
    border-bottom: 1px solid var(--border-light);
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f0f0f0;
    border-radius: 20px;
    padding: 8px 12px;
}

.search-input-wrapper .search-icon {
    color: #999;
    margin-right: 8px;
}

.search-input-wrapper .search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
}

.search-input-wrapper .clear-btn {
    color: #999;
    cursor: pointer;
}

.search-cancel-btn {
    margin-left: 12px;
    color: var(--theme-primary);
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.search-empty, .search-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.search-empty i, .search-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.search-result-item {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f8f8f8;
}

.result-sender {
    font-size: 12px;
    color: var(--theme-primary);
    margin-bottom: 4px;
}

.result-content {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.result-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* ========== 编辑模式 ========== */
.message-wrapper.selected {
    background-color: rgba(129, 199, 132, 0.1);
}

.message-checkbox {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-primary);
    font-size: 20px;
    margin-right: 8px;
}

.edit-mode-bar {
    display: flex;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid var(--border-light);
    gap: 12px;
}

.edit-action-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.edit-action-btn.delete-btn {
    background: #ffebee;
    color: #f44336;
}

.edit-action-btn.favorite-btn {
    background: #fff8e1;
    color: #ffc107;
}

.edit-action-btn.cancel-btn {
    background: #f5f5f5;
    color: #666;
}

/* ========== 回复引用 ========== */
.reply-preview-bar {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: #f0f0f0;
    border-top: 1px solid var(--border-light);
}

.reply-preview-content {
    flex: 1;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-preview-content .sender {
    font-weight: 600;
    color: #333;
}

.reply-cancel {
    color: #999;
    cursor: pointer;
    padding: 4px;
}

.reply-quote {
    background: rgba(0, 0, 0, 0.05);
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 12px;
    border-left: 2px solid var(--theme-primary);
}

.reply-quote .reply-sender {
    color: var(--theme-primary);
    font-weight: 500;
}

.reply-quote .reply-content {
    color: #666;
    margin-left: 4px;
}

/* ========== 心声面板 ========== */
.heart-voice-panel {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 300px;
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 50;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.hv-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.hv-item:last-child {
    border-bottom: none;
}

.hv-icon {
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: #e91e63;
    font-size: 14px;
}

.hv-label {
    font-size: 12px;
    color: #ad1457;
    min-width: 50px;
}

.hv-value {
    flex: 1;
    font-size: 13px;
    color: #880e4f;
}

/* ========== 聊天宠物 ========== */
.chat-pet-container {
    position: fixed;
    bottom: 150px;
    left: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    animation: petBounce 2s ease-in-out infinite;
}

@keyframes petBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.pet-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #ff9800;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
}

.pet-avatar.happy { color: #4caf50; }
.pet-avatar.sleepy { color: #9e9e9e; }
.pet-avatar.excited { color: #e91e63; }
.pet-avatar.curious { color: #2196f3; }
.pet-avatar.hungry { color: #ff5722; }

.pet-avatar:hover {
    transform: scale(1.1);
}

.pet-status {
    margin-top: 4px;
    font-size: 11px;
    color: #666;
    background: white;
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ========== 聊天菜单 ========== */
.chat-options-menu {
    position: absolute;
    top: calc(60px + var(--safe-area-top));
    right: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 160px;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.chat-option-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-option-item:hover {
    background: #f5f5f5;
}

.chat-option-item i {
    margin-right: 10px;
    color: #666;
}

.chat-option-item span {
    font-size: 14px;
    color: #333;
}

.chat-option-divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}

/* ========== 消息高亮 ========== */
.highlight-message {
    animation: highlightFlash 2s ease;
}

@keyframes highlightFlash {
    0%, 100% { background: transparent; }
    25%, 75% { background: rgba(255, 235, 59, 0.3); }
}

/* ========== 聊天头部增强 ========== */
.chat-header .header-actions {
    display: flex;
    gap: 4px;
}

/* ========== 联系人列表选项按钮 ========== */
.list-item-options {
    padding: 8px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.list-item-options:hover {
    color: #666;
}

/* ========== 联系人分组标题 ========== */
.contact-section-title {
    padding: 8px 16px;
    font-size: 13px;
    color: #666;
    background: #f5f5f5;
    display: flex;
    align-items: center;
}

.contact-section-title.collapsible {
    cursor: pointer;
    user-select: none;
}

.contact-section-title.collapsible:hover {
    background: #ebebeb;
}

/* ========== 联系人菜单 ========== */
.contact-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: transparent;
}

.contact-menu {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    overflow: hidden;
    animation: menuSlideIn 0.2s ease;
}

@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.contact-menu .menu-items {
    padding: 4px 0;
}

.contact-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 14px;
}

.contact-menu .menu-item:hover {
    background: #f5f5f5;
}

.contact-menu .menu-item.danger {
    color: #f44336;
}

.contact-menu .menu-item.danger:hover {
    background: #ffebee;
}

.contact-menu .menu-item.active {
    background: #e8f5e9;
}

.contact-menu .menu-divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}

.contact-menu .group-picker {
    padding: 4px 0;
    max-height: 300px;
    overflow-y: auto;
}

/* ========== 幸运字符 ========== */
.lucky-char-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.lucky-char-badge:hover {
    transform: scale(1.05);
}

.lucky-char-common {
    background: linear-gradient(135deg, #81c784, #66bb6a);
    color: white;
}

.lucky-char-rare {
    background: linear-gradient(135deg, #ba68c8, #9c27b0);
    color: white;
}

.lucky-char-legendary {
    background: linear-gradient(135deg, #ffd54f, #ffb300);
    color: #333;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.lucky-char-badge.completed {
    box-shadow: 0 0 10px currentColor;
}

/* ============================================================
   锁屏组件样式 - iOS 真实手机风格
   ============================================================ */

.lock-screen-ios {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    color: white;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

/* 背景 */
.lock-screen-ios .lock-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    filter: blur(0px);
}

.lock-screen-ios .lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.1) 70%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

/* 主内容 */
.lock-screen-ios .lock-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 50px 20px 30px;
}

/* 时间区域 - iOS风格大字体时间 */
.lock-screen-ios .lock-time-section {
    text-align: center;
    margin-bottom: 25px;
}

.lock-screen-ios .lock-time {
    font-size: 72px;
    font-weight: 200;
    letter-spacing: -2px;
    line-height: 1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.lock-screen-ios .lock-date {
    font-size: 18px;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/* 小组件区域 */
.lock-screen-ios .lock-widgets {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding-bottom: 10px;
}

/* 第一行主组件 */
.lock-screen-ios .widget-row-main {
    display: flex;
    gap: 12px;
    min-height: 180px;
}

/* 照片组件 */
.lock-screen-ios .widget-photo {
    flex: 1.2;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.lock-screen-ios .widget-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lock-screen-ios .photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0.5;
}

.lock-screen-ios .photo-placeholder i {
    font-size: 36px;
}

.lock-screen-ios .photo-placeholder span {
    font-size: 13px;
}

.lock-screen-ios .photo-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.lock-screen-ios .photo-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s;
}

.lock-screen-ios .photo-dots span.active {
    background: white;
    width: 18px;
    border-radius: 3px;
}

/* 右侧组件列 */
.lock-screen-ios .widget-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 通用卡片样式 */
.lock-screen-ios .widget-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 22px;
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 倒计时卡片 */
.lock-screen-ios .widget-card.countdown {
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.lock-screen-ios .widget-card.countdown .widget-icon {
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: 14px;
    opacity: 0.7;
}

.lock-screen-ios .widget-card.countdown .widget-icon i {
    color: #ff6b6b;
}

.lock-screen-ios .countdown-num {
    font-size: 38px;
    font-weight: 300;
    color: #fff;
    line-height: 1;
}

.lock-screen-ios .countdown-label {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 2px;
}

.lock-screen-ios .countdown-name {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lock-screen-ios .countdown-empty {
    font-size: 13px;
    opacity: 0.5;
}

/* 备忘录卡片 */
.lock-screen-ios .widget-card.memo {
    justify-content: flex-start;
}

.lock-screen-ios .widget-card.memo .widget-header {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lock-screen-ios .widget-card.memo .widget-header i {
    color: #ffd93d;
}

.lock-screen-ios .memo-text {
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.9;
    cursor: pointer;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.lock-screen-ios .memo-edit {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.lock-screen-ios .memo-edit textarea {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px;
    color: white;
    font-size: 13px;
    resize: none;
    min-height: 50px;
}

.lock-screen-ios .memo-edit textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.lock-screen-ios .memo-btns {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
    font-size: 13px;
}

.lock-screen-ios .memo-btns span {
    cursor: pointer;
    opacity: 0.8;
}

.lock-screen-ios .memo-btns span.save {
    color: #4cd964;
    font-weight: 600;
}

/* 音乐横条 */
.lock-screen-ios .widget-music {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 22px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.lock-screen-ios .music-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
}

.lock-screen-ios .music-info i {
    font-size: 18px;
    color: #ff6b9d;
}

.lock-screen-ios .music-info span {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lock-screen-ios .music-controls {
    display: flex;
    align-items: center;
    gap: 18px;
}

.lock-screen-ios .music-controls i {
    font-size: 18px;
    cursor: pointer;
    opacity: 0.9;
    transition: all 0.15s;
}

.lock-screen-ios .music-controls i:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lock-screen-ios .music-controls i:nth-child(2) {
    font-size: 22px;
}

/* 通知区域 */
.lock-screen-ios .lock-notifications {
    margin-top: auto;
    padding-top: 15px;
}

.lock-screen-ios .notification-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 16px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: notif-slide 0.3s ease-out;
}

@keyframes notif-slide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lock-screen-ios .notif-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.lock-screen-ios .notif-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lock-screen-ios .notif-avatar i {
    font-size: 18px;
    opacity: 0.7;
}

.lock-screen-ios .notif-content {
    flex: 1;
    overflow: hidden;
}

.lock-screen-ios .notif-name {
    font-size: 14px;
    font-weight: 600;
}

.lock-screen-ios .notif-preview {
    font-size: 13px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.lock-screen-ios .notif-badge {
    background: #ff3b30;
    color: white;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* 底部解锁提示 */
.lock-screen-ios .lock-footer {
    text-align: center;
    padding: 20px 0 10px;
    opacity: 0.6;
    font-size: 13px;
}

.lock-screen-ios .lock-footer i {
    display: block;
    margin-bottom: 6px;
    animation: float-up 2s ease-in-out infinite;
}

@keyframes float-up {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(-6px); opacity: 1; }
}

/* 密码输入层 */
.lock-screen-ios .passcode-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lock-screen-ios .passcode-box {
    text-align: center;
}

.lock-screen-ios .passcode-title {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 35px;
    transition: color 0.3s;
}

.lock-screen-ios .passcode-title.error {
    color: #ff3b30;
}

.lock-screen-ios .passcode-dots {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 45px;
}

.lock-screen-ios .passcode-dots .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.15s;
}

.lock-screen-ios .passcode-dots .dot.filled {
    background: white;
    border-color: white;
}

.lock-screen-ios .passcode-dots .dot.error {
    border-color: #ff3b30;
    background: #ff3b30;
    animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.lock-screen-ios .passcode-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 280px;
    margin: 0 auto;
}

.lock-screen-ios .passcode-pad button {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-screen-ios .passcode-pad button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lock-screen-ios .passcode-pad button:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.95);
}

.lock-screen-ios .passcode-pad button.fn {
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 400;
}

.lock-screen-ios .passcode-pad button.fn i {
    font-size: 22px;
}

/* 锁屏相册管理页面样式 */
.lock-screen-gallery .gallery-info {
    padding: 12px 15px;
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lock-screen-gallery .photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 15px;
}

.lock-screen-gallery .photo-item {
    aspect-ratio: 9/16;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #f5f5f5;
}

.lock-screen-gallery .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lock-screen-gallery .photo-item.selected {
    outline: 3px solid #4caf50;
}

.lock-screen-gallery .photo-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 20px;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.lock-screen-gallery .cover-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: white;
}

.lock-screen-gallery .photo-item.add-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    border: 2px dashed #ccc;
}

.lock-screen-gallery .photo-item.add-btn i {
    font-size: 24px;
    margin-bottom: 8px;
}

.lock-screen-gallery .photo-item.add-btn span {
    font-size: 12px;
}

.lock-screen-gallery .edit-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 15px;
    display: flex;
    gap: 12px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.lock-screen-gallery .toolbar-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lock-screen-gallery .toolbar-btn.danger {
    background: #f44336;
    color: white;
}

.lock-screen-gallery .toolbar-btn.danger:disabled {
    background: #ccc;
}

.lock-screen-gallery .add-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px 0;
}

.lock-screen-gallery .add-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 30px;
    background: #f5f5f5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.lock-screen-gallery .add-option:hover {
    background: #e0e0e0;
}

.lock-screen-gallery .add-option i {
    font-size: 32px;
    margin-bottom: 8px;
    color: #666;
}

.lock-screen-gallery .divider {
    text-align: center;
    color: #999;
    margin: 15px 0;
    position: relative;
}

.lock-screen-gallery .divider::before,
.lock-screen-gallery .divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #eee;
}

.lock-screen-gallery .divider::before {
    left: 0;
}

.lock-screen-gallery .divider::after {
    right: 0;
}

/* 图片预览遮罩 */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.preview-container {
    max-width: 90%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-container img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
}

.preview-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.preview-actions button {
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========== 刮刮乐样式 (对齐 downloaded_site) ========== */

/* 刮刮乐格子通用样式 */
.scratch-cell-player {
    background: #fce4e4;
    border-radius: 6px;
    padding: 5px;
    text-align: center;
    border: 2px solid transparent;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

/* 覆盖层 (未刮开) */
.scratch-cell-player.covered {
    background: #bdbdbd;
    border-color: #9e9e9e;
    cursor: pointer;
}

.scratch-cell-player.covered:hover {
    transform: scale(1.05);
    background: #b0b0b0;
}

/* 刮开后 */
.scratch-cell-player.scratched {
    cursor: default;
    background: #fce4e4;
}

/* 中奖的格子 - 高亮 */
.scratch-cell-player.scratched.match {
    border-color: #f44336;
    background: #fff;
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
    transform: scale(1.05);
}

/* 中奖号码样式 (中国红) */
.scratch-cell-winner {
    background: #fffbe6;
    border: 2px solid #fdd835;
    color: #c62828;
    font-weight: bold;
    font-size: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 中国红布局 */
.game-china-red {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #fff;
    border: 2px solid #f44336;
    border-radius: 8px;
    padding: 15px;
}

.china-red-area h3 {
    font-size: 14px;
    color: #333;
    margin: 0 0 8px 0;
    text-align: left;
    padding-bottom: 5px;
    border-bottom: 1px dashed #f44336;
}

.winning-numbers-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.your-numbers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.player-number {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.player-prize {
    font-size: 12px;
    color: #c62828;
    font-weight: 500;
}

/* ========== 股票交易所样式 (对齐 downloaded_site) ========== */

/* 新闻项通用样式 */
.news-item {
    padding: 6px 8px;
    margin-bottom: 4px;
    border-radius: 4px;
    line-height: 1.5;
    animation: newsItemFadeIn 0.5s ease;
}

/* 利好消息 (涨) - 红色 */
.news-item.positive {
    background-color: #fce4e4;
    border-left: 3px solid #f44336;
    color: #c62828;
}

/* 利空消息 (跌) - 绿色 */
.news-item.negative {
    background-color: #e8f5e9;
    border-left: 3px solid #4caf50;
    color: #2e7d32;
}

/* 中性消息 */
.news-item.neutral {
    background-color: #f5f5f5;
    border-left: 3px solid #90a4ae;
    color: #37474f;
}

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

/* 股票标签页样式 */
#stock-tabs-container .feed-tab-btn {
    font-size: 14px;
    padding: 8px 10px;
}

#stock-tabs-container .feed-tab-btn i {
    margin-right: 4px;
}

/* ========== 礼物卡片样式（对齐 downloaded_site） ========== */
.message.gift-card {
    white-space: normal !important;
    background: #fff;
    color: #333;
    width: 150px;
    padding: 15px 12px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.25);
    border: 1px solid rgba(255, 182, 193, 0.3);
    position: relative;
    overflow: hidden;
}

.message.gift-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 192, 203, 0.1), transparent);
    transform: rotate(45deg);
    pointer-events: none;
}

.gift-icon-main {
    font-size: 32px;
    color: #ff8da1;
    margin-bottom: 6px;
    filter: drop-shadow(0 4px 6px rgba(255, 141, 161, 0.3));
}

.gift-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 2px;
}

.gift-price {
    font-size: 12px;
    color: #b2bec3;
    font-weight: 500;
    margin-bottom: 10px;
}

.gift-btn {
    background: #2d3436;
    color: #fff;
    padding: 6px 0;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: block;
    width: 100%;
    border: none;
}

.gift-btn:hover {
    background: #636e72;
}

.gift-btn i {
    margin-right: 4px;
}

/* ========== Ins风格礼物弹窗（对齐 downloaded_site） ========== */
/* 1. 全屏遮罩：带模糊效果 */
.ins-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: insFadeIn 0.3s forwards;
}

/* 2. 弹窗卡片：居中、圆角、阴影 */
.ins-modal-box {
    background: #fff;
    width: 75%;
    max-width: 320px;
    border-radius: 30px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transform: scale(0.8);
    animation: insScaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* 3. 弹窗内容样式 */
.ins-modal-icon {
    font-size: 40px;
    color: #ff8da1;
    margin-bottom: 15px;
}

.ins-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 10px;
    font-family: 'Helvetica Neue', sans-serif;
}

.ins-modal-text {
    font-size: 14px;
    color: #636e72;
    line-height: 1.6;
    margin-bottom: 25px;
    white-space: pre-wrap;
    text-align: left;
    background: #fdfdfd;
    padding: 15px;
    border-radius: 15px;
    border: 1px solid #f5f5f5;
}

/* 4. 关闭按钮 */
.ins-modal-close {
    background: #2d3436;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(45, 52, 54, 0.3);
    transition: transform 0.1s;
}

.ins-modal-close:active {
    transform: scale(0.95);
}

/* 动画关键帧 */
@keyframes insFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes insScaleUp {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}
