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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f0f2f5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 400px;
  padding: 1rem;
}

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hidden {
  display: none !important;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  width: 100%;
  text-align: center;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.greeting {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.clock-display {
  font-size: 3rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 1rem 0;
  font-variant-numeric: tabular-nums;
}

.status {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.status.in {
  color: #2e7d32;
}

.status.out {
  color: #c62828;
}

.btn {
  display: block;
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #1a73e8;
  color: #fff;
}

.btn-primary:hover {
  background: #1557b0;
}

.btn-clock {
  padding: 1.5rem;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.btn-clock.clock-in {
  background: #2e7d32;
  color: #fff;
}

.btn-clock.clock-in:hover {
  background: #1b5e20;
}

.btn-clock.clock-out {
  background: #c62828;
  color: #fff;
}

.btn-clock.clock-out:hover {
  background: #b71c1c;
}

.btn-secondary {
  background: transparent;
  color: #666;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.history {
  margin-top: 1.5rem;
  text-align: left;
  border-top: 1px solid #eee;
  padding-top: 1rem;
}

.history h3 {
  font-size: 0.85rem;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.history-item {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.95rem;
  color: #333;
}

.history-item .type {
  font-weight: 600;
}

.history-item .type.in {
  color: #2e7d32;
}

.history-item .type.out {
  color: #c62828;
}

.history-item .auto {
  color: #f57c00;
  font-size: 0.8rem;
}

.history-item .location-tag {
  color: #1a73e8;
  font-size: 0.8rem;
  font-weight: 400;
}

/* Location selector */
.location-selector {
  margin-bottom: 1.2rem;
  text-align: left;
}

.location-selector label {
  display: block;
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.select-wrapper {
  position: relative;
}

.select-wrapper select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  background: #fafafa;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.select-wrapper select:focus {
  outline: none;
  border-color: #1a73e8;
}

.select-wrapper::after {
  content: "▾";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #888;
  pointer-events: none;
}

/* Success animation */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(46, 125, 50, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s;
}

.success-overlay .check {
  font-size: 5rem;
  color: #fff;
  animation: pop 0.3s;
}

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

@keyframes pop {
  0% { transform: scale(0.5); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
