* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans', sans-serif;
  background: #f5f5f5;
  padding: 20px;
  overflow-x: hidden;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  gap: 20px;
}

.order-counts {
  display: flex;
  gap: 20px;
  flex: 1;
  justify-content: center;
}

.count-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: #f5f5f5;
  border-radius: 6px;
}

.count-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.count-value {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  min-width: 24px;
  text-align: right;
}

.time-display {
  font-size: 24px;
  font-weight: bold;
}

.controls {
  display: flex;
  gap: 10px;
}

button {
  padding: 8px 16px;
  background: #333;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

button:hover {
  background: #555;
}

button:active {
  transform: scale(0.98);
}

.container {
  display: grid;
  grid-template-columns: 3fr 5fr;
  gap: 20px;
  height: calc(100vh - 140px);
}

.column {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

.column h2 {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eee;
  font-size: 20px;
}

.order-list {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  align-content: start;
}

.served-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #eee;
}

.served-header {
  margin-bottom: 10px;
}

.served-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

.served-toggle input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.served-toggle span {
  user-select: none;
}

.served-container.hidden {
  display: none;
}

.served-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.order-card {
  background: white;
  border: none;
  border-radius: 6px;
  padding: 12px;
  transition: all 0.3s ease;
  animation: slideIn 0.3s ease;
}

.order-card.cooking {
  background: #e3f2fd;
}

.order-card.completed {
  background: #2196f3;
  color: white;
}

.order-card.completed .order-number {
  color: white;
}

.order-card.completed .order-info {
  color: rgba(255, 255, 255, 0.9);
}

.order-card.served {
  background: #f5f5f5;
  opacity: 0.7;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.order-card.moving-to-completed {
  animation: fadeOut 0.5s ease;
}

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

.order-number {
  font-size: 56px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
  text-align: center;
}

.order-type {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 8px;
}

.order-type.店内 {
  background: #e3f2fd;
  color: #1976d2;
}

.order-type.テイクアウト {
  background: #fff3e0;
  color: #f57c00;
}

.order-type.モバイル {
  background: #f3e5f5;
  color: #7b1fa2;
}

.order-info {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.end-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 40px 60px;
  border-radius: 12px;
  font-size: 32px;
  font-weight: bold;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 1000;
}

.end-message.hidden {
  display: none;
}

.restart-btn {
  margin-top: 20px;
  padding: 12px 32px;
  font-size: 18px;
  background: white;
  color: #333;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.restart-btn:hover {
  background: #f0f0f0;
  transform: scale(1.05);
}

.restart-btn:active {
  transform: scale(0.98);
}

.settings-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.settings-panel.hidden {
  display: none;
}

.settings-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  min-width: 300px;
}

.settings-content h3 {
  margin-bottom: 20px;
  font-size: 20px;
  color: #333;
}

.settings-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.settings-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 16px;
  color: #333;
  user-select: none;
}

.settings-option input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.close-settings-btn {
  width: 100%;
  padding: 12px;
  background: #333;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.close-settings-btn:hover {
  background: #555;
}

.close-settings-btn:active {
  transform: scale(0.98);
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .column {
    min-height: 300px;
  }
  
  .header {
    flex-direction: column;
    gap: 10px;
  }
}