/* iOS 16 风格的UI元素 */
:root {
    --ios-primary: #007aff;
    --ios-secondary: #5ac8fa;
    --ios-success: #34c759;
    --ios-warning: #ff9500;
    --ios-danger: #ff3b30;
    --ios-gray: #8e8e93;
    --ios-gray-2: #aeaeb2;
    --ios-gray-3: #c7c7cc;
    --ios-gray-4: #d1d1d6;
    --ios-gray-5: #e5e5ea;
    --ios-gray-6: #f2f2f7;
    --ios-background: #f5f5f7;
    --ios-text: #1c1c1e;
    --ios-text-secondary: #6c6c6e;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--ios-background);
    color: var(--ios-text);
    margin: 0;
    padding: 0;
    overscroll-behavior: none;
}

/* iOS 状态栏 */
.ios-status-bar {
    height: 44px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ios-status-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.ios-status-bar-left {
    display: flex;
    align-items: center;
}

.ios-status-bar-center {
    font-weight: 600;
    font-size: 17px;
}

.ios-status-bar-right {
    display: flex;
    align-items: center;
}

/* iOS 导航栏 */
.ios-nav-bar {
    height: 44px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ios-gray-5);
}

/* iOS 底部标签栏 */
.ios-tab-bar {
    height: 83px; /* 包括底部安全区 */
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: 10px 0 34px 0; /* 底部留出安全区域 */
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--ios-gray-5);
    position: fixed;
    bottom: 0;
    left: 0;
}

.ios-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ios-tab-icon {
    font-size: 24px;
    color: var(--ios-primary);
    margin-bottom: 4px;
}

.ios-tab-label {
    font-size: 10px;
    color: var(--ios-primary);
}

/* iOS 按钮样式 */
.ios-button {
    background-color: var(--ios-primary);
    color: white;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 17px;
    text-align: center;
    border: none;
    outline: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

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

.ios-button-secondary {
    background-color: transparent;
    color: var(--ios-primary);
    border: 1px solid var(--ios-primary);
}

/* iOS 列表 */
.ios-list {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
}

.ios-list-item {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--ios-gray-5);
}

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

/* iOS 卡片 */
.ios-card {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 16px;
}

.ios-card-header {
    padding: 16px;
    border-bottom: 1px solid var(--ios-gray-5);
}

.ios-card-content {
    padding: 16px;
}

.ios-card-footer {
    padding: 16px;
    border-top: 1px solid var(--ios-gray-5);
}

/* iOS 输入框 */
.ios-input {
    background-color: var(--ios-gray-6);
    border-radius: 10px;
    padding: 15px 16px;
    font-size: 17px;
    border: none;
    outline: none;
    width: 100%;
}

.ios-input:focus {
    background-color: white;
    box-shadow: 0 0 0 2px var(--ios-primary);
}

/* iOS 搜索框 */
.ios-search {
    position: relative;
    width: 100%;
}

.ios-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ios-gray);
}

.ios-search-input {
    background-color: var(--ios-gray-6);
    border-radius: 10px;
    padding: 10px 16px 10px 40px;
    font-size: 17px;
    border: none;
    outline: none;
    width: 100%;
}

/* iOS 开关 */
.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: var(--ios-gray-4);
    transition: .4s;
    border-radius: 34px;
}

.ios-switch-slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

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

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

/* iOS 页面容器 */
.ios-container {
    padding: 20px 16px;
    overflow-y: auto;
    padding-bottom: 100px; /* 为底部标签栏留出空间 */
    height: calc(100vh - 44px); /* 减去状态栏高度 */
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--ios-gray-5);
}

::-webkit-scrollbar-thumb {
    background: var(--ios-gray-3);
    border-radius: 4px;
}

/* iOS 徽章 */
.ios-badge {
    background-color: var(--ios-danger);
    color: white;
    font-size: 12px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* iOS 分割线 */
.ios-divider {
    height: 1px;
    background-color: var(--ios-gray-5);
    margin: 16px 0;
}

/* iOS 标签 */
.ios-tag {
    background-color: var(--ios-gray-5);
    color: var(--ios-text-secondary);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
}

/* 动画 */
@keyframes ios-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ios-fade-in {
    animation: ios-fade-in 0.3s ease-in-out;
}

/* 修复iPhone刘海屏的安全区域 */
.safe-area-top {
    padding-top: env(safe-area-inset-top, 0);
}

.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
} 