/* 🔔 通知设置页面样式 */

/* CSS变量定义 */
page {
  --primary-color: #007AFF;
  --primary-light: #5AC8FA;
  --primary-dark: #0051D5;
  --success-color: #34C759;
  --danger-color: #FF3B30;
  --warning-color: #FF9500;
  --background-color: #F2F2F7;
  --surface-color: #FFFFFF;
  --text-primary: #000000;
  --text-secondary: #8E8E93;
  --text-tertiary: #C7C7CC;
  --border-color: #E5E5EA;
  --shadow-light: 0 1rpx 3rpx rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);
  --radius-small: 8rpx;
  --radius-medium: 12rpx;
  --radius-large: 20rpx;
}

/* 🌙 深色模式支持 */
@media (prefers-color-scheme: dark) {
  page {
    --primary-color: #0A84FF;
    --primary-light: #64D2FF;
    --primary-dark: #0056CC;
    --success-color: #30D158;
    --danger-color: #FF453A;
    --warning-color: #FF9F0A;
    --background-color: #000000;
    --surface-color: #1C1C1E;
    --text-primary: #FFFFFF;
    --text-secondary: #8E8E93;
    --text-tertiary: #48484A;
    --border-color: #38383A;
    --shadow-light: 0 1rpx 3rpx rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4rpx 12rpx rgba(0, 0, 0, 0.4);
  }
}

.notification-settings-container {
  height: 100vh;
  background: var(--background-color);
  display: flex;
  flex-direction: column;
}

/* 🎨 自定义导航栏 */
.custom-navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  box-shadow: var(--shadow-medium);
  z-index: 1000;
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32rpx;
}

.navbar-left, .navbar-right {
  width: 80rpx;
  height: 80rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-medium);
  transition: all 0.3s ease;
}

.navbar-left:active {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(0.95);
}

.back-icon {
  font-size: 48rpx;
  color: white;
  font-weight: 300;
}

.navbar-title {
  flex: 1;
  text-align: center;
}

.title-text {
  font-size: 36rpx;
  font-weight: 600;
  color: white;
}

/* 🎨 页面内容 */
.page-content {
  flex: 1;
  padding: 32rpx 0;
}

/* 🎨 设置分组 */
.settings-section {
  margin-bottom: 32rpx;
}

.section-header {
  padding: 0 32rpx 16rpx;
}

.section-title {
  font-size: 26rpx;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1rpx;
}

/* 🎨 设置项 */
.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32rpx;
  background: var(--surface-color);
  border-bottom: 1rpx solid var(--border-color);
  transition: all 0.2s ease;
}

.setting-item:first-child {
  border-top-left-radius: var(--radius-medium);
  border-top-right-radius: var(--radius-medium);
}

.setting-item:last-child {
  border-bottom: none;
  border-bottom-left-radius: var(--radius-medium);
  border-bottom-right-radius: var(--radius-medium);
}

.setting-item:active {
  background: var(--background-color);
}

.setting-item.danger {
  background: rgba(255, 59, 48, 0.05);
}

.setting-item.danger:active {
  background: rgba(255, 59, 48, 0.1);
}

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

.item-title {
  font-size: 32rpx;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
  margin-bottom: 8rpx;
}

.item-title.danger {
  color: var(--danger-color);
}

.item-desc {
  font-size: 26rpx;
  color: var(--text-secondary);
  line-height: 1.4;
}

.item-action {
  display: flex;
  align-items: center;
  gap: 16rpx;
}

.action-text {
  font-size: 30rpx;
  color: var(--primary-color);
  font-weight: 500;
}

.action-arrow {
  font-size: 32rpx;
  color: var(--text-tertiary);
  font-weight: 300;
}

.unread-badge {
  min-width: 40rpx;
  height: 40rpx;
  border-radius: 20rpx;
  background: var(--danger-color);
  color: white;
  font-size: 24rpx;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8rpx;
}

/* 🎨 开关控件 */
.setting-switch {
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.setting-switch:active {
  transform: scale(0.75);
}

/* 🎨 时间选择器样式 */
.time-picker-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.3s ease-out;
}

.time-picker-content {
  width: 100%;
  background: var(--surface-color);
  border-radius: var(--radius-large) var(--radius-large) 0 0;
  box-shadow: var(--shadow-medium);
  animation: slideUp 0.3s ease-out;
  overflow: hidden;
}

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

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.time-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32rpx;
  border-bottom: 1rpx solid var(--border-color);
}

.time-picker-title {
  font-size: 36rpx;
  font-weight: 600;
  color: var(--text-primary);
}

.time-picker-btn {
  font-size: 30rpx;
  color: var(--primary-color);
  font-weight: 500;
  transition: all 0.2s ease;
}

.time-picker-btn:active {
  opacity: 0.7;
}

.time-picker-btn.cancel {
  color: var(--text-secondary);
}

.time-picker-body {
  padding: 32rpx;
}

/* 🎨 状态指示器 */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 16rpx;
}

.status-dot {
  width: 16rpx;
  height: 16rpx;
  border-radius: 8rpx;
  background: var(--text-tertiary);
}

.status-dot.active {
  background: var(--success-color);
}

.status-dot.inactive {
  background: var(--text-tertiary);
}

.status-dot.error {
  background: var(--danger-color);
}

.status-text {
  font-size: 26rpx;
  color: var(--text-secondary);
}

/* 🎨 通知预览 */
.notification-preview {
  background: var(--surface-color);
  border: 1rpx solid var(--border-color);
  border-radius: var(--radius-medium);
  padding: 24rpx;
  margin: 24rpx 32rpx;
  box-shadow: var(--shadow-light);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 16rpx;
  margin-bottom: 16rpx;
}

.preview-icon {
  width: 48rpx;
  height: 48rpx;
  border-radius: 24rpx;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24rpx;
  color: white;
}

.preview-title {
  font-size: 28rpx;
  font-weight: 600;
  color: var(--text-primary);
}

.preview-time {
  font-size: 24rpx;
  color: var(--text-tertiary);
  margin-left: auto;
}

.preview-content {
  font-size: 26rpx;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* 🎨 提示信息 */
.tip-container {
  background: rgba(0, 122, 255, 0.1);
  border: 1rpx solid rgba(0, 122, 255, 0.3);
  border-radius: var(--radius-small);
  padding: 24rpx;
  margin: 24rpx 32rpx;
}

.tip-text {
  font-size: 26rpx;
  color: var(--primary-color);
  line-height: 1.4;
}

.tip-icon {
  font-size: 28rpx;
  margin-right: 12rpx;
}

/* 🎨 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120rpx 40rpx;
  text-align: center;
}

.empty-icon {
  font-size: 120rpx;
  margin-bottom: 24rpx;
  opacity: 0.5;
}

.empty-text {
  font-size: 28rpx;
  color: var(--text-secondary);
  margin-bottom: 32rpx;
}

.empty-action {
  padding: 24rpx 48rpx;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-medium);
  font-size: 28rpx;
  font-weight: 500;
  transition: all 0.3s ease;
}

.empty-action:active {
  background: var(--primary-dark);
  transform: scale(0.98);
}

/* 🎨 加载状态 */
.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80rpx;
}

.loading-spinner {
  width: 60rpx;
  height: 60rpx;
  border: 4rpx solid var(--border-color);
  border-top: 4rpx solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 28rpx;
  color: var(--text-secondary);
  margin-left: 24rpx;
}

/* 📱 响应式设计 */
@media screen and (max-width: 375px) {
  .page-content {
    padding: 24rpx 0;
  }
  
  .settings-section {
    margin-bottom: 24rpx;
  }
  
  .section-header {
    padding: 0 24rpx 12rpx;
  }
  
  .setting-item {
    padding: 24rpx;
  }
  
  .notification-preview,
  .tip-container {
    margin: 16rpx 24rpx;
    padding: 16rpx;
  }
}

@media screen and (min-width: 414px) {
  .page-content {
    padding: 40rpx 0;
  }
  
  .settings-section {
    margin-bottom: 40rpx;
  }
  
  .section-header {
    padding: 0 40rpx 20rpx;
  }
  
  .setting-item {
    padding: 40rpx;
  }
  
  .notification-preview,
  .tip-container {
    margin: 32rpx 40rpx;
    padding: 32rpx;
  }
}

/* 🎨 动画效果 */
.setting-item {
  transition: all 0.2s ease;
}

.setting-item:hover {
  background: var(--background-color);
}

.setting-switch {
  transition: all 0.3s ease;
}

.action-text {
  transition: all 0.2s ease;
}

.action-text:active {
  opacity: 0.7;
}

/* 🎨 特殊状态 */
.setting-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.setting-item.highlighted {
  background: rgba(0, 122, 255, 0.05);
  border-color: rgba(0, 122, 255, 0.3);
}

.setting-item.warning {
  background: rgba(255, 149, 0, 0.05);
}

.setting-item.warning .item-title {
  color: var(--warning-color);
}

/* 🎨 分隔线 */
.divider {
  height: 1rpx;
  background: var(--border-color);
  margin: 0 32rpx;
}

.divider.thick {
  height: 16rpx;
  background: var(--background-color);
  margin: 0;
}

/* 🎨 标签 */
.tag {
  display: inline-block;
  padding: 8rpx 16rpx;
  border-radius: var(--radius-small);
  font-size: 24rpx;
  font-weight: 500;
  line-height: 1;
}

.tag.primary {
  background: rgba(0, 122, 255, 0.1);
  color: var(--primary-color);
}

.tag.success {
  background: rgba(52, 199, 89, 0.1);
  color: var(--success-color);
}

.tag.warning {
  background: rgba(255, 149, 0, 0.1);
  color: var(--warning-color);
}

.tag.danger {
  background: rgba(255, 59, 48, 0.1);
  color: var(--danger-color);
}
