/* ==================== 通用样式 - 基于设计增强规范 ==================== */

/* CSS变量 - 设计系统 */
:root {
    /* 主色调系统 */
    --primary-color: #6366F1;
    --primary-light: #8B5CF6;
    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    
    /* 情感辅助色 */
    --reading-orange: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    --success-green: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    --deep-purple: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
    
    /* 中性色阶 */
    --text-primary: #1F2937;
    --text-secondary: #4B5563;
    --text-tertiary: #9CA3AF;
    --text-placeholder: #D1D5DB;
    
    /* 背景系统 */
    --bg-primary: #F9FAFB;
    --bg-card: #FFFFFF;
    --bg-dark: #111827;
    
    /* 动效曲线 */
    --ease-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
    --ease-enter: cubic-bezier(0.0, 0.0, 0.2, 1);
    --ease-exit: cubic-bezier(0.4, 0.0, 1, 1);
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 隐藏滚动条 */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* APP容器 - 375px × 812px */
.app-container {
    width: 375px;
    height: 812px;
    background: var(--bg-card);
    border-radius: 38px;
    overflow: hidden;
    position: relative;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 0 0 2px rgba(0, 0, 0, 0.02) inset;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 - 56px */
.app-header {
    height: 56px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.app-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.app-header .header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-header .icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s var(--ease-standard);
}

.app-header .icon-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.app-header .icon-btn:active {
    transform: scale(0.95);
}

/* 主内容区 - 676px */
.app-content {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-primary);
    padding: 16px;
}

/* 底部导航栏 - 80px */
.app-bottom-nav {
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s var(--ease-standard);
    background: transparent;
    border: none;
    color: var(--text-tertiary);
}

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

.nav-item .nav-icon {
    font-size: 24px;
    transition: transform 0.3s var(--ease-standard);
}

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

.nav-item .nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* 卡片组件 */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s var(--ease-standard);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.07),
        0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.card:active {
    transform: translateY(0) scale(0.98);
}

/* 按钮组件 */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-standard);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.15);
}

/* 输入框 */
.input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--text-placeholder);
    font-size: 15px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.3s var(--ease-standard);
}

.input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 标签和徽章 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.badge-orange {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.badge-green {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.5s var(--ease-standard);
}

/* 动画 */
@keyframes slideIn {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slideIn 0.3s var(--ease-enter) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.3s var(--ease-enter) forwards;
}

/* 状态选择器 - 弹出窗口 */
.state-selector {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s var(--ease-standard);
}

.state-selector.show {
    display: flex !important;
    opacity: 1;
}

.state-selector-content {
    background: white;
    border-radius: 20px;
    padding: 24px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s var(--ease-enter);
}

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

.state-selector-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.state-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.state-option {
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--bg-primary);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s var(--ease-standard);
}

.state-option:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

.state-option.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* 工具类 */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.bg-primary { background: var(--bg-primary); }
.bg-card { background: var(--bg-card); }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }
.rounded-2xl { border-radius: 20px; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }

/* 中性结构类 - 供 style-modern 等风格覆盖，仅定义布局不设色 */
.segmented-control { display: flex; gap: 24px; padding: 0 4px; }
.search-filter-bar { display: flex; align-items: center; gap: 10px; }
.fab-import-wrap { position: absolute; right: 20px; bottom: 96px; z-index: 15; }

