* {
  box-sizing: border-box;
}


body {
  margin: 0;

  font-family:
    Arial,
    "Noto Sans KR",
    sans-serif;

  background: #f5f7fa;

  color: #222;
}


.container {
  max-width: 900px;

  margin: 0 auto;

  padding: 40px 20px;
}


h1 {
  margin-bottom: 8px;

  font-size: 32px;
}


.subtitle {
  margin-top: 0;

  margin-bottom: 30px;

  color: #666;
}


/* =========================
   검색 영역
========================= */

.search-box {
  display: flex;

  gap: 10px;

  margin-bottom: 25px;
}


.search-box input {
  flex: 1;

  padding: 14px 16px;

  font-size: 16px;

  border: 1px solid #ccc;

  border-radius: 8px;
}


.search-box button {
  padding: 14px 24px;

  border: none;

  border-radius: 8px;

  background: #1565c0;

  color: white;

  font-size: 16px;

  cursor: pointer;
}


.search-box button:hover {
  background: #0d47a1;
}


/* =========================
   검색 결과 안내
========================= */

#summary {
  margin-bottom: 15px;

  color: #555;
}


/* =========================
   정렬 + 새로고침
========================= */

.control-box {
  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 12px;

  margin-bottom: 20px;
}


.sort-box {
  display: flex;

  gap: 8px;
}


.sort-button {
  padding: 9px 14px;

  border: 1px solid #ccc;

  border-radius: 7px;

  background: white;

  color: #444;

  font-size: 14px;

  cursor: pointer;
}


.sort-button:hover {
  background: #f0f0f0;
}


.sort-button.active {
  background: #1565c0;

  color: white;

  border-color: #1565c0;
}


/* =========================
   새로고침 버튼
========================= */

.refresh-button {
  padding: 9px 14px;

  border: 1px solid #1565c0;

  border-radius: 7px;

  background: white;

  color: #1565c0;

  font-size: 14px;

  font-weight: 600;

  cursor: pointer;
}


.refresh-button:hover {
  background: #eaf2fb;
}


.refresh-button:disabled {
  opacity: 0.6;

  cursor: not-allowed;
}


/* =========================
   주차장 카드
========================= */

.parking-card {
  background: white;

  border-radius: 12px;

  padding: 20px;

  margin-bottom: 18px;

  box-shadow:
    0 2px 8px
    rgba(0, 0, 0, 0.08);
}


.parking-card h2 {
  margin-top: 0;

  margin-bottom: 12px;
}


.available {
  font-size: 24px;

  font-weight: bold;

  color: #1565c0;
}


/* =========================
   주차장 상세정보
========================= */

.info-grid {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 10px 20px;

  margin-top: 16px;
}


.info-item {
  padding: 8px 0;

  border-bottom:
    1px solid #eee;
}


.label {
  color: #666;

  font-size: 14px;
}


.value {
  margin-top: 4px;

  font-weight: 600;
}


/* =========================
   주소 안내 / 지도보기
========================= */

.address-notice {
  margin-top: 16px;

  padding: 10px 12px;

  border-radius: 8px;

  background: #fff8e1;

  color: #6d5a16;

  font-size: 13px;

  line-height: 1.5;
}


.card-actions {
  display: flex;

  justify-content: flex-end;

  margin-top: 12px;
}


.map-button {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding: 11px 16px;

  border-radius: 8px;

  background: #fee500;

  color: #191919;

  font-size: 14px;

  font-weight: 700;

  text-decoration: none;

  cursor: pointer;
}


.map-button:hover {
  background: #f3da00;
}


/* =========================
   검색 결과 없음
========================= */

.no-result {
  background: white;

  padding: 30px;

  border-radius: 12px;

  text-align: center;

  color: #777;
}


/* =========================
   모바일
========================= */

@media (max-width: 600px) {

  .container {
    padding: 25px 15px;
  }


  h1 {
    font-size: 28px;
  }


  .search-box {
    flex-direction: column;
  }


  .search-box button {
    width: 100%;
  }


  .control-box {
    flex-direction: column;

    align-items: stretch;
  }


  .sort-box {
    width: 100%;
  }


  .sort-button {
    flex: 1;
  }


  .refresh-button {
    width: 100%;
  }


  .info-grid {
    grid-template-columns: 1fr;
  }


  .map-button {
    width: 100%;
  }
}

/* =========================
   PWA 설치 안내
========================= */

.install-box {
  display: flex;

  align-items: center;

  gap: 10px;

  margin-bottom: 18px;

  padding: 12px 14px;

  border-radius: 8px;

  background: white;

  border: 1px solid #e0e0e0;
}


.install-button {
  padding: 9px 14px;

  border: none;

  border-radius: 7px;

  background: #1565c0;

  color: white;

  font-size: 14px;

  font-weight: 700;

  cursor: pointer;
}


.install-button:hover {
  background: #0d47a1;
}


.install-guide {
  color: #666;

  font-size: 13px;
}



/* =========================
   V6 AI 요청 영역
========================= */

.ai-box {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 12px;
  background: #f3fbf6;
  border: 1px solid #b9e6c7;
}

.ai-box h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #176b37;
}

.ai-help {
  margin: 0 0 14px;
  color: #56705f;
  font-size: 14px;
}

.ai-input-row {
  display: flex;
  gap: 10px;
}

.ai-input-row input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid #b7c9bd;
  border-radius: 8px;
  font-size: 16px;
}

.ai-input-row button {
  padding: 14px 22px;
  border: none;
  border-radius: 8px;
  background: #169447;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.ai-input-row button:hover {
  background: #0f7738;
}

.ai-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: white;
  color: #5c6b60;
  font-size: 13px;
}

.ai-answer {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 4px solid #169447;
  background: white;
  line-height: 1.6;
}

#aiResult {
  margin-top: 14px;
}

@media (max-width: 600px) {
  .ai-input-row {
    flex-direction: column;
  }

  .ai-input-row button {
    width: 100%;
  }
}
