/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* CSS变量定义 */
:root {
    --primary: #1E3A8A;
    --primary-light: #3B82F6;
    --secondary: #2E8B57;
    --accent: #FF6B35;
    --power: #4FC3F7;
    --diesel: #FF9800;
    --light: #F8FFF8;
    --dark: #2F4F4F;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.15);
    --border-radius-sm: 6px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 25px;
}

/* 全局标题栏样式 */
.global-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.global-title {
    font-size: 1.3em;
    font-weight: bold;
    margin: 0;
}

/* 用户菜单样式 */
.user-menu {
    position: relative;
}

.user-icon {
    background: rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
    padding: 10px 14px;
    border-radius: var(--border-radius-xl);
    cursor: pointer;
    font-size: 1.3em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.user-icon:hover {
    background: rgba(255,255,255,0.4);
    border-color: rgba(255,255,255,0.8);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(168, 85, 247, 0.95) 100%) !important;
    backdrop-filter: blur(20px) !important;
    border-radius: 15px !important;
    padding: 8px !important;
    min-width: 200px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    display: none !important;
    z-index: 1000 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    animation: dropdownFadeIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-menu.show {
    display: block !important;
}

.dropdown-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
    font-weight: 500 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    margin-bottom: 4px !important;
    border: 1px solid transparent !important;
}

.dropdown-item:last-child {
    margin-bottom: 0 !important;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    transform: translateX(5px) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.dropdown-item.danger {
    background: rgba(239, 68, 68, 0.2) !important;
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.4) !important;
}

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
    margin: 6px 12px;
}

.welcome-text {
    padding: 12px 16px;
    color: var(--gray-700);
    font-size: 0.9em;
    font-weight: 600;
    border-bottom: 1px solid var(--gray-300);
    margin-bottom: 4px;
    background: var(--gray-100);
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
}

/* 通用容器样式 */
.container {
    min-height: 100vh;
    background: rgba(255,255,255,0.95);
}

/* 页面头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 20px 15px;
    text-align: center;
    position: relative;
}

.workshop-title {
    font-size: 1.6em;
    margin-bottom: 8px;
    font-weight: bold;
}

.workshop-subtitle {
    font-size: 1em;
    opacity: 0.9;
    margin-bottom: 10px;
}

.unit-info {
    background: rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: var(--border-radius-md);
    margin: 8px auto;
    max-width: 300px;
    font-size: 0.85em;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 10px 20px;
    border-radius: var(--border-radius-xl);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 100px;
}

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

.action-btn.production {
    border-color: #FFD700;
}

.action-btn.power {
    border-color: var(--power);
}

.action-btn.diesel {
    border-color: var(--diesel);
}

/* 卡片样式 */
.card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-200);
}

.card-title {
    font-size: 1.3em;
    color: var(--primary);
    font-weight: 600;
}

/* 统计网格样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 8px;
    padding: 15px;
    height: calc(100vh - 200px);
    max-height: 500px;
}

.stat-card {
    background: white;
    padding: 15px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 0;
}

.stat-card.production {
    border-top: 4px solid var(--secondary);
}

.stat-card.power {
    border-top: 4px solid var(--power);
}

.stat-card.diesel {
    border-top: 4px solid var(--diesel);
}

.stat-icon {
    font-size: 1.8em;
    margin-bottom: 8px;
}

.stat-title {
    font-size: 0.85em;
    color: var(--dark);
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.2;
}

.stat-value {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 4px;
    line-height: 1.2;
}

.stat-value.production {
    color: var(--secondary);
}

.stat-value.power {
    color: var(--power);
}

.stat-value.diesel {
    color: var(--diesel);
}

.stat-unit {
    font-size: 0.75em;
    color: var(--gray-600);
}

.stat-period {
    font-size: 0.7em;
    color: var(--gray-500);
    margin-top: 4px;
}

.breakdown {
    margin-top: 6px;
    font-size: 0.7em;
    color: var(--gray-600);
    line-height: 1.3;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9em;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-md);
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn.power {
    background: var(--power);
}

.submit-btn.diesel {
    background: var(--diesel);
}

/* 消息样式 */
.message {
    padding: 12px;
    border-radius: var(--border-radius-md);
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.message.error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid var(--warning);
    color: #856404;
    padding: 15px;
    border-radius: var(--border-radius-md);
    margin-bottom: 20px;
    font-size: 0.9em;
}

/* 移动端优化 */
@media (max-width: 480px) {
    .stats-grid {
        gap: 6px;
        padding: 12px;
    }
    
    .stat-card {
        padding: 12px 8px;
    }
    
    .stat-icon {
        font-size: 1.5em;
    }
    
    .stat-value {
        font-size: 1.2em;
    }
    
    .stat-title {
        font-size: 0.8em;
    }
    
    .action-btn {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 90px;
    }
}

@media (max-width: 360px) {
    .workshop-title {
        font-size: 1.4em;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
    
    .stat-card {
        padding: 10px 6px;
    }
    
    .stat-value {
        font-size: 1.1em;
    }
}

/* 添加数据按钮和容器样式 */
.add-data-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    position: relative;
}

.add-data-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: var(--border-radius-xl);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    min-width: 140px;
}

.add-data-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.add-data-btn:active {
    transform: translateY(0);
}

/* 添加数据菜单样式 */
.add-data-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 8px;
    min-width: 180px;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.add-data-menu.show {
    display: block;
}

.add-data-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    border-radius: var(--border-radius-md);
    transition: all 0.2s ease;
    font-size: 14px;
    color: var(--dark);
}

.add-data-item:hover {
    background: var(--gray-100);
    transform: translateX(2px);
}

.add-data-item.production:hover {
    background: rgba(46, 139, 87, 0.1);
    color: var(--secondary);
}

.add-data-item.power:hover {
    background: rgba(79, 195, 247, 0.1);
    color: var(--power);
}

.add-data-item.diesel:hover {
    background: rgba(255, 152, 0, 0.1);
    color: var(--diesel);
}

/* 自定义提示模态框样式 */
.custom-prompt-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-prompt-modal.show {
    display: flex;
    opacity: 1;
}

.custom-prompt-content {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: modalSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.custom-prompt-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.custom-prompt-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.custom-prompt-message {
    font-size: 16px;
    color: var(--gray-700);
    margin-bottom: 25px;
    line-height: 1.6;
}

.custom-prompt-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.custom-prompt-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-xl);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.custom-prompt-btn.cancel {
    background: var(--gray-200);
    color: var(--gray-700);
}

.custom-prompt-btn.cancel:hover {
    background: var(--gray-300);
}

.custom-prompt-btn.confirm {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.custom-prompt-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

/* 通用模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 模态框头部样式 */
.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 20px 25px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* 表单容器样式 */
.modal form {
    padding: 25px;
}

/* 单位信息框样式 */
.unit-info-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-md);
    padding: 15px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.6;
}

.unit-info-box strong {
    color: var(--primary);
    font-weight: 600;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* 全局通知弹窗样式 */
.notification-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-modal.show {
    display: flex;
    opacity: 1;
}

.notification-modal-content {
    background: white;
    border-radius: 12px;
    padding: 35px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: notificationSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-align: center;
}

@keyframes notificationSlideIn {
    from {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.notification-modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: notificationIconBounce 0.6s ease;
}

@keyframes notificationIconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.notification-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1E3A8A;
    margin-bottom: 20px;
}

.notification-modal-message {
    font-size: 16px;
    color: #495057;
    line-height: 1.8;
    margin-bottom: 15px;
    white-space: pre-line;
    text-align: left;
    background: rgba(248, 249, 250, 0.8);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #1E3A8A;
}

.notification-modal-message strong {
    color: #1E3A8A;
    font-weight: 700;
}

.notification-modal-time {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.notification-modal-hint {
    font-size: 12px;
    color: #ffc107;
    margin-bottom: 25px;
    padding: 8px 15px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 6px;
    border: 1px dashed #ffc107;
}

.notification-modal-buttons {
    display: flex;
    justify-content: center;
}

.notification-confirm-btn {
    padding: 12px 40px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
}

.notification-confirm-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.notification-confirm-btn:active {
    transform: translateY(0);
}

.notification-cancel-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    margin-left: 10px;
}

.notification-cancel-btn:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.notification-cancel-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
        overflow-y: auto;
        margin-bottom: env(safe-area-inset-bottom, 20px);
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .modal form {
        padding: 20px;
    }
    
    .add-data-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
    
    .notification-modal-content {
        padding: 25px;
        margin: 5% auto;
        max-height: 80vh;
        overflow-y: auto;
        margin-bottom: env(safe-area-inset-bottom, 20px);
    }
    
    .notification-modal-icon {
        font-size: 48px;
    }
    
    .notification-modal-title {
        font-size: 20px;
    }
    
    .notification-modal-message {
        font-size: 14px;
    }
    
    .custom-prompt-content {
        margin: 10% auto;
        max-height: 70vh;
        overflow-y: auto;
        margin-bottom: env(safe-area-inset-bottom, 20px);
    }
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    margin-top: 40px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
}

.footer p {
    margin: 5px 0;
}

.developer-info {
    font-size: 11px;
    opacity: 0.9;
}

.developer-link {
    color: #FFD700;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.developer-link:hover {
    color: #FFF;
    text-decoration: underline;
}

/* 反馈消息样式 */
.feedback {
    padding: 12px 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.feedback.success {
    background: rgba(40, 167, 69, 0.1) !important;
    border: 1px solid #28a745 !important;
    color: #28a745 !important;
}

.feedback.error {
    background: rgba(220, 53, 69, 0.1) !important;
    border: 1px solid #dc3545 !important;
    color: #dc3545 !important;
}

.feedback.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

/* ========================================
   幽默说明弹窗样式
   ======================================== */
.humor-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(15px) !important;
    z-index: 10001 !important; /* 比欢迎弹窗更高 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.humor-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border-radius: 25px !important;
    max-width: 500px !important;
    width: 100% !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4) !important;
    animation: humorBounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    border: 3px solid #3b82f6 !important;
    overflow: visible !important; /* 改为visible，避免按钮被裁剪 */
    position: relative !important;
    z-index: 10002 !important;
}

@keyframes humorBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.humor-modal-icon {
    text-align: center !important;
    font-size: 80px !important;
    margin: 30px 0 20px !important;
    animation: humorIconBounce 2s infinite ease-in-out !important;
}

@keyframes humorIconBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-8px);
    }
}

.humor-modal-title {
    text-align: center !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1e40af !important;
    margin: 0 0 25px !important;
    padding: 0 30px !important;
}

.humor-modal-body {
    padding: 0 30px 25px !important;
    text-align: center !important;
}

.humor-text {
    font-size: 18px !important;
    line-height: 1.7 !important;
    color: #1f2937 !important;
    margin-bottom: 20px !important;
}

.humor-text strong {
    color: #1e40af !important;
    font-weight: 600 !important;
}

.humor-subtext {
    font-size: 16px !important;
    color: #6b7280 !important;
    margin: 0 !important;
    font-style: italic !important;
}

.humor-modal-footer {
    padding: 20px 30px 30px !important;
    display: flex !important;
    gap: 15px !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 10002 !important; /* 确保按钮区域在最上层 */
    pointer-events: auto !important;
}

.humor-btn {
    flex: 1 !important;
    padding: 15px 25px !important;
    border: none !important;
    border-radius: 15px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    position: relative !important;
    z-index: 10002 !important; /* 确保按钮在最上层 */
    pointer-events: auto !important; /* 确保可以点击 */
    user-select: none !important; /* 防止文字选择干扰 */
}

.humor-btn-cancel {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
    color: white !important;
}

.humor-btn-cancel:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(107, 114, 128, 0.4) !important;
}

.humor-btn-continue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white !important;
}

.humor-btn-continue:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4) !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .humor-modal-content {
        margin: 20px !important;
        max-width: calc(100% - 40px) !important;
    }
    
    .humor-modal-icon {
        font-size: 60px !important;
        margin: 20px 0 15px !important;
    }
    
    .humor-modal-title {
        font-size: 24px !important;
        padding: 0 20px !important;
    }
    
    .humor-modal-body {
        padding: 0 20px 20px !important;
    }
    
    .humor-text {
        font-size: 16px !important;
    }
    
    .humor-subtext {
        font-size: 14px !important;
    }
    
    .humor-modal-footer {
        padding: 15px 20px 25px !important;
        flex-direction: column !important;
    }
    
    .humor-btn {
        width: 100% !important;
        margin-bottom: 10px !important;
    }
    
    .humor-btn:last-child {
        margin-bottom: 0 !important;
    }
}

/* ========================================
   重要：欢迎弹窗样式（防止丢失）
   ======================================== */
.welcome-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    z-index: 10000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.welcome-modal-content {
    background: white !important;
    border-radius: 20px !important;
    max-width: 600px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3) !important;
    animation: welcomeSlideIn 0.5s ease-out !important;
}

@keyframes welcomeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.welcome-modal-header {
    text-align: center !important;
    padding: 30px 30px 20px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-radius: 20px 20px 0 0 !important;
}

.welcome-modal-icon {
    font-size: 48px !important;
    margin-bottom: 15px !important;
}

.welcome-modal-title {
    font-size: 24px !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.welcome-modal-body {
    padding: 30px !important;
}

.welcome-info-section,
.welcome-features-section,
.welcome-tips-section {
    margin-bottom: 25px !important;
}

.welcome-info-section h3,
.welcome-features-section h3,
.welcome-tips-section h3 {
    color: #374151 !important;
    margin-bottom: 15px !important;
    font-size: 18px !important;
}

.login-info-box {
    background: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px !important;
}

.login-info-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 10px !important;
}

.login-info-item:last-child {
    margin-bottom: 0 !important;
}

.login-info-label {
    font-weight: 500 !important;
    color: #64748b !important;
}

.login-info-value {
    font-family: "Courier New", monospace !important;
    background: #3b82f6 !important;
    color: white !important;
    padding: 4px 12px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

/* 登录指引步骤 */
.login-guide-step {
    display: flex !important;
    align-items: flex-start !important;
    gap: 15px !important;
    margin-bottom: 20px !important;
    padding: 15px !important;
    background: white !important;
    border-radius: 10px !important;
    border-left: 4px solid #3b82f6 !important;
    transition: all 0.3s ease !important;
}

.login-guide-step:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15) !important;
    transform: translateX(5px) !important;
}

.login-guide-step:last-child {
    margin-bottom: 0 !important;
}

.step-number {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%) !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

.step-content {
    flex: 1 !important;
}

.step-content strong {
    display: block !important;
    color: #1e293b !important;
    font-size: 15px !important;
    margin-bottom: 6px !important;
}

.step-content p {
    color: #64748b !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

.welcome-features-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.welcome-features-list li {
    padding: 8px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #475569 !important;
}

.welcome-features-list li:last-child {
    border-bottom: none !important;
}

.welcome-tips-section p {
    color: #64748b !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* 开发者联系方式 */
.developer-contact {
    background: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 15px !important;
    margin: 15px 0 !important;
}

.contact-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.contact-item:last-child {
    border-bottom: none !important;
}

.contact-label {
    font-weight: 600 !important;
    color: #475569 !important;
    font-size: 14px !important;
    min-width: 60px !important;
}

.contact-value {
    color: #1e293b !important;
    font-size: 14px !important;
    text-align: right !important;
}

.contact-link {
    color: #3b82f6 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.3s ease !important;
}

.contact-link:hover {
    color: #1e40af !important;
    text-decoration: underline !important;
}

.contact-note {
    font-size: 13px !important;
    color: #64748b !important;
    text-align: center !important;
    font-style: italic !important;
    margin-top: 10px !important;
}

.welcome-modal-footer {
    padding: 20px 30px 30px !important;
}

.welcome-confirm-btn {
    width: 100% !important;
    color: white !important;
    border: none !important;
    padding: 15px 30px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.welcome-confirm-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%) !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
}

.welcome-confirm-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4) !important;
}

.welcome-confirm-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3) !important;
}

.welcome-confirm-secondary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(100, 116, 139, 0.4) !important;
}

@media (max-width: 768px) {
    .welcome-modal {
        padding: 10px !important;
    }
    
    .welcome-modal-content {
        max-height: 95vh !important;
        margin-bottom: env(safe-area-inset-bottom, 20px) !important;
    }
    
    .welcome-modal-header {
        padding: 20px 20px 15px !important;
    }
    
    .welcome-modal-icon {
        font-size: 36px !important;
    }
    
    .welcome-modal-title {
        font-size: 20px !important;
    }
    
    .welcome-modal-body {
        padding: 20px !important;
    }
    
    .welcome-modal-footer {
        padding: 15px 20px 20px !important;
    }
    
    /* 移动端功能列表两列布局 */
    .welcome-features-list {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px 10px !important;
    }
    
    .welcome-features-list li {
        padding: 6px 8px !important;
        font-size: 13px !important;
        border-bottom: none !important;
        background: #f8fafc !important;
        border-radius: 6px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}
