/* 全局样式 */
:root {
  --primary-color: #0078ff;
  --secondary-color: #5ac8fa;
  --success-color: #34c759;
  --warning-color: #ffcc00;
  --danger-color: #ff3b30;
  --light-color: #f2f2f7;
  --dark-color: #1c1c1e;
  --text-color: #333333;
  --text-secondary: #777777;
  --background-color: #f5f5f7;
  --card-color: #ffffff;
  --border-color: #e5e5ea;
  --border-radius: 12px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* iPhone 模拟框架 */
.iphone-frame {
  width: 390px;
  height: 844px;
  background-color: white;
  border-radius: 45px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  margin: 20px;
  border: 10px solid #1a1a1a;
}

/* 应用容器 */
.app-container {
  max-width: 450px;
  min-height: 100vh;
  margin: 0 auto;
  background-color: var(--background-color);
  position: relative;
  padding-bottom: 70px; /* 为底部导航栏留出空间 */
  padding-left: 70px; /* 为左侧导航栏留出空间 */
}

/* 状态栏 */
.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 5px 15px;
  background-color: var(--background-color);
}

.status-bar .time {
  font-weight: bold;
}

.status-bar .icons {
  display: flex;
  gap: 5px;
}

/* 内容区域 */
.content {
  padding: 15px;
}

/* 卡片样式 */
.card {
  background-color: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

/* 表单元素 */
.form-group {
  margin-bottom: 15px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 15px;
}

.form-control {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 15px;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 120, 255, 0.1);
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  border: none;
  outline: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-secondary {
  background-color: var(--light-color);
  color: var(--text-color);
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

/* 侧边导航栏 */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 60px;
  background-color: white;
  display: flex;
  flex-direction: row;
  justify-content: center;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
  z-index: 100;
  border-right: 1px solid var(--border-color);
}

.side-nav-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 10px 0;
  width: 60px;
  height: 70px;
  text-align: center;
}

.nav-item i {
  font-size: 22px;
  margin-bottom: 4px;
}

.nav-item.active {
  color: var(--primary-color);
}

.add-button {
  width: 45px;
  height: 45px;
  background-color: var(--primary-color);
  border-radius: 22.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 120, 255, 0.3);
  margin-bottom: 5px;
}

.add-button i {
  font-size: 20px;
  margin: 0;
}

/* 通用辅助类 */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-color);
}

.text-success {
  color: var(--success-color);
}

.text-danger {
  color: var(--danger-color);
}

.text-warning {
  color: var(--warning-color);
}

.mb-1 {
  margin-bottom: 5px;
}

.mb-2 {
  margin-bottom: 10px;
}

.mb-3 {
  margin-bottom: 15px;
}

.mt-1 {
  margin-top: 5px;
}

.mt-2 {
  margin-top: 10px;
}

.mt-3 {
  margin-top: 15px;
}

/* 响应式调整 */
@media (max-width: 450px) {
  .content {
    padding: 10px;
  }
  
  .card {
    padding: 15px;
  }
}

/* 卡片样式 */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.card-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* 按钮样式 */
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.fab {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

/* 表单样式 */
.form-select {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 16px;
  font-family: var(--font-family);
  background-color: white;
}

/* 任务样式 */
.task-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.task-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  border: 2px solid var(--border-color);
  margin-right: 12px;
  position: relative;
}

.task-checkbox.checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.task-checkbox.checked::after {
  content: '✓';
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
}

.task-content {
  flex: 1;
}

.task-title {
  font-size: 16px;
  margin: 0 0 4px 0;
}

.task-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  gap: 8px;
}

.task-priority {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.priority-high {
  background-color: rgba(255, 59, 48, 0.1);
  color: var(--danger-color);
}

.priority-medium {
  background-color: rgba(255, 204, 0, 0.1);
  color: var(--warning-color);
}

.priority-low {
  background-color: rgba(76, 217, 100, 0.1);
  color: var(--success-color);
}

/* 四象限矩阵样式 */
.quadrant-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  height: 300px;
  margin-bottom: 20px;
}

.quadrant {
  background-color: white;
  border-radius: 12px;
  padding: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.quadrant-title {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 8px 0;
  text-align: center;
}

.quadrant-1 {
  background-color: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
}

.quadrant-2 {
  background-color: rgba(0, 122, 255, 0.1);
  border: 1px solid rgba(0, 122, 255, 0.3);
}

.quadrant-3 {
  background-color: rgba(255, 204, 0, 0.1);
  border: 1px solid rgba(255, 204, 0, 0.3);
}

.quadrant-4 {
  background-color: rgba(142, 142, 147, 0.1);
  border: 1px solid rgba(142, 142, 147, 0.3);
}

.quadrant-tasks {
  flex: 1;
  overflow-y: auto;
}

.quadrant-task {
  font-size: 12px;
  padding: 6px;
  background-color: white;
  border-radius: 6px;
  margin-bottom: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 目标样式 */
.goal-item {
  background-color: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.goal-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.goal-type {
  font-size: 12px;
  color: var(--text-secondary);
}

.goal-progress {
  height: 6px;
  background-color: var(--light-color);
  border-radius: 3px;
  margin-bottom: 8px;
  overflow: hidden;
}

.goal-progress-bar {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 3px;
}

.goal-stats {
  display: flex;
  font-size: 12px;
  color: var(--text-secondary);
  justify-content: space-between;
}

/* 统计图表样式 */
.chart-container {
  height: 200px;
  margin-bottom: 20px;
}

/* 模态框 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  border-radius: 16px;
  width: 90%;
  max-width: 340px;
  padding: 20px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* 多页面展示容器 */
.prototypes-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  gap: 30px;
  padding: 30px;
}

.prototype-item {
  display: flex;
  flex-direction: column;
}

.prototype-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
}

/* 响应式调整 */
@media (max-width: 430px) {
  .iphone-frame {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    margin: 0;
    border: none;
  }
  
  .prototypes-container {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 50px;
  }
} 