/* 기본 컨테이너 */
.employment-calculator {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px;
  background: #f5f5f0;
  border: 2px solid #333;
  font-family: 'Noto Sans KR', 'Malgun Gothic', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #222;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.15);
  box-sizing: border-box;
  line-height: 1.5;
}

.employment-calculator * {
  box-sizing: border-box;
}

/* 헤더 */
.calculator-header {
  text-align: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 3px double #333;
}

.calculator-header h2 {
  margin: 0 0 6px 0;
  font-size: 27px;
  font-weight: 700;
  color: #2c3e50;
  text-shadow: 2px 2px 0 rgba(255,255,255,0.5);
  line-height: 1.2;
}

.subtitle {
  margin: 0;
  font-size: 15px;
  color: #666;
  line-height: 1.4;
}

/* 빠른 액션 버튼 */
.quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-today,
.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #333;
  font-size: 15px;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
  font-family: inherit;
}

.btn-today:hover,
.btn-reset:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.btn-today:active,
.btn-reset:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.btn-today:focus-visible,
.btn-reset:focus-visible {
  outline: 3px solid #e67e22;
  outline-offset: 2px;
}

.btn-today {
  background: #3498db;
  color: #fff;
  border-color: #333;
}

/* 광고 섹션 */
.ad-section {
  display: block;
  width: 100%;
  min-height: 100px;
  padding: 15px;
  margin-bottom: 15px;
  text-align: center;
  background: #fff;
  border: 1px solid #333;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
  overflow: visible;
}

.ad-label {
  display: block;
  font-size: 13px;
  color: #999;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ad-section .adsbygoogle {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 90px;
  text-align: center;
  margin: 0 auto;
}

/* 메인 그리드 */
.calculator-main {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.input-section,
.preview-section,
.result-section {
  background: #fff;
  border: 1px solid #333;
  padding: 15px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
}

/* 섹션 타이틀 */
.section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
  font-size: 17px;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.2;
}

.input-section .section-title {
  color: #3498db;
}

.preview-section .section-title {
  color: #9b59b6;
}

.result-section .section-title {
  color: #27ae60;
}

/* 입력 그룹 */
.input-group {
  margin-bottom: 12px;
}

.input-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
  color: #555;
  line-height: 1.2;
}

/* 날짜 입력 */
.date-input,
.select-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #333;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  color: #222;
  font-family: inherit;
  transition: all 0.2s;
}

.date-input:focus,
.select-input:focus {
  outline: none;
  background: #fffacd;
  border-color: #e67e22;
}

/* 힌트 */
.input-hint {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: #666;
  font-weight: 600;
}

/* 빠른 날짜 버튼 */
.quick-date-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 6px;
}

.quick-date-btn {
  padding: 5px 8px;
  background: #f0f0f0;
  border: 1px solid #333;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.quick-date-btn:hover {
  background: #e0e0e0;
  transform: scale(1.02);
}

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

.quick-date-btn:focus-visible {
  outline: 2px solid #e67e22;
  outline-offset: 2px;
}

/* 계산 버튼 */
.btn-calculate {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #27ae60;
  color: #fff;
  border: 1px solid #333;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
  font-family: inherit;
  margin-bottom: 15px;
}

.btn-calculate:hover {
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
}

.btn-calculate:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.btn-calculate:focus-visible {
  outline: 3px solid #e67e22;
  outline-offset: 2px;
}

/* 기념일 섹션 */
.milestone-section {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed #ddd;
}

.milestone-section h4 {
  margin: 0 0 10px 0;
  font-size: 15px;
  font-weight: 700;
  color: #555;
}

.milestone-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.milestone-btn {
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #333;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
  font-family: inherit;
}

.milestone-btn:hover {
  background: #f39c12;
  color: #fff;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.milestone-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.milestone-btn:focus-visible {
  outline: 2px solid #e67e22;
  outline-offset: 2px;
}

/* 근속 기간 디스플레이 */
.tenure-display {
  margin-bottom: 15px;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 2px solid #333;
  text-align: center;
}

.tenure-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tenure-value {
  font-size: 35px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  line-height: 1.2;
}

.tenure-label {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  opacity: 0.9;
}

/* 날짜 정보 */
.date-info {
  padding: 12px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  margin-bottom: 15px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 15px;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-label {
  font-weight: 600;
  color: #555;
}

.info-value {
  font-weight: 700;
  color: #222;
}

/* 기간 정보 */
.period-info {
  padding: 12px;
  background: #f9f9f9;
  border: 1px solid #ddd;
}

.period-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #333;
  text-align: center;
}

.period-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 14px;
}

.period-item:last-child {
  margin-bottom: 0;
}

.period-label {
  font-weight: 600;
  color: #555;
}

.period-value {
  font-weight: 700;
  color: #9b59b6;
  font-family: 'Courier New', monospace;
}

/* 결과 아이템 */
.result-item {
  margin-bottom: 10px;
}

.result-item:last-child {
  margin-bottom: 0;
}

.result-item label {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
  color: #555;
  line-height: 1.2;
}

.result-value-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #f9f9f9;
  border: 1px solid #333;
}

.result-value {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: #222;
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

/* 복사 버튼 */
.btn-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #fff;
  border: 1px solid #333;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
  font-family: inherit;
}

.btn-copy:hover {
  background: #f0f0f0;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.btn-copy:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.btn-copy:focus-visible {
  outline: 2px solid #e67e22;
  outline-offset: 2px;
}

/* 기념일 정보 섹션 */
.milestone-info-section {
  background: #fff;
  border: 1px solid #333;
  padding: 15px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
  margin-bottom: 15px;
}

.milestone-info-section .section-title {
  color: #e67e22;
}

.milestone-result {
  padding: 12px;
  background: #fff8f0;
  border: 1px solid #ffa500;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  line-height: 1.6;
}

/* 히스토리 섹션 */
.history-section {
  background: #fff;
  border: 1px solid #333;
  padding: 15px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
  margin-bottom: 15px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.history-header .section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.btn-clear-history {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #fff;
  border: 1px solid #333;
  font-size: 14px;
  font-weight: 600;
  color: #e74c3c;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
  font-family: inherit;
}

.btn-clear-history:hover {
  background: #ffe6e6;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.btn-clear-history:focus-visible {
  outline: 2px solid #e67e22;
  outline-offset: 2px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-empty {
  text-align: center;
  padding: 20px;
  font-size: 15px;
  color: #999;
}

.history-item {
  padding: 10px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: all 0.2s;
}

.history-item:hover {
  background: #f0f0f0;
  border-color: #3498db;
  transform: translateX(2px);
}

.history-date {
  font-size: 14px;
  color: #999;
  margin-bottom: 4px;
}

.history-content {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

/* 푸터 노트 */
.footer-note {
  margin-top: 15px;
  padding: 15px;
  background: #f0f0f0;
  border: 2px dashed #999;
}

.footer-note p {
  margin: 0 0 8px 0;
  font-size: 15px;
  font-weight: 700;
  color: #333;
}

.footer-note ul {
  margin: 0;
  padding-left: 20px;
  list-style-type: disc;
}

.footer-note li {
  font-size: 15px;
  color: #666;
  margin-bottom: 4px;
  line-height: 1.5;
}

.footer-note li:last-child {
  margin-bottom: 0;
}

/* 토스트 */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #27ae60;
  color: #fff;
  padding: 12px 20px;
  border: 2px solid #333;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 90%;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.toast-title {
  font-size: 15px;
  font-weight: 700;
}

.toast-value {
  font-size: 14px;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

/* 반응형: 태블릿 */
@media (max-width: 1024px) {
  .calculator-main {
    grid-template-columns: 1fr 1fr;
  }
  
  .result-section {
    grid-column: 1 / -1;
  }
  
  .milestone-buttons {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 반응형: 모바일 */
@media (max-width: 768px) {
  .employment-calculator {
    padding: 10px;
  }
  
  .calculator-main {
    grid-template-columns: 1fr;
  }
  
  .calculator-header h2 {
    font-size: 23px;
  }
  
  .subtitle {
    font-size: 13px;
  }
  
  .quick-actions {
    flex-direction: column;
  }
  
  .btn-today,
  .btn-reset {
    width: 100%;
    justify-content: center;
  }
  
  .tenure-value {
    font-size: 27px;
  }
  
  .milestone-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .toast-value {
    max-width: 250px;
  }
}

/* 반응형: 작은 모바일 */
@media (max-width: 480px) {
  .employment-calculator {
    padding: 8px;
  }
  
  .calculator-header {
    margin-bottom: 12px;
  }
  
  .calculator-header h2 {
    font-size: 21px;
  }
  
  .quick-date-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .milestone-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tenure-value {
    font-size: 25px;
  }
  
  .date-input,
  .select-input {
    font-size: 16px;
  }
  
  .toast-value {
    max-width: 200px;
  }
}