* {
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: auto !important;
    min-height: 100% !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    background: #F5F7FB;
    color: #1A1E2B;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    padding-top: env(safe-area-inset-top);
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
    word-break: break-word;
}

/* ========== 全局丝滑过渡 ========== */
@keyframes pageSlideIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.03); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes floatIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
/* 页面切换动画 */
.page-transition {
    animation: pageFadeIn 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
/* 元素入场动画 */
.fade-in { animation: pageFadeIn 0.3s ease both; }
.slide-down { animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
.slide-up { animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
.bounce-in { animation: bounceIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both; }
.float-in { animation: floatIn 0.4s ease both; }

/* 链接点击反馈 */
a {
    transition: all 0.2s ease;
}
a:active {
    opacity: 0.7;
    transform: scale(0.97);
}

/* 按钮点击反馈 */
button, [role="button"] {
    transition: all 0.15s ease;
}
button:active, [role="button"]:active {
    transform: scale(0.95);
}

/* Toast 提示动画 */
.toast-enter {
    animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-exit {
    animation: slideDown 0.25s ease reverse forwards;
}

/* ========== v2.1 自然设计系统 ========== */

/* 按钮样式 - 去除蓝紫渐变，使用纯色 */
.btn-primary {
    background-color: #4E6CF7;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(78, 108, 247, 0.2);
}
.btn-primary:hover {
    background-color: #3D5DE0;
    box-shadow: 0 4px 12px rgba(78, 108, 247, 0.3);
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: scale(0.96) translateY(0);
}

.btn-success {
    background-color: #10B981;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}
.btn-success:hover {
    background-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-warning {
    background-color: #F59E0B;
    color: white;
    border-radius: 12px;
    font-weight: 600;
}
.btn-warning:hover {
    background-color: #D97706;
}

/* 弹窗/模态框统一样式 - 更大、更清晰 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease-out;
}

.modal-content {
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3F4F6;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
}
.modal-close:hover {
    background: #E5E7EB;
    color: #374151;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    color: #4B5563;
    line-height: 1.6;
}

.modal-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid #F3F4F6;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* 卡片组件 - 简洁清爽 */
.card {
    background: white;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}
.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* 输入框 - 清晰边框 */
.input-field {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    color: #111827;
    background: #FAFBFC;
    transition: all 0.2s ease;
    outline: none;
}
.input-field:focus {
    border-color: #4E6CF7;
    background: white;
    box-shadow: 0 0 0 3px rgba(78, 108, 247, 0.1);
}
.input-field::placeholder {
    color: #9CA3AF;
}

/* 徽章/标签 - 柔和配色 */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-primary { background: #EFF6FF; color: #4E6CF7; }
.badge-success { background: #ECFDF5; color: #059669; }
.badge-warning { background: #FFFBEB; color: #D97706; }
.badge-danger { background: #FEF2F2; color: #DC2626; }

/* 进度条 - 单色简洁 */
.progress-bar {
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: #4E6CF7;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* 分割线 - 细腻 */
.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #E5E7EB, transparent);
    margin: 16px 0;
}

/* 空状态 - 友好提示 */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #9CA3AF;
}
.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: #F3F4F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}
.empty-text {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}
.empty-subtext {
    font-size: 13px;
}