/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    max-width: 428px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding-bottom: 68px;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
}

/* 链接样式 */
a {
    text-decoration: none;
    color: inherit;
}

/* 按钮通用样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #374151;
    color: white;
}

.btn-primary:hover {
    background: #1f2937;
}

.btn-primary:active {
    background: #111827;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* 输入框通用样式 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #374151;
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.1);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: #374151;
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.1);
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e5e7eb;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #374151;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #d1d5db;
}

.empty-state p {
    font-size: 14px;
}

/* 提示信息 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(17, 24, 39, 0.85);
    color: white;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(4px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 页面标题 */
.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.tag-blue {
    background: #f3f4f6;
    color: #374151;
}

.tag-cyan {
    background: #ecfeff;
    color: #06b6d4;
}

.tag-green {
    background: #ecfdf5;
    color: #10b981;
}

.tag-red {
    background: #fef2f2;
    color: #ef4444;
}

.tag-amber {
    background: #fffbeb;
    color: #f59e0b;
}

/* 列表项 */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.15s ease;
}

.list-item:hover {
    background: #f9fafb;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-left {
    flex: 1;
}

.list-item-title {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 4px;
}

.list-item-subtitle {
    font-size: 13px;
    color: #9ca3af;
}

.list-item-right {
    color: #9ca3af;
    font-size: 14px;
}

/* 分割线 */
.divider {
    height: 1px;
    background: #f3f4f6;
    margin: 16px 0;
}

/* 底部导航 - 毛玻璃胶囊悬浮 */
.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 24px 6px;
    z-index: 100;
    height: 56px;
    width: auto;
    min-width: 220px;
    max-width: 300px;
}

.nav-item {
    text-align: center;
    cursor: pointer;
    flex: 1;
    padding: 4px 0;
    transition: transform 0.15s;
}

.nav-item:active {
    transform: scale(0.92);
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 3px;
}

.nav-item.active .nav-icon {
    color: #374151;
}

.nav-item:not(.active) .nav-icon {
    color: #9ca3af;
}

.nav-name {
    font-size: 11px;
    font-weight: 500;
}

.nav-item.active .nav-name {
    color: #374151;
    font-weight: 600;
}

.nav-item:not(.active) .nav-name {
    color: #9ca3af;
}

/* 响应式 */
@media (max-width: 375px) {
    body {
        max-width: 100%;
    }
}
