:root {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #1f2a44;
  background-color: #f6f8fb;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.container {
  flex: 1;
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  margin-bottom: 0.5rem;
  font-size: 2.25rem;
}

header p {
  margin: 0;
  color: #5f6b8a;
}

.auth-container {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

#user-info {
  color: #5f6b8a;
  font-size: 0.95rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e1e6f3;
}

.auth-tab {
  flex: 1;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: #5f6b8a;
  border: none;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab:hover {
  color: #4c6ef5;
}

.auth-tab.active {
  color: #4c6ef5;
  border-bottom-color: #4c6ef5;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: #1f2a44;
}

.form-group input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem;
  border: 1px solid #ccd5e0;
  border-radius: 8px;
  font-size: 1rem;
  color: inherit;
}

.form-group input:focus {
  outline: 3px solid rgba(76, 110, 245, 0.25);
  border-color: #4c6ef5;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 18px 32px rgba(31, 42, 68, 0.08);
  margin-bottom: 1.5rem;
}

textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid #ccd5e0;
  padding: 0.75rem;
  font-size: 1rem;
  color: inherit;
  resize: vertical;
  min-height: 180px;
}

textarea:focus {
  outline: 3px solid rgba(76, 110, 245, 0.25);
  border-color: #4c6ef5;
}

.input-actions {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:focus {
  outline: 3px solid rgba(76, 110, 245, 0.25);
}

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

button.primary {
  background: linear-gradient(135deg, #4c6ef5, #7950f2);
  color: #fff;
  box-shadow: 0 12px 24px rgba(76, 110, 245, 0.25);
}

button.secondary {
  background: transparent;
  color: #4c6ef5;
  border: 2px solid #4c6ef5;
}

.info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: #eef1fb;
  color: #4c6ef5;
  border: 2px solid transparent;
  box-shadow: 0 8px 16px rgba(31, 42, 68, 0.08);
}

.info-button:hover {
  box-shadow: 0 12px 24px rgba(31, 42, 68, 0.12);
}

.info-button:focus-visible {
  outline: none;
  border-color: #4c6ef5;
  box-shadow: 0 0 0 4px rgba(76, 110, 245, 0.2);
}

.stats-panel {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: #f4f6ff;
  border: 1px solid #dfe4ff;
  color: #37406b;
  line-height: 1.5;
}

.stats-panel p {
  margin: 0 0 0.75rem;
}

.stats-panel ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

.stats-panel li {
  margin-bottom: 0.35rem;
}

.stats-panel small {
  display: block;
  margin-top: 0.35rem;
  color: #5f6b8a;
}

.options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.25rem 0;
  flex-wrap: wrap;
}

.choice {
  flex: 1 1 200px;
  min-height: 80px;
  background: #eef1fb;
  color: inherit;
  box-shadow: 0 8px 16px rgba(31, 42, 68, 0.12);
  border-radius: 16px;
  padding: 1rem;
}

.choice:hover {
  box-shadow: 0 12px 24px rgba(31, 42, 68, 0.18);
}

.vs {
  font-size: 1.125rem;
  color: #a0abc0;
}

#error-message {
  margin-top: 0.75rem;
  color: #d62839;
  font-weight: 600;
}

#progress {
  color: #5f6b8a;
  margin: 0;
}

.progress-container {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 0.6rem;
  background: #e1e6f3;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(31, 42, 68, 0.15);
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(135deg, #4c6ef5, #7950f2);
  border-radius: inherit;
  transition: width 0.3s ease;
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: #5f6b8a;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.forgot-password-container {
  text-align: right;
  margin-top: -0.5rem;
}

.link-button {
  background: transparent;
  border: none;
  color: #4c6ef5;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
  text-decoration: underline;
}

.link-button:hover {
  color: #3b5bdb;
}

.guest-warning {
  font-size: 0.85rem;
  color: #5f6b8a;
  text-align: center;
  margin-top: 0.5rem;
}

.success {
  color: #2b8a3e;
  font-weight: 600;
  margin-top: 0.75rem;
}

.error {
  color: #d62839;
  font-weight: 600;
  margin-top: 0.75rem;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(31, 42, 68, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(31, 42, 68, 0.2);
}

.modal-content h2 {
  margin-top: 0;
}

.saved-lists {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
  max-height: 400px;
  overflow-y: auto;
}

.saved-list-item {
  background: #f6f8fb;
  border-radius: 8px;
  padding: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.saved-list-item:hover {
  border-color: #4c6ef5;
  background: #eef1fb;
}

.saved-list-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.saved-list-item p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: #5f6b8a;
}

.saved-list-item-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.saved-list-item-actions button {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.mode-selection {
  margin: 1.5rem 0;
}

.mode-selection h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: #1f2a44;
}

.mode-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mode-option {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  border: 2px solid #e1e6f3;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-option:hover {
  border-color: #4c6ef5;
  background: #f8f9ff;
}

.mode-option input[type="radio"] {
  margin-top: 0.2rem;
  margin-right: 0.75rem;
  cursor: pointer;
}

.mode-option input[type="radio"]:checked + .mode-label {
  color: #4c6ef5;
}

.mode-option input[type="radio"]:checked {
  accent-color: #4c6ef5;
}

.mode-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
}

.mode-label strong {
  font-size: 1rem;
  color: #1f2a44;
}

.mode-label small {
  font-size: 0.85rem;
  color: #5f6b8a;
  font-weight: normal;
}

.mode-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mode-option.disabled:hover {
  border-color: #e1e6f3;
  background: #fff;
}

.mode-option.disabled input[type="radio"] {
  cursor: not-allowed;
}

.mode-option.disabled .mode-label {
  cursor: not-allowed;
}

.info-message {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 6px;
  color: #5f6b8a;
}

.info-message small {
  display: block;
  font-size: 0.85rem;
}

.daily-options {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f8f9ff;
  border-radius: 8px;
  border: 1px solid #dfe4ff;
}

.daily-options h3 {
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 1rem;
  color: #1f2a44;
}

.daily-options .form-group {
  margin-bottom: 1rem;
}

.daily-options .form-group:last-child {
  margin-bottom: 0;
}

.daily-options label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f2a44;
}

.daily-options input[type="email"],
.daily-options input[type="time"] {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e1e6f3;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.daily-options input[type="email"]:focus,
.daily-options input[type="time"]:focus {
  outline: none;
  border-color: #4c6ef5;
}

.daily-options input[type="email"][readonly] {
  background-color: #f0f2f8;
  cursor: not-allowed;
}

.field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #5f6b8a;
  font-weight: normal;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.75rem;
  }

  .choice {
    min-height: 70px;
  }
}
