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

body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 400px;
}

.page-title {
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 20px;
  color: #000;
}

.mode-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.mode-btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid #000;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.mode-btn:hover {
  background: #f5f5f5;
}

.mode-btn.active {
  background: #000;
  color: #fff;
}

.mode-btn:active {
  transform: scale(0.98);
}

.converter {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.year-display {
  width: 100%;
  padding: 30px 20px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: border-color 0.2s;
}

.year-display:hover {
  border-color: #333;
}

.year-value {
  flex: 1;
  font-size: 64px;
  font-weight: 600;
  text-align: center;
  border: 2px solid #e0e0e0;
  outline: none;
  background: #fafafa;
  width: 100%;
  -moz-appearance: textfield;
  border-radius: 6px;
  padding: 10px 15px;
  transition: all 0.2s;
}

.year-value:hover {
  border-color: #bbb;
  background: #f5f5f5;
}

.year-value:focus {
  border-color: #000;
  background: #fff;
}

.year-value::-webkit-outer-spin-button,
.year-value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wareki-input {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: center;
}

.era-select {
  font-size: 32px;
  font-weight: 600;
  padding: 10px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  background: #fafafa;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.era-select:hover {
  border-color: #bbb;
  background: #f5f5f5;
}

.era-select:focus {
  outline: none;
  border-color: #000;
  background: #fff;
}

.era-year {
  flex: 1;
  font-size: 48px;
  font-weight: 600;
  text-align: center;
  border: 2px solid #e0e0e0;
  outline: none;
  background: #fafafa;
  -moz-appearance: textfield;
  border-radius: 6px;
  padding: 10px 15px;
  transition: all 0.2s;
}

.era-year:hover {
  border-color: #bbb;
  background: #f5f5f5;
}

.era-year:focus {
  border-color: #000;
  background: #fff;
}

.era-year::-webkit-outer-spin-button,
.era-year::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.year-controls {
  display: flex;
  gap: 10px;
}

.year-btn {
  width: 50px;
  height: 50px;
  font-size: 28px;
  font-weight: 600;
  border: 2px solid #000;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.year-btn:hover {
  background: #000;
  color: #fff;
}

.year-btn:active {
  transform: scale(0.95);
}

.result {
  min-height: 80px;
  padding: 20px;
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  border-radius: 8px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.result:empty {
  opacity: 0;
}

.tips-section {
  margin-top: 40px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #000;
}

.tip-item {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  opacity: 1;
  transition: opacity 0.3s;
}

@media (max-width: 480px) {
  .tips-section {
    margin-top: 30px;
    padding: 16px;
  }
  
  .tip-item {
    font-size: 13px;
  }
}