/* iOS风格通用CSS */
:root {
    /* 浅色模式颜色 */
    --background-color: #f2f2f7;
    --card-background: #ffffff;
    --text-primary: #000000;
    --text-secondary: #6c6c70;
    --border-color: #e5e5ea;
    --accent-color: #007aff;
    --success-color: #34c759;
    --warning-color: #ff9500;
    --error-color: #ff3b30;
    --nav-background: rgba(249, 249, 249, 0.94);
    --tab-bar-background: rgba(249, 249, 249, 0.94);
    --separator-color: rgba(60, 60, 67, 0.29);
    --input-background: #f2f2f7;
}

/* 深色模式颜色 */
body.dark-mode {
    --background-color: #1c1c1e;
    --card-background: #2c2c2e;
    --text-primary: #ffffff;
    --text-secondary: #ebebf5;
    --border-color: #38383a;
    --accent-color: #0a84ff;
    --success-color: #30d158;
    --warning-color: #ff9f0a;
    --error-color: #ff453a;
    --nav-background: rgba(44, 44, 46, 0.94);
    --tab-bar-background: rgba(44, 44, 46, 0.94);
    --separator-color: rgba(84, 84, 88, 0.65);
    --input-background: #1c1c1e;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-top: 44px; /* 导航栏高度 */
    padding-bottom: 49px; /* 标签栏高度 */
    overflow-x: hidden;
}

/* 导航栏 */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background-color: var(--nav-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    border-bottom: 0.5px solid var(--separator-color);
}

.nav-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    flex: 1;
}

.nav-button {
    font-size: 17px;
    color: var(--accent-color);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-weight: 400;
    transition: opacity 0.2s ease;
}

.nav-button:active {
    opacity: 0.6;
}

.nav-button.left {
    margin-right: auto;
}

.nav-button.right {
    margin-left: auto;
}

/* 标签栏 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 49px;
    background-color: var(--tab-bar-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    border-top: 0.5px solid var(--separator-color);
    z-index: 1000;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 10px;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.tab-item.active {
    color: var(--accent-color);
}

.tab-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

/* 列表样式 */
.list-container {
    background-color: var(--card-background);
    border-radius: 10px;
    margin: 16px;
    overflow: hidden;
}

.list-group {
    margin-bottom: 20px;
}

.list-header {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    min-height: 44px;
    border-bottom: 0.5px solid var(--separator-color);
    background-color: var(--card-background);
    transition: background-color 0.2s ease;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:active {
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode .list-item:active {
    background-color: rgba(255, 255, 255, 0.05);
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-size: 17px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.list-item-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
}

.list-item-right {
    color: var(--text-secondary);
    font-size: 17px;
    display: flex;
    align-items: center;
}

.list-chevron:after {
    content: "›";
    font-size: 20px;
    color: var(--text-secondary);
    margin-left: 5px;
}

/* 按钮样式 */
.ios-button {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ios-button.primary {
    background-color: var(--accent-color);
    color: white;
}

.ios-button.secondary {
    background-color: transparent;
    color: var(--accent-color);
}

.ios-button:active {
    opacity: 0.7;
}

/* 表单元素 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    padding: 0 16px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 17px;
    border: none;
    background-color: var(--input-background);
    color: var(--text-primary);
    border-radius: 10px;
    margin-bottom: 8px;
}

.form-input:focus {
    outline: none;
}

/* 开关控件 */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e4e4e4;
    transition: .4s;
    border-radius: 31px;
}

.ios-switch-slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

input:checked + .ios-switch-slider {
    background-color: var(--success-color);
}

input:checked + .ios-switch-slider:before {
    transform: translateX(20px);
}

/* 头像样式 */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #e5e5ea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e8e93;
    font-weight: 500;
    margin-right: 12px;
}

.avatar.large {
    width: 80px;
    height: 80px;
    font-size: 24px;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.badge.primary {
    background-color: var(--accent-color);
}

.badge.success {
    background-color: var(--success-color);
}

.badge.warning {
    background-color: var(--warning-color);
}

.badge.error {
    background-color: var(--error-color);
}

/* 图标字体 (使用Material Icons作为示例) */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* 日期选择器样式 */
.date-picker {
    width: 100%;
    background-color: var(--card-background);
    border-radius: 10px;
    overflow: hidden;
}

.date-picker-header {
    padding: 12px 16px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    border-bottom: 0.5px solid var(--separator-color);
}

.date-picker-wheels {
    display: flex;
    padding: 16px;
    justify-content: center;
}

.date-wheel {
    flex: 1;
    height: 150px;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    text-align: center;
}

.date-wheel-item {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    font-size: 20px;
    color: var(--text-primary);
}

/* 消息提示 */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 15px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

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

.slide-in-up {
    animation: slideInUp 0.3s forwards;
}

.fade-in {
    animation: fadeIn 0.3s forwards;
}

/* 响应式设计 */
@media (max-width: 375px) {
    .list-container {
        margin: 10px;
    }
} 