/**
 * iPhone 屏幕使用时间页面样式
 * 完全参考iOS原生设计 - 白色主题
 * 返回和生成按钮透明度设为0，但功能保持可用
 */

.iphone-screentime-page {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    z-index: 2000;
    display: none;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.36, 0.66, 0.04, 1);
}

.iphone-screentime-page.show {
    display: flex;
    transform: translateX(0);
}

/* 头部 */
.screentime-header {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: #ffffff;
    border-bottom: 0.33px solid rgba(0, 0, 0, 0.1);
}

.screentime-back-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #000000;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
}

.screentime-back-btn:active {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(0.95);
}

.screentime-back-btn i {
    font-size: 18px;
}

.screentime-title {
    font-size: 17px;
    font-weight: 600;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -0.4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.screentime-generate-btn {
    background: none;
    border: none;
    color: #007AFF;
    font-size: 17px;
    font-weight: 400;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s ease;
}

.screentime-generate-btn:active {
    opacity: 0.4;
}

.screentime-generate-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.screentime-generate-btn.generating {
    opacity: 0.6;
    pointer-events: none;
}

/* 内容区域 */
.screentime-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #f2f2f7;
    -webkit-overflow-scrolling: touch;
}

/* 空状态 */
.screentime-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
    color: #8e8e93;
    text-align: center;
}

.screentime-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.screentime-empty-text {
    font-size: 17px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    letter-spacing: -0.4px;
    margin-bottom: 8px;
}

.screentime-empty-hint {
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    letter-spacing: -0.4px;
    opacity: 0.7;
}

/* 加载状态 */
.screentime-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.screentime-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 122, 255, 0.2);
    border-top-color: #007aff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.screentime-loading-text {
    margin-top: 16px;
    font-size: 15px;
    color: #8e8e93;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    letter-spacing: -0.4px;
}

/* 屏幕使用时间内容 */
.screentime-data {
    padding: 20px 16px;
}

/* 总览卡片 */
.screentime-overview {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.screentime-overview-title {
    font-size: 13px;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.screentime-total-time {
    font-size: 40px;
    font-weight: 700;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -0.8px;
    margin-bottom: 8px;
}

.screentime-comparison {
    font-size: 15px;
    color: #8e8e93;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    letter-spacing: -0.4px;
}

.screentime-comparison.up {
    color: #ff3b30;
}

.screentime-comparison.down {
    color: #34c759;
}

/* 图表区域 */
.screentime-chart {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.screentime-chart-title {
    font-size: 17px;
    font-weight: 600;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -0.4px;
    margin-bottom: 16px;
}

.screentime-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 120px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.screentime-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: flex-end;
}

.screentime-bar-fill {
    width: 20px;
    background: linear-gradient(180deg, #007aff 0%, #0051d5 100%);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.3s ease;
    max-height: 100%;
}

.screentime-bar-label {
    font-size: 11px;
    color: #8e8e93;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    letter-spacing: -0.2px;
}

/* 应用列表 */
.screentime-apps {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.screentime-apps-title {
    font-size: 17px;
    font-weight: 600;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -0.4px;
    padding: 16px 16px 12px;
}

.screentime-app-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-top: 0.5px solid #e5e5ea;
}

.screentime-app-item:first-of-type {
    border-top: none;
}

.screentime-app-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.screentime-app-info {
    flex: 1;
    min-width: 0;
}

.screentime-app-name {
    font-size: 17px;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -0.4px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.screentime-app-category {
    font-size: 13px;
    color: #8e8e93;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    letter-spacing: -0.2px;
}

.screentime-app-time {
    font-size: 17px;
    color: #8e8e93;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    letter-spacing: -0.4px;
    font-weight: 500;
    flex-shrink: 0;
    margin-left: 12px;
}

/* 类别统计 */
.screentime-categories {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.screentime-categories-title {
    font-size: 17px;
    font-weight: 600;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -0.4px;
    margin-bottom: 16px;
}

.screentime-category-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.screentime-category-item:last-child {
    margin-bottom: 0;
}

.screentime-category-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.screentime-category-name {
    flex: 1;
    font-size: 15px;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    letter-spacing: -0.4px;
}

.screentime-category-time {
    font-size: 15px;
    color: #8e8e93;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    letter-spacing: -0.4px;
    margin-left: 12px;
}

.screentime-category-bar {
    width: 100%;
    height: 4px;
    background: #e5e5ea;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.screentime-category-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* 提取次数统计 */
.screentime-pickups {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.screentime-pickups-title {
    font-size: 17px;
    font-weight: 600;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -0.4px;
    margin-bottom: 8px;
}

.screentime-pickups-count {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -0.6px;
    margin-bottom: 4px;
}

.screentime-pickups-label {
    font-size: 15px;
    color: #8e8e93;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    letter-spacing: -0.4px;
}

/* 通知统计 */
.screentime-notifications {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.screentime-notifications-title {
    font-size: 17px;
    font-weight: 600;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -0.4px;
    margin-bottom: 8px;
}

.screentime-notifications-count {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -0.6px;
    margin-bottom: 4px;
}

.screentime-notifications-label {
    font-size: 15px;
    color: #8e8e93;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    letter-spacing: -0.4px;
}

/* 应用图标颜色变体 */
.screentime-app-icon.social {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.screentime-app-icon.entertainment {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.screentime-app-icon.productivity {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.screentime-app-icon.reading {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.screentime-app-icon.creativity {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.screentime-app-icon.other {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

/* 滚动条样式 */
.screentime-content::-webkit-scrollbar {
    width: 0;
    display: none;
}