
:root {
  --work-color: #64B5F6;
  --overtime-color: #E57373;
  --noon-rest-color: #FFF176;
  --night-rest-color: #4CAF50;
  --bg-color: #f5f5f5;
  --text-color: #333;
  --timeline-bg: #e0e0e0;
  --border-color: #ddd;
  --progress-green: #4CAF50;
  --progress-blue: #2196F3;
  --progress-yellow: #FFC107;
  --progress-red: #F44436;
}

 
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  margin: 0;
  padding: 10px;
  text-align: center;
}
 
.container {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 30px;
  width: 85%;
  max-width: 700px;
}
 
h1 {
  font-size: 1.5rem;
  margin-top: -0.2rem;
  margin-bottom: 0.6rem;
  color: #424242;
  font-weight: 600;
}
 
#info {
  font-size: 0.9rem;
  margin-top: -0.2rem;
  margin-bottom: 0.2rem;
  line-height: 1.4;
  color: #616161;
}
 
.combined-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 0.8rem 0;
}
 
.status-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: center;
  border: 1px solid var(--border-color);
}
 
.status-label {
  font-size: 1.1rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 8px;
}
 
.status-timer {
  font-size: 2rem;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  margin-top: 15px;
}
 
.status-timer.working  { color: var(--work-color); }
.status-timer.noon-rest  { color: var(--noon-rest-color); }
.status-timer.night-rest  { color: var(--night-rest-color); }
.status-timer.overtime  { color: var(--overtime-color); }
 
.progress-ring {
  position: relative;
  width: 75px;
  height: 75px;
  margin: 10px auto;
  margin-top: 10px;
  margin-bottom: 0px;
}
 
.progress-ring-bg {
  stroke: #f0f0f0;
  stroke-width: 8;
  fill: none;
}
 
.progress-ring-fill {
  stroke: var(--progress-blue);
  stroke-width: 8;
  stroke-linecap: round;
  fill: none;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.3s;
}
 
.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  color: #666;
}
 
.pay-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
}
 
.pay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
 
.pay-badge {
  background: #f0f7ff;
  color: #1976D2;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}
 
.pay-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--overtime-color);
  text-align: center;
  margin: 15px 0;
  font-family: 'Courier New', monospace;
}
 
.pay-details {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  margin-top: -5px;
  margin-bottom: 15px;
  min-height: 20px;
}
 
.pay-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
 
.pay-input {
  width: 80px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
}
 
.icon-button {
  width: auto; /* 修改为auto */
  padding: 8px 12px; /* 增加内边距 */
  border-radius: 6px; /* 改为圆角矩形 */
  background: #f5f5f5;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #555;
  font-size: 14px;
  overflow: visible;
  gap: 5px; /* 增加图标和文字的间距 */
}
 
.icon-button:hover {
  background: #e0e0e0;
}
 
.icon-button svg {
  width: 20px;
  height: 20px;
  fill: #555;
}
 
.timeline-container {
  width: 100%;
  margin: 0px 0;
  position: relative;
}
 
.timeline {
  height: 30px;
  background-color: var(--timeline-bg);
  border-radius: 15px;
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
  margin-top: 30px;
}
 
.timeline-segment {
  height: 100%;

  position: absolute;
  top: 0;
}
 
.timeline-marker {
  position: absolute;
  top: -20px;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: #757575;
  white-space: nowrap;
}
 
.timeline-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}
 
.legend-item {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: #616161;
}
 
.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 6px;
}
 
.buttons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
 
button {
  background-color: #1976D2;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}
 
button:hover {
  background-color: #1565C0;
}
 
button.secondary   {
  background-color: #757575;
}
 
button.secondary:hover   {
  background-color: #616161;
}
 
footer {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #9e9e9e;
}


.current-time-indicator {
  position: absolute;
  height: 100%;
  width: 2px;
  background-color: #424242;
  z-index: 10;
}
 
@media (max-width: 600px) {
  .combined-display {
    grid-template-columns: 1fr;
  }
  
  .status-timer {
    font-size: 2rem;
  }
  
  .pay-amount {
    font-size: 1.8rem;
  }
  
  .container {
    padding: 20px;
  }
}
 
@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  .timeline-legend {
    flex-wrap: wrap;
    justify-content: center;
  }
}
