/* 全局基础样式 */
body {
  background: black;
  color: white;
  font-family: sans-serif;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 15px;
  height: 100vh; /* 填满整个视口高度 */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

h1 {
  font-size: 50px;
  color: white;
  text-align: center;
  margin-bottom: 30px;
}

.connection-status {
  background: rgba(0, 255, 0, 0.1);
  color: #00FF00;
  padding: 5px;
  border-radius: 8px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #00FF00;
  border-radius: 50%;
  display: inline-block;
}

/* 顶部导航栏 */
.nav {
  position: absolute;
  top: 20px;
  right: 20px;
}
.nav-icon {
  color: white;
  text-decoration: none;
  font-size: 80px;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-icon:hover {
  opacity: 1;
}

/* 首页 task 项布局 */
.task {
  display: grid;
  grid-template-columns: 1fr 160px 140px;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 0;
}

.task img {
  height: 60px;
  width: auto;
}

.task-buttons {
  display: flex;
  gap: 5px;
}

/* 任务名与日期 */
.task-name {
  font-size: 38px;
  color: yellow;
  font-weight: bold;
  margin-bottom: 5px;
}

.task-name.completed {
  color: #666;
  text-decoration: line-through;
}

.task-name.rework {
  color: yellow;
  text-decoration: none;
}
.task-date {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
}

/* 状态按钮样式 */
.status {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  margin-right: 10px;
}

/* 删除按钮样式 */
.delete-btn {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.status img,
.delete-btn img {
  display: block;
  width: 60px;
  height: 60px;
}

/* Add Task 页面样式 */
.add-task-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
  flex: 1;
  overflow-y: auto;
  padding: 20px 0 20px;
  /* justify-content: space-between; */
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.form-group label {
  color: white;
  font-size: 28px;
  padding: 0 4px;
}

.form-group input,
.form-group select {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 12px;
  padding: 16px;
  color: white;
  font-size: 28px;
  width: 100%;
  box-sizing: border-box;
  height: 58px;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.custom-select {
  position: relative;
  user-select: none;
}

.select-trigger {
  background: rgba(255, 255, 255, 0.1);
  padding: 0px;
  border-radius: 12px;
  display: flex;
  font-size: 28px;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  height: 58px;
}

.select-trigger:hover {
  background: rgba(255, 255, 255, 0.15);
}

.select-trigger .arrow {
  margin-left: auto;
  font-size: 12px;
}

.select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border-radius: 8px;
  margin-top: 4px;
  padding: 4px;
  display: none;
  z-index: 100;
}

.select-options.show {
  display: block;
}

.option {
  padding: 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.option .check {
  margin-left: auto;
  color: #4CAF50;
}

.together-icons {
  display: flex;
  gap: 2px;
}

.date-time-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .date-time-group {
    grid-template-columns: 1fr 1fr;
  }
}

.add-task-btn {
  position: sticky;
  bottom: 0;
  background: white;
  color: black;
  border: none;
  border-radius: 5px;
  padding: 20px;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 20px;
  
  height: 80px;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
}

.plus-icon {
  font-size: 20px;
  font-weight: normal;
}

input:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Login page styles */
.login-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 20px;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.login-desc {
  color: #ccc;
  font-size: 26px;
  margin: 15px 0 5px;
}

.login-subdesc {
  color: #666;
  font-size: 24px;
  margin: 0 0 20px;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 15px 0;
  margin: 20px 0;
}

.pin-dot {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.pin-dot.filled {
  background-color: #fff;
}

.dial-pad {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content:  flex-start;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.dial-row {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.dial-button {
  flex: 1;
  aspect-ratio: 1;
  font-size: 6vw;
  max-width: 100px;
  max-height: 100px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.dial-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.dial-button:active {
  background-color: rgba(255, 255, 255, 0.3);
}

.owner-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 冷冻物品管理样式 */
.add-item-section {
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

/* 在屏幕宽度超过700px时隐藏添加物品区域 */
@media (min-width: 701px) {
  .add-item-section {
    display: none;
  }
}

.item-input {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  color: white;
  font-size: 18px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 15px;
}

.item-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.quantity-section {
  margin-bottom: 15px;
}

.quantity-label {
  color: white;
  font-size: 16px;
  margin-bottom: 8px;
  display: block;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.quantity-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.quantity-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.quantity-input {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  width: 60px;
  padding: 8px;
}

.quantity-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.7);
}

.freezer-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.freezer-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  padding: 12px 16px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.freezer-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.freezer-btn:active {
  background: rgba(255, 255, 255, 0.3);
}

.freezers-container {
  position: relative;
  width: 100%;
}

.freezer-box {
  position: absolute;
  width: calc(50% - 7.5px);
  box-sizing: border-box;
}

/* 当屏幕宽度超过700px时，保持两列布局 */
@media (min-width: 701px) {
  .freezer-box {
    width: calc(50% - 10px);
  }
}

.freezer-box {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  /* 移除固定的 min-height，让容器根据内容自适应高度 */
}

.freezer-box h3 {
  margin: 0 0 15px 0;
  color: #00FF00;
  font-size: 28px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-name {
  color: white;
  font-size: 26px;
}

.add-item-btn {
  background: rgba(0, 255, 0, 0.2);
  border: 1px solid rgba(0, 255, 0, 0.5);
  border-radius: 50%;
  color: #00FF00;
  width: 24px;
  height: 24px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 5px;
}

.add-item-btn:hover {
  background: rgba(0, 255, 0, 0.3);
  border-color: rgba(0, 255, 0, 0.7);
}

.delete-item-btn {
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid rgba(255, 0, 0, 0.5);
  border-radius: 50%;
  color: #ff6b6b;
  width: 24px;
  height: 24px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-item-btn:hover {
  background: rgba(255, 0, 0, 0.3);
  border-color: rgba(255, 0, 0, 0.7);
}

.item-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 移动端响应式样式 */
/* 确保700px以上始终显示两列 */
@media (min-width: 701px) and (max-width: 768px) {
  .freezers-container {
    gap: 15px;
  }
}

@media (max-width: 700px) {
  body {
    padding: 10px;
  }
  
  .container {
    padding: 0 10px;
  }
  
  h1 {
    font-size: 36px;
    margin-bottom: 20px;
  }
  
  /* 任务列表移动端优化 */
  .task {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px 0;
  }
  
  .task-name {
    font-size: 28px;
  }
  
  .task-buttons {
    justify-content: center;
    margin-top: 10px;
  }
  
  /* 表单移动端优化 */
  .add-task-form {
    gap: 20px;
    padding: 10px 0;
  }
  
  .form-group label {
    font-size: 22px;
  }
  
  .form-group input,
  .form-group select {
    font-size: 20px;
    padding: 12px;
    height: 50px;
  }
  
  .select-trigger {
    font-size: 20px;
    height: 50px;
    padding: 12px;
  }
  
  .add-task-btn {
    font-size: 24px;
    height: 60px;
    margin-top: 15px;
  }
  
  /* 冷冻物品管理移动端优化 - 只在700px以下显示单列 */
  .freezers-container {
    flex-direction: column;
    gap: 10px;
  }
  
  .freezer-box {
    flex: 1 1 100%;
  }
  
  .freezer-buttons {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .freezer-btn {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .freezer-box {
    padding: 12px;
    min-height: 150px;
  }
  
  .freezer-box h3 {
    font-size: 18px;
  }
  
  .item-name {
    font-size: 20px !important;
  }
  
  .item-input {
    font-size: 20px;
    padding: 10px 12px;
  }
  
  .quantity-label {
    font-size: 20px;
  }
  
  .quantity-input {
    font-size: 20px;
  }
  
  .freezer-btn {
    font-size: 20px;
  }
  
  /* 登录页面移动端优化 */
  .login-desc {
    font-size: 20px;
  }
  
  .login-subdesc {
    font-size: 18px;
  }
  
  .dial-button {
    font-size: 8vw;
    max-width: 80px;
    max-height: 80px;
  }
  
  /* 导航图标移动端优化 */
  .nav-icon {
    font-size: 60px;
  }
}

/* 超小屏幕优化 (iPhone SE 等) */
@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }
  
  .task-name {
    font-size: 24px;
  }
  
  .form-group label {
    font-size: 18px;
  }
  
  .form-group input,
  .form-group select {
    font-size: 16px;
  }
  
  .select-trigger {
    font-size: 16px;
  }
  
  .add-task-btn {
    font-size: 20px;
    height: 55px;
  }
  
  .dial-button {
    font-size: 10vw;
    max-width: 70px;
    max-height: 70px;
  }
  
  .nav-icon {
    font-size: 50px;
  }
}
