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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 0;
  text-align: center;
}

.site-title {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.site-tagline {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Sections */
section {
  background: white;
  margin: 20px 0;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h2 {
  color: #4a5568;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

h3 {
  color: #718096;
  margin: 20px 0 10px;
  font-size: 1.3rem;
}

p {
  margin-bottom: 15px;
}

/* Presets */
.preset-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.preset-btn {
  background: #e2e8f0;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
}

.preset-btn:hover {
  background: #cbd5e0;
}

/* Settings */
.setting-group {
  margin-bottom: 15px;
}

.setting-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #4a5568;
}

.setting-group input,
.setting-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  font-size: 1rem;
}

.setting-group select[multiple] {
  height: 150px;
}

/* Timer Display */
.timer-display {
  text-align: center;
  padding: 40px;
  background: #f7fafc;
  border-radius: 8px;
  margin-bottom: 20px;
}

.current-region {
  font-size: 2rem;
  font-weight: bold;
  color: #4a5568;
  margin-bottom: 10px;
}

.timer-countdown {
  font-size: 4rem;
  font-weight: bold;
  color: #667eea;
  margin: 20px 0;
}

.phase-indicator {
  font-size: 1.5rem;
  color: #718096;
}

/* Controls */
.timer-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.control-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.control-btn.start {
  background: #48bb78;
  color: white;
}

.control-btn.start:hover {
  background: #38a169;
}

.control-btn.pause {
  background: #ed8936;
  color: white;
}

.control-btn.pause:hover {
  background: #dd6b20;
}

.control-btn.reset,
.control-btn.clear {
  background: #e53e3e;
  color: white;
}

.control-btn.reset:hover,
.control-btn.clear:hover {
  background: #c53030;
}

.control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Progress */
.progress-bar {
  height: 20px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: #667eea;
  width: 0%;
  transition: width 0.3s;
}

.progress-text {
  text-align: center;
  color: #718096;
}

/* History */
.history-list {
  margin: 20px 0;
}

.history-item {
  background: #f7fafc;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 10px;
  border-left: 4px solid #667eea;
}

.history-item .date {
  font-weight: bold;
  color: #4a5568;
}

.history-item .details {
  color: #718096;
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  color: #a0aec0;
  font-style: italic;
  padding: 20px;
}

/* Tips */
.tips-section ul {
  list-style: none;
  padding-left: 0;
}

.tips-section li {
  padding: 10px 0;
  padding-left: 25px;
  position: relative;
}

.tips-section li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #48bb78;
  font-weight: bold;
}

/* Footer */
.site-footer {
  background: #2d3748;
  color: white;
  padding: 30px 0;
  text-align: center;
  margin-top: 40px;
}

.site-footer a {
  color: #90cdf4;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .site-title {
    font-size: 1.8rem;
  }

  .timer-countdown {
    font-size: 3rem;
  }

  .preset-buttons {
    flex-direction: column;
  }

  .timer-controls {
    flex-direction: column;
  }

  .control-btn {
    width: 100%;
  }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
