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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

header {
  background: #0066cc;
  color: white;
  padding: 1rem 1rem 2rem 1rem;
  text-align: center;
  position: relative;
}

.language-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

@media (max-width: 768px) {
  header {
    padding: 1rem 1rem 2rem 1rem;
  }

  .language-toggle {
    position: static;
    justify-content: center;
    margin-bottom: 1rem;
  }

  header h1 {
    margin-top: 0;
  }
}

.lang-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lang-btn.active {
  background: white;
  color: #0066cc;
  border-color: white;
}

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

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.calculator-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.input-section {
  padding: 2rem;
  border-bottom: 1px solid #eee;
}

.input-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #555;
}

.input-section input,
.input-section select {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1.5rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.input-section input:focus,
.input-section select:focus {
  outline: none;
  border-color: #0066cc;
}

#calculate-btn {
  background: #0066cc;
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s;
}

#calculate-btn:hover {
  background: #0052a3;
}

.results-section {
  padding: 2rem;
  border-bottom: 1px solid #eee;
  min-height: 100px;
}

.results-section.hidden {
  display: none;
}

.comparison-section {
  padding: 2rem;
  border-bottom: 1px solid #eee;
  background: #fafbfc;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.ticket-option {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  border: 2px solid #ddd;
  text-align: center;
  position: relative;
}

.ticket-option.recommended {
  border-color: #28a745;
  background: #f8fff8;
}

.ticket-option.recommended::before {
  content: attr(data-recommended-text);
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #28a745;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
}

.ticket-option h4 {
  margin-bottom: 1rem;
  color: #0066cc;
}

.price-display {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.5rem;
}

.price-per-trip {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.savings-badge {
  background: #28a745;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
}

.break-even-section {
  padding: 2rem;
  border-bottom: 1px solid #eee;
  background: #f9f9f9;
}

.break-even-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.break-even-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  border: 2px solid #e9ecef;
  transition: border-color 0.2s;
}

.break-even-card:hover {
  border-color: #0066cc;
}

.break-even-card h4 {
  margin-bottom: 1rem;
  color: #0066cc;
  font-size: 1rem;
}

.break-even-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #28a745;
  line-height: 1;
}

.break-even-label {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.break-even-details {
  color: #666;
  font-size: 0.8rem;
  line-height: 1.3;
}

.break-even-tip {
  background: #e3f2fd;
  padding: 1rem;
  border-radius: 6px;
  margin-top: 1rem;
  border-left: 4px solid #0066cc;
}

.result-card {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.result-card h3 {
  color: #0066cc;
  margin-bottom: 1rem;
}

.discount-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.discount-tier {
  background: white;
  padding: 1rem;
  border-radius: 4px;
  border-left: 4px solid #0066cc;
}

.discount-tier strong {
  color: #0066cc;
}

.savings-highlight {
  background: #e8f5e8;
  border: 2px solid #28a745;
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  margin-top: 1rem;
}

.savings-highlight .amount {
  font-size: 1.5rem;
  font-weight: bold;
  color: #28a745;
}

.info-section {
  padding: 2rem;
  background: #f8f9fa;
}

.info-section h3 {
  margin-bottom: 1rem;
  color: #0066cc;
}

.info-section ul {
  list-style: none;
  padding-left: 0;
}

.info-section li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.info-section li:last-child {
  border-bottom: none;
}

.info-section small {
  color: #666;
  font-style: italic;
}

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

  .discount-breakdown {
    grid-template-columns: 1fr;
  }

  main {
    margin: 1rem auto;
  }
}
