:root {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --success: #10b981;
    --error: #dc2626;
    --warning: #f59e0b;
    --purple: #8b5cf6;
    --cyan: #06b6d4;
    --pink: #ec4899;
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-sidebar: #f8f7f4;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --border: #e5e5e5;
    --shadow: rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #1a1a1a;
}

img {
    max-width: 100%;
}

a {
    text-decoration: none;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

/* Toast */
.toast {
    position: fixed;
    top: calc(20px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 90%;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    color: #1a1a1a;
}

.toast-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.toast.success {
    border-left: 4px solid #00b894;
}

.toast.error {
    border-left: 4px solid #e17055;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

/* ==================== 全局确认弹窗样式 ==================== */
.global-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    padding: 20px;
}

.global-confirm-overlay.show {
    opacity: 1;
    visibility: visible;
}

.global-confirm-dialog {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: all 0.2s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.global-confirm-overlay.show .global-confirm-dialog {
    transform: scale(1) translateY(0);
}

.global-confirm-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.global-confirm-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.global-confirm-message {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
    word-break: break-word;
}

.global-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.global-confirm-btn {
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 100px;
}

.global-confirm-btn.cancel {
    background: #f1f5f9;
    color: #64748b;
}

.global-confirm-btn.cancel:hover {
    background: #e2e8f0;
    color: #475569;
}

.global-confirm-btn.confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.global-confirm-btn.confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.global-confirm-btn.confirm.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.global-confirm-btn.confirm.danger:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.global-confirm-btn.confirm.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.global-confirm-btn.confirm.warning:hover {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.global-confirm-btn.confirm.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.global-confirm-btn.confirm.info:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* 移动端适配 */
@media (max-width: 480px) {
    .global-confirm-dialog {
        padding: 24px;
        margin: 0 16px;
    }
    
    .global-confirm-icon {
        font-size: 40px;
    }
    
    .global-confirm-title {
        font-size: 18px;
    }
    
    .global-confirm-buttons {
        flex-direction: column-reverse;
    }
    
    .global-confirm-btn {
        width: 100%;
    }
}
