/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

/* App Container */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */
header {
  background-color: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

header h1 {
  color: #2c3e50;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Location Selector Styles */
.location-selector {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0;
}

.select-group {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 500px;
}

select {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  background-color: #fff;
  flex: 1;
}

select:disabled {
  background-color: #f5f5f5;
  color: #aaa;
}

/* Weather Info Styles */
.weather-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  background-color: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.weather-location-container {
  margin-bottom: 0.5rem;
  font-weight: bold;
  font-size: 1.1rem;
}

.weather-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.weather-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.weather-label {
  font-weight: bold;
  color: #4a5568;
}

/* Tabs Styles */
.tabs {
  display: flex;
  margin-bottom: 1rem;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tab-btn {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #718096;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background-color: #f7fafc;
}

.tab-btn.active {
  color: #3182ce;
  box-shadow: inset 0 -3px 0 #3182ce;
}

.tab-content {
  display: none;
  background-color: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tab-content.active {
  display: block;
}

/* Counter Tab Styles */
.counter-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.current-date-display {
  text-align: center;
  margin-bottom: 0;
}

#current-date {
  display: inline-block;
  font-size: 1.1rem;
  color: #4a5568;
  font-weight: 600;
  background-color: #f0f5ff;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.date-label {
  font-size: 0.9rem;
  color: #718096;
  font-weight: normal;
}

.counter-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.count-box {
  flex: 1;
  min-width: 180px;
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.count-box h2 {
  font-size: 1rem;
  color: #4a5568;
  margin-bottom: 0.5rem;
}

.count-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: #2d3748;
}

.hour-display {
  font-family: monospace;
}

/* Hour Breakdown Styles */
.hour-breakdown {
  margin-top: 1rem;
}

.hour-breakdown h3 {
  font-size: 1.1rem;
  color: #4a5568;
  margin-bottom: 1rem;
}

.hour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
}

.hour-cell {
  background-color: #f8fafc;
  border-radius: 4px;
  padding: 0.75rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.hour-cell:hover {
  background-color: #edf2f7;
}

.hour-cell.current {
  background-color: #ebf8ff;
  border-color: #90cdf4;
}

.hour-cell.active {
  background-color: #e6fffa;
  border-color: #81e6d9;
}

.hour-time {
  font-size: 0.9rem;
  font-weight: bold;
  color: #4a5568;
  margin-bottom: 0.25rem;
}

.hour-count {
  font-size: 1.2rem;
  font-weight: bold;
  color: #2d3748;
}

/* Counter Buttons Styles */
.counter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.main-counter-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.large-btn {
  padding: 1.25rem 2.5rem;
  font-size: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.large-btn svg {
  width: 24px;
  height: 24px;
}

.primary-btn {
  background-color: #3182ce;
  color: white;
}

.primary-btn:hover {
  background-color: #2c5282;
}

.primary-btn.large-btn {
  background-color: #2b6cb0;
}

.primary-btn.large-btn:hover {
  background-color: #2c5282;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.secondary-btn {
  background-color: #718096;
  color: white;
}

.secondary-btn:hover {
  background-color: #4a5568;
}

.secondary-btn.large-btn {
  background-color: #4a5568;
}

.secondary-btn.large-btn:hover {
  background-color: #2d3748;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.danger-btn {
  background-color: #e53e3e;
  color: white;
}

.danger-btn:hover {
  background-color: #c53030;
}

/* Data Tab Styles */
.data-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.chart-container {
  margin-bottom: 1rem;
}

.chart-container h3 {
  font-size: 1.1rem;
  color: #4a5568;
  margin-bottom: 1rem;
}

.chart-container canvas {
  width: 100%;
  height: 300px;
  max-height: 50vh;
}

/* Stats Styles */
.stats-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.stat-box {
  flex: 1;
  min-width: 250px;
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
}

.stat-box h3 {
  font-size: 1.1rem;
  color: #4a5568;
  margin-bottom: 1rem;
}

.stat-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  color: #4a5568;
}

.stat-value {
  font-weight: bold;
  color: #2d3748;
}

/* Payday Probability Styles */
.payday-probability {
  flex: 1;
  min-width: 250px;
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
}

.payday-probability h3 {
  font-size: 1.1rem;
  color: #4a5568;
  margin-bottom: 1rem;
}

.probability-meter {
  width: 100%;
  height: 20px;
  background-color: #edf2f7;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.probability-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #3182ce, #805ad5);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.probability-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2d3748;
  text-align: center;
  margin-bottom: 0.5rem;
}

.probability-label {
  text-align: center;
  color: #4a5568;
}

/* Data Export Styles */
.data-export {
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  margin-top: 1rem;
}

.data-export h3 {
  font-size: 1.1rem;
  color: #4a5568;
  margin-bottom: 0.5rem;
}

.data-export p {
  color: #718096;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.export-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.export-btn {
  background-color: #38a169;
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.export-btn:hover {
  background-color: #2f855a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.export-select {
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background-color: white;
  color: #4a5568;
  font-size: 0.95rem;
  min-width: 150px;
}

/* Footer Styles */
footer {
  margin-top: auto;
  padding: 1rem 0;
  text-align: center;
  color: #718096;
  font-size: 0.875rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }

  .counter-display {
    flex-direction: column;
  }

  .hour-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  .counter-buttons .btn {
    width: 100%;
  }

  .main-counter-buttons {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    padding: 0 1rem;
  }

  .main-counter-buttons .btn {
    width: 100%;
    margin: 0;
  }

  .stats-container {
    flex-direction: column;
  }
}