body {
    margin: 0 auto;
    line-height: 1.5;
}

#contents {
    padding-left: 0px;
    padding: 0px 0px;
}

#contents .detail_search {
    margin: 1px;
    margin-bottom: 1px;
    border: 1px solid #e0e0e0;
    padding: 1px 1px;
    font-size: 17px;
}

/* 찾은검색, 주소찾기 */
#aptKwd #aptAddr {
    text-align: center;
    font-size: 15px;
    color: #f84f0c;
    line-height: 5px;
}

a:hover {
    cursor: pointer;
    background-color: #c8f8a1;
}

#aptKwd a:hover,
#aptAddr a:hover {
    cursor: pointer;
}

/* 통합 및 상세 검색 버튼 */
#contents .detail_search .bigbtn {
    width: 95px;
    height: 35px;
    display: inline-block;
    font-size: 14px;
    color: red;
    text-align: center;
    vertical-align: middle;
    background-color: blue;
    border: 0;
    cursor: pointer;
    margin: 1px;
    padding: 6px 12px;
}

#contents .detail_search .bigbtn:hover {
    background-color: #E9602C;
}

#tables {
    clear: both;
    position: relative;
    width: 100%;
    font-size: 13px;
    color: #5C636A;
    padding: 4px 0 4px 4px;
}

#tables h1 {
    clear: both;
    position: relative;
    width: 100%;
    border-top: 1px solid #d7d7d7;
}

table.type10 {
    width: 100%;
    border: 1px solid #d8d7d7;
    border-collapse: collapse;
    text-align: left;
    line-height: 1.5;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    margin: 0px 0px;
    font-size: 13px;
    overflow-x: auto;
}

table.type10 th {
    padding: 5px;
    vertical-align: top;
    text-align: center;
    color: #ffffff;
    background: #5C636A;
    margin: 2px 2px;
}

table.type10 td {
    padding: 3px;
    vertical-align: top;
    border: 1px solid #f3f3f3;
}

table.type10.type11 th {
    position: sticky;
    top: 0px;
    padding: 5px;
    vertical-align: top;
    text-align: center;
    color: #ffffff;
    background: #5C636A;
    margin: 2px 2px;
}

table.type10 td a {
    color: #ce6767;
    cursor: pointer;
    text-decoration: none;
}

table.type10 th a {
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
}

table.type10 tr:nth-child(even) {
    background: #dddddd;
}

table.type10 tr:nth-child(odd) {
    background: #ffffff;
}

@media all and (max-width: 1024px) and (min-width: 768px) {
    div {
        width: 98%;
    }
}

* {
    font-family: "Noto Sans KR" !important;
    line-height: 1.7;
}

a {
    cursor: pointer;
    text-decoration: none;
}

/* 연산자 선택 필드 */
#operator {
    text-align: center;
    font-weight: bold;
    font-size: 18px;
}

/* AI 그래프 */
#aiGraph {
    text-align: center;
    margin: 20px 0;
}

p {
    margin: 10px 0;
}

/* AI 버튼 */
.aiBtn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    min-height: 40px;
    min-width: 130px;
    width: 130px;
    height: 40px;
    text-align: center;
    vertical-align: middle;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aiBtn:hover {
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.aiBtn:not(:last-child) {
    margin-right: 10px;
}

/* 반응형 이미지 */
.responsive-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.responsive-image-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 10px;
}

.responsive-image-mobile {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 폼 컨트롤 오버라이드 */
html body .form-control {
    border: 1px solid #ccc;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .responsive-image-container {
        padding: 5px;
    }

    .entry-content {
        padding: 10px;
    }
}

/* Bootstrap 유틸리티 클래스 */
.mb-3 {
    margin-bottom: 1rem !important;
}

.btn {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.d-flex.justify-content-center .btn,
.d-flex.justify-content-center .bigbtn {
    margin: 0 5px;
}

/* 아파트 검색 폼 스타일 - 간격 최소화 */
#graph,
#report {
    display: none;
}

/* 커스텀 입력 필드 스타일 - 간격 최소화 */
.custom-input {
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    font-family: 'Noto Sans KR', sans-serif !important;
    margin-bottom: 0 !important;
}

.custom-input:focus {
    outline: none !important;
    border-color: #4a90e2 !important;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1) !important;
    transform: translateY(-1px) !important;
}

.custom-input:hover {
    border-color: #4a90e2 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

/* placeholder 스타일 표준화 */
.custom-input::placeholder {
    color: #999999 !important;
    font-weight: 400 !important;
    font-size: 13px !important;
}

/* Webkit 브라우저용 placeholder 스타일 */
.custom-input::-webkit-input-placeholder {
    color: #999999 !important;
    font-weight: 400 !important;
    font-size: 13px !important;
}

/* Firefox용 placeholder 스타일 */
.custom-input::-moz-placeholder {
    color: #999999 !important;
    font-weight: 400 !important;
    font-size: 13px !important;
}

/* IE용 placeholder 스타일 */
.custom-input:-ms-input-placeholder {
    color: #999999 !important;
    font-weight: 400 !important;
    font-size: 13px !important;
}

/* 줄간 간격 최소화 */
.mb-2 {
    margin-bottom: 0.25rem !important;
}

.mb-3 {
    margin-bottom: 0.5rem !important;
}

/* 모바일에서 간격 줄이기 */
@media (max-width: 767.98px) {
    .mb-2 {
        margin-bottom: 0.25rem !important;
    }

    .mb-3 {
        margin-bottom: 0.5rem !important;
    }

    .custom-input {
        padding: 10px 12px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        border: 1px solid #cccccc !important;
    }

    .custom-input:focus {
        border-color: #4a90e2 !important;
        box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15) !important;
    }

    .detail_search {
        padding: 12px !important;
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
        border: 1px solid #e8e8e8 !important;
    }

    /* 모바일에서 버튼 영역 여백 조정 */
    .d-flex.justify-content-center {
        margin-top: 8px !important;
    }

    /* 모바일에서 연산자 선택 필드 스타일 */
    #operator {
        text-align: center !important;
        font-weight: bold !important;
        font-size: 16px !important;
    }

    .aiBtn {
        width: 130px !important;
        height: 40px !important;
        min-width: 130px !important;
        min-height: 40px !important;
        font-size: 14px !important;
        padding: 8px 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 5px !important;
    }
    
    .aiBtn:not(:last-child) {
        margin-right: 8px !important;
    }
    
    /* AI 버튼 컨테이너 스타일 */
    p[style*="display: flex"] {
        display: flex !important;
        gap: 8px !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: nowrap !important;
        margin: 10px 0 !important;
    }
}

/* 컴퓨터용 스타일 - 한 줄 레이아웃 */
@media (min-width: 768px) {
    .custom-input {
        height: 36px !important;
        padding: 6px 10px !important;
    }

    .detail_search {
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
        border-radius: 8px !important;
        padding: 16px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
        border: 1px solid #e8e8e8 !important;
    }
    
    /* 컴퓨터에서 연산자 선택 필드 스타일 */
    #operator {
        text-align: center !important;
        font-weight: bold !important;
        font-size: 16px !important;
        padding: 6px 4px !important;
    }

    /* 컴퓨터용 input 필드 크기 조정 */
    .col-md-1-5 {
        flex: 0 0 12.5%;
        max-width: 12.5%;
    }
    
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .aiBtn {
        min-width: 120px !important;
        padding: 10px 20px !important;
        font-size: 14px !important;
        min-height: 40px !important;
    }
}

/* 버튼 영역 상단 여백 최소화 */
.d-flex.justify-content-center {
    margin-top: 8px;
}

/* row 간격 최소화 */
.row {
    margin-bottom: 0.25rem !important;
}

.row > * {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/* 아파트명 그룹화 결과 카드 스타일 - 강화 */
.apartment-groups-container {
    background: #f8f9fa !important;
    border-radius: 8px !important;
    padding: 15px !important;
    margin: 10px 0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.apartment-groups-title {
    font-size: 1.1em !important;
    font-weight: 600 !important;
    color: #2196F3 !important;
    margin-bottom: 15px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}

.apartment-groups-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
    margin-top: 15px !important;
    width: 100% !important;
}

.apartment-group-item {
    background: white !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    padding: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 80px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.apartment-group-item:hover {
    background: #e8f4ff !important;
    border-color: #2196F3 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.15) !important;
}

.apartment-group-info {
    flex: 1 !important;
    width: 100% !important;
}

.apartment-name-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 4px !important;
    width: 100% !important;
}

.apartment-name {
    font-weight: 600 !important;
    color: #333 !important;
    font-size: 0.9em !important;
    line-height: 1.3 !important;
    word-break: break-all !important;
    flex: 1 !important;
    margin-right: 8px !important;
}

.apartment-count {
    background: #2196F3 !important;
    color: white !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 0.8em !important;
    text-align: center !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.apartment-location {
    color: #666 !important;
    font-size: 0.8em !important;
    line-height: 1.2 !important;
    word-break: break-all !important;
}

.apartment-total {
    background: #1976D2 !important;
    color: white !important;
    padding: 6px 15px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
    display: inline-block !important;
}

/* 반응형 디자인 - 통합 */
@media (max-width: 1200px) {
    .apartment-groups-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        font-size: 1.1em !important;
    }
}

@media (max-width: 768px) {
    .apartment-groups-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .apartment-group-item {
        padding: 10px !important;
        min-height: 70px !important;
    }
    .apartment-name {
        font-size: 0.85em !important;
    }
    .apartment-location {
        font-size: 0.75em !important;
    }
    .apartment-count {
        font-size: 0.75em !important;
        padding: 3px 6px !important;
    }
}

@media (max-width: 480px) {
    .apartment-groups-grid {
        grid-template-columns: 1fr !important;
    }
    .apartment-group-item {
        padding: 12px !important;
        min-height: 60px !important;
    }
    .apartment-name {
        font-size: 0.9em !important;
    }
    .apartment-location {
        font-size: 0.8em !important;
    }
    .apartment-count {
        font-size: 0.8em !important;
        padding: 4px 8px !important;
    }
    .apartment-groups-title {
        font-size: 1em !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }
    .apartment-total {
        font-size: 0.9em !important;
        padding: 4px 12px !important;
    }
}

/* 모바일 전용 스타일 강화 */
@media (max-width: 767.98px) {
    .apartment-groups-container {
        background: #f8f9fa !important;
        border-radius: 12px !important;
        padding: 20px !important;
        margin: 15px 0 !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .apartment-groups-title {
        font-size: 1.2em !important;
        font-weight: 700 !important;
        color: #2196F3 !important;
        margin-bottom: 20px !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
    }
    
    .apartment-groups-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        margin-top: 20px !important;
        width: 100% !important;
    }
    
    .apartment-group-item {
        background: white !important;
        border: 2px solid #e0e0e0 !important;
        border-radius: 10px !important;
        padding: 16px !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        min-height: 100px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    }
    
    .apartment-group-item:hover {
        background: #e8f4ff !important;
        border-color: #2196F3 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 16px rgba(33, 150, 243, 0.2) !important;
    }
    
    .apartment-group-info {
        flex: 1 !important;
        width: 100% !important;
    }
    
    .apartment-name-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 8px !important;
        width: 100% !important;
    }
    
    .apartment-name {
        font-weight: 700 !important;
        color: #333 !important;
        font-size: 1.1em !important;
        line-height: 1.4 !important;
        word-break: break-all !important;
        flex: 1 !important;
        margin-right: 12px !important;
    }
    
    .apartment-count {
        background: #2196F3 !important;
        color: white !important;
        padding: 6px 12px !important;
        border-radius: 15px !important;
        font-weight: 700 !important;
        font-size: 0.9em !important;
        text-align: center !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    
    .apartment-location {
        color: #666 !important;
        font-size: 0.9em !important;
        line-height: 1.3 !important;
        word-break: break-all !important;
    }
    
    .apartment-total {
        background: #1976D2 !important;
        color: white !important;
        padding: 8px 20px !important;
        border-radius: 25px !important;
        font-weight: 700 !important;
        margin-bottom: 20px !important;
        display: inline-block !important;
        font-size: 1.1em !important;
    }
}

/* 큰 버튼 스타일 추가 */
.btn-primary.bigbtn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    min-height: 48px;
    min-width: 100px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary.bigbtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 모바일에서도 큰 버튼 유지 */
@media (max-width: 767.98px) {
    .btn-primary.bigbtn {
        padding: 14px 20px;
        font-size: 15px;
        min-height: 44px;
        min-width: 90px;
    }
}

/* g2b.php와 동일한 버튼 스타일 */
.d-flex.justify-content-center .btn {
    width: 80px;
    height: 35px;
    font-size: 14px;
    padding: 0px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}

.d-flex.justify-content-center .btn:hover {
    opacity: 0.8;
}

/* 모바일 대응 */
@media (max-width: 767.98px) {
    .d-flex.justify-content-center {
        display: flex;
        gap: 8px;
        justify-content: center;
    }
    
    .d-flex.justify-content-center .btn {
        flex: 1;
        height: 40px;
        font-size: 14px;
        width: auto;
    }
}

/* 주소 카드 모달 스타일 - 개선된 버전 */
.address-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10001;
  backdrop-filter: blur(2px);
}

.address-modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  max-width: 95%;
  max-height: 85%;
  width: 1000px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.address-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  color: white;
  position: relative;
}

.address-modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.address-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}

.address-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.address-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.address-modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
  background: #fafbfc;
}

.address-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.address-card {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.address-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2196F3, #64B5F6);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.address-card:hover {
  border-color: #2196F3;
  box-shadow: 0 8px 25px rgba(33, 150, 243, 0.15);
  transform: translateY(-4px);
}

.address-card:hover::before {
  transform: scaleX(1);
}

.address-card:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.2);
}

.address-card-content {
  display: flex;
  flex-direction: column;
  padding: 12px;
  min-height: 60px;
  justify-content: center;
  text-align: center;
  position: relative;
}

.address-text {
  flex: 1;
}

.address-province {
  font-size: 16px;
  color: #2196F3;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.address-detail {
  font-size: 16px;
  color: #2c3e50;
  font-weight: 500;
  line-height: 1.4;
}

/* 모바일 반응형 - 2컬럼 */
@media (max-width: 768px) {
  .address-modal-overlay {
    align-items: flex-start;
    padding: 16px;
  }
  
  .address-modal-content {
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    margin-top: 20px;
  }
  
  .address-modal-header {
    padding: 8px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  .address-modal-header h3 {
    font-size: 16px;
  }
  
  .address-modal-body {
    padding: 20px;
    max-height: calc(90vh - 50px);
  }
  
  .address-cards-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .address-card-content {
    padding: 10px;
    min-height: 50px;
  }
  
  .address-province {
    font-size: 16px;
  }
  
  .address-detail {
    font-size: 16px;
  }
}

/* 작은 모바일 화면 - 1컬럼 */
@media (max-width: 480px) {
  .address-modal-overlay {
    padding: 8px;
  }
  
  .address-modal-content {
    margin-top: 10px;
    max-height: 95vh;
  }
  
  .address-modal-header {
    padding: 7px 16px;
  }
  
  .address-modal-header h3 {
    font-size: 16px;
  }
  
  .address-modal-body {
    padding: 16px;
    max-height: calc(95vh - 40px);
  }
  
  .address-cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .address-card-content {
    padding: 12px;
    min-height: 45px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
  }
  
  .address-text {
    flex: 1;
  }
  
  .address-province {
    font-size: 16px;
    margin-bottom: 4px;
  }
  
  .address-detail {
    font-size: 16px;
  }
}

/* 매우 작은 화면 */
@media (max-width: 360px) {
  .address-modal-overlay {
    padding: 0;
  }
  
  .address-modal-content {
    margin-top: 0;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .address-modal-header {
    padding: 6px 16px;
  }
  
  .address-modal-body {
    padding: 12px;
    max-height: calc(100vh - 35px);
  }
  
  .address-cards-container {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .address-card-content {
    padding: 10px;
    min-height: 40px;
  }
  
  .address-province {
    font-size: 16px;
  }
  
  .address-detail {
    font-size: 16px;
  }
}

/* 스크롤바 스타일링 */
.address-modal-body::-webkit-scrollbar {
  width: 8px;
}

.address-modal-body::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: 4px;
}

.address-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #2196F3, #64B5F6);
  border-radius: 4px;
}

.address-modal-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1976D2, #2196F3);
}

/* 모든 버튼의 마진을 3px로 통일 */
.btn, .bigbtn, .aiBtn, .action-link, button {
    margin: 3px !important;
}

/* 모바일에서 4글자 버튼명이 한 줄에 나오도록 개선 */
@media (max-width: 767.98px) {
    .btn, .bigbtn, .aiBtn, .action-link, button {
        margin: 3px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        min-width: 0 !important;
        flex-shrink: 1 !important;
        font-size: 15px !important;
        letter-spacing: -0.5px !important;
        padding: 8px 4px !important;
    }
    
    /* 버튼 컨테이너에서 버튼들이 한 줄에 나오도록 */
    .btn_area, .d-flex.justify-content-center, .bid-card-actions {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 3px !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    /* 각 버튼이 동일한 비율로 공간 차지 */
    .btn_area .bigbtn,
    .d-flex.justify-content-center .btn,
    .bid-card-actions .action-link {
        flex: 1 !important;
        min-width: 0 !important;
        max-width: none !important;
        text-align: center !important;
        font-size: 15px !important;
        letter-spacing: -0.5px !important;
        padding: 8px 2px !important;
    }
    
    /* 매우 작은 화면에서도 4글자 버튼명 유지 */
    @media (max-width: 480px) {
        .btn, .bigbtn, .aiBtn, .action-link, button {
            font-size: 15px !important;
            letter-spacing: -1px !important;
            padding: 6px 1px !important;
        }
    }
    
    /* 극히 작은 화면에서도 4글자 버튼명 강제 유지 */
    @media (max-width: 360px) {
        .btn, .bigbtn, .aiBtn, .action-link, button {
            font-size: 15px !important;
            letter-spacing: -1.5px !important;
            padding: 5px 0px !important;
        }
    }
}

/* 기존 버튼 스타일 개선 */
.btn_area .bigbtn {
    margin: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.aiBtn {
    margin: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.d-flex.justify-content-center .btn {
    margin: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.bid-card-actions .action-link {
    margin: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* 검색 기록 카드 스타일 수정 */
.search-history-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #2196F3;
  margin-bottom: 15px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.search-history-container {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.search-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 30px;
  box-sizing: border-box;
  min-width: 0;
}

.search-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-card-content {
  flex: 1;
  min-width: 0;
}

.search-keyword {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.search-keyword:hover {
  color: #f1c40f;
  text-decoration: none;
}

.search-card-actions {
  margin-left: 6px;
  flex-shrink: 0;
}

.btn-delete {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.btn-delete:hover {
  background: rgba(231, 76, 60, 0.8);
  transform: scale(1.1);
}

.delete-all-card {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  width: 100%;
  height: 30px;
  justify-content: center;
}

.btn-delete-all {
  background: transparent;
  border: 1px solid white;
  border-radius: 12px;
  color: white;
  padding: 2px 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 10px;
  transition: all 0.3s ease;
  line-height: 1.2;
}

.btn-delete-all:hover {
  background: white;
  color: #e74c3c;
  transform: scale(1.05);
}

/* 반응형 디자인 - 컴퓨터 */
@media (max-width: 1200px) {
  .search-history-container {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 992px) {
  .search-history-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 반응형 디자인 - 태블릿 */
@media (max-width: 768px) {
  .search-history-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  
  .search-card {
    padding: 5px 8px;
    height: 28px;
  }
  
  .search-keyword {
    font-size: 11px;
  }
  
  .btn-delete {
    width: 16px;
    height: 16px;
    font-size: 9px;
  }
}

/* 반응형 디자인 - 모바일 */
@media (max-width: 480px) {
  .search-history-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }
  
  .search-card {
    padding: 4px 6px;
    height: 26px;
  }
  
  .search-keyword {
    font-size: 10px;
  }
  
  .btn-delete {
    width: 14px;
    height: 14px;
    font-size: 8px;
  }
  
  .search-history-title {
    font-size: 1em;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

/* 모바일에서 제목 스타일 */
@media (max-width: 768px) {
  .search-history-title {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 20px;
    gap: 10px;
  }
}

/* AptClass.js의 hover-row와 selected-row 클래스용 스타일 */
table.type10 tbody tr.hover-row {
    background-color: #fff9c4 !important; /* 엷은 노란색 */
}

table.type10 tbody tr.selected-row {
    background-color: #fff59d !important; /* 진한 노란색 */
    border-left: 3px solid #fbc02d;
}

/* 주소 카드 모달 스타일 */
.address-card-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.address-card-modal-content {
    background: white;
    border-radius: 12px;
    width: 50%;
    min-width: 400px;
    max-width: 800px;
    height: auto;
    max-height: 85%;
    min-height: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.address-card-modal-header {
    background: #2196F3;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
    height: 50px;
    box-sizing: border-box;
}

.address-card-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 3px;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    margin: 3px;
}

.address-card-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.address-card-modal-body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.address-card-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 80px;
    min-height: 80px;
    max-height: 80px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 3px;
    overflow: hidden;
}

.address-card-item:hover {
    border-color: #2196F3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.address-card-province {
    font-weight: 600;
    color: #2196F3;
    font-size: 13px;
    line-height: 1.3;
    word-break: break-all;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.address-card-detail {
    color: #333;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    word-break: break-all;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 검색 결과 표시 스타일 */
.search-result-container {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border-radius: 8px;
    padding: 8px 16px;
    margin: 8px 0;
    box-shadow: 0 4px 6px rgba(33, 150, 243, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9em;
}

.search-result-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-result-title span {
    font-weight: 500;
}

.search-result-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 12px;
    border-radius: 16px;
    font-weight: 600;
}

/* 아파트 그룹화 카드 스타일 */
.apartment-groups-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #2196F3;
    margin-bottom: 15px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.apartment-groups-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 15px;
    width: 100%;
}

.apartment-group-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 80px;
    width: 100%;
    box-sizing: border-box;
}

.apartment-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    width: 100%;
}

.apartment-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
    line-height: 1.3;
    word-break: break-all;
    flex: 1;
    margin-right: 8px;
}

.apartment-count {
    background: #2196F3;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8em;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.apartment-location {
    color: #666;
    font-size: 0.8em;
    line-height: 1.2;
    word-break: break-all;
}

.apartment-price-area-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    width: 100%;
}

.apartment-price {
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.9em;
    line-height: 1.2;
    word-break: break-all;
}

.apartment-area {
    color: #27ae60;
    font-weight: 500;
    font-size: 0.8em;
    line-height: 1.2;
    word-break: break-all;
}

.apartment-total {
    background: #1976D2;
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.0em;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 10px;
}

/* 숏링크 모달 스타일 */
.shortlink-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.shortlink-modal-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.shortlink-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 14px;
}

.shortlink-copy-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}

.shortlink-copy-btn:hover {
    background: #45a049;
}

/* 모바일 반응형 스타일 */
@media (max-width: 768px) {
    .address-card-modal {
        padding: 16px;
    }
    
    .address-card-modal-content {
        width: calc(100% - 32px);
        min-width: 280px;
        max-width: none;
        margin: 8px;
    }
    
    .address-card-modal-header {
        padding: 12px;
        font-size: 16px;
        height: 44px;
    }
    
    .address-card-modal-close {
        font-size: 18px;
        width: 28px;
        height: 28px;
    }
    
    .address-card-modal-body {
        padding: 12px;
        gap: 8px;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .address-card-item {
        padding: 10px;
        height: 60px;
        min-height: 60px;
        max-height: 60px;
        border-radius: 4px;
    }
    
    .address-card-province {
        font-size: 12px;
    }
    
    .address-card-detail {
        font-size: 12px;
    }
    
    .apartment-groups-title {
        font-size: 1.2em;
        margin-bottom: 20px;
        gap: 10px;
    }
    
    .apartment-groups-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
    }
    
    .apartment-group-item {
        border: 2px solid #e0e0e0;
        border-radius: 10px;
        padding: 16px;
        min-height: 100px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .apartment-name {
        font-weight: 700;
        font-size: 1.1em;
        margin-right: 12px;
    }
    
    .apartment-count {
        padding: 6px 12px;
        border-radius: 15px;
        font-weight: 700;
        font-size: 0.9em;
    }
    
    .apartment-location {
        font-size: 0.9em;
    }
    
    .apartment-price {
        font-weight: 700;
        font-size: 1.0em;
    }
    
    .apartment-area {
        font-weight: 600;
        font-size: 0.9em;
    }
    
    .apartment-total {
        padding: 3px 8px;
        border-radius: 6px;
        font-weight: 600;
        font-size: 0.9em;
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .address-card-modal-content {
        width: calc(100% - 32px);
        min-width: 280px;
    }
    
    .address-card-modal-header {
        padding: 12px;
        font-size: 16px;
    }
    
    .address-card-modal-body {
        padding: 12px;
        gap: 8px;
    }
    
    .address-card-item {
        padding: 10px;
        height: 60px;
        min-height: 60px;
        max-height: 60px;
    }
    
    .address-card-province {
        font-size: 12px;
    }
    
    .address-card-detail {
        font-size: 12px;
    }
}

/* 심플한 버튼 스타일 */
.btn-simple {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-simple:hover {
    opacity: 0.8;
}

.btn-simple:active {
    transform: translateY(1px);
}

/* 버튼 색상 */
.btn-search {
    background-color: #2c3e50 !important;
    color: white !important;
}

.btn-query {
    background-color: #e74c3c !important;
    color: white !important;
}

.btn-map {
    background-color: #3498db !important;
    color: white !important;
}

.btn-link {
    background-color: #f39c12 !important;
    color: white !important;
}

/* 모바일 반응형 */
@media (max-width: 767.98px) {
    .btn-simple {
        padding: 6px 12px;
        font-size: 13px;
        min-height: 32px;
    }
}