/* 공통 스타일 */
body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8a3 50%, #7fcdcd 100%);
    margin: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

/* 모바일 UI 스타일 */
.mobile-header {
    text-align: center;
    padding: 40px 20px 20px 20px;
    background: white;
}

.mobile-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #111;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.mobile-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
    margin: 0;
    letter-spacing: -0.01em;
}

.mobile-search-container {
    padding: 0 20px 20px 20px;
    background: white;
}

.mobile-search-bar {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    overflow: hidden;
}

.mobile-search-input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: #333;
}

.mobile-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.mobile-search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 15px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-search-btn:hover {
    transform: scale(1.05);
}

.mobile-divider {
    height: 1px;
    background: #eee;
    margin: 0 20px;
}

.mobile-content-section {
    padding: 30px 20px;
    background: white;
}

.mobile-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-carousel-viewport {
    overflow: hidden;
    flex: 1;
}

.mobile-carousel-track {
    display: flex;
    gap: 15px;
    transition: transform 0.3s ease;
}

.mobile-house-card {
    width: 200px;
    height: 260px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 12px 14px 12px;
    box-sizing: border-box;
    flex-shrink: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-house-card:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
}

.mobile-house-img {
    width: 170px;
    height: 140px;
    background: #f5f6fa;
    border-radius: 12px;
    box-shadow: 0 2px 8px #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #bbb;
    margin-bottom: 18px;
    overflow: hidden;
}

.mobile-house-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.mobile-house-img span {
    color: #999;
    font-size: 0.9rem;
}

.mobile-house-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #222;
    text-align: center;
    margin-top: 8px;
    letter-spacing: 0.01em;
    word-break: keep-all;
}

.mobile-carousel-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-carousel-btn:hover {
    background: #f8f9fa;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.mobile-carousel-btn:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 반응형 모바일 스타일 */
@media (max-width: 480px) {
    .mobile-title {
        font-size: 2rem;
    }
    
    .mobile-brand {
        font-size: 1rem;
    }
    
    .mobile-search-container {
        padding: 0 15px 15px 15px;
    }
    
    .mobile-content-section {
        padding: 20px 15px;
    }
    
    .mobile-house-card {
        width: 160px;
        height: 220px;
    }
    
    .mobile-house-img {
        width: 140px;
        height: 120px;
    }
    
    .mobile-house-name {
        font-size: 1rem;
    }
    
    .mobile-carousel-container {
        gap: 10px;
    }
    
    .mobile-carousel-track {
        gap: 10px;
    }
}

@media (max-width: 360px) {
    .mobile-title {
        font-size: 1.8rem;
    }
    
    .mobile-house-card {
        width: 140px;
        height: 200px;
    }
    
    .mobile-house-img {
        width: 120px;
        height: 100px;
    }
    
    .mobile-house-name {
        font-size: 0.9rem;
    }
}

/* 로그인 페이지 스타일 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #0056b3;
}

.error-message {
    color: #dc3545;
    text-align: center;
    margin-top: 10px;
    display: none;
}

.success-message {
    color: #28a745;
    text-align: center;
    margin-top: 10px;
    display: none;
    font-weight: 500;
}

/* 개인정보 처리방침 관련 스타일 */
.privacy-agreement {
    margin: 20px 0;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    margin-top: 2px;
}

.checkbox-label {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
    cursor: pointer;
}

.privacy-link {
    color: #2d72ff;
    text-decoration: none;
    font-weight: 500;
}

.privacy-link:hover {
    text-decoration: underline;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
    max-height: 50vh;
    overflow-y: auto;
}

.privacy-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
}

.privacy-content br {
    margin-bottom: 8px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn:not(.cancel) {
    background: #2d72ff;
    color: white;
}

.modal-btn:not(.cancel):hover {
    background: #1e5fd8;
}

.modal-btn.cancel {
    background: #6c757d;
    color: white;
}

.modal-btn.cancel:hover {
    background: #5a6268;
}

/* 반응형 모달 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 20px;
        max-height: 45vh;
    }
    
    .modal-footer {
        padding: 15px 20px;
    }
    
    .modal-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: #007bff;
    text-decoration: none;
}

/* 관리자 페이지 스타일 */
.admin-container { 
    max-width: 1000px; 
    margin: 40px auto; 
    background: #fff; 
    border-radius: 10px; 
    box-shadow: 0 2px 10px #eee; 
    padding: 40px 30px; 
}

.admin-title { 
    font-size: 2rem; 
    font-weight: 700; 
    text-align: center; 
    margin-bottom: 30px; 
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout-btn {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.logout-btn:hover {
    background: #c82333;
}

.success-message {
    color: #28a745;
    text-align: center;
    margin: 10px 0;
    display: none;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.role-admin { 
    background: #dc3545; 
    color: white; 
}

.role-sub_admin { 
    background: #ffc107; 
    color: black; 
}

.role-user { 
    background: #6c757d; 
    color: white; 
}

.category-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    background: #6c757d;
}

.admin-tabs { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 30px; 
    justify-content: center; 
}

.admin-tab { 
    padding: 12px 30px; 
    border-radius: 6px 6px 0 0; 
    background: #eee; 
    color: #222; 
    font-weight: 600; 
    cursor: pointer; 
    border: none; 
    font-size: 1.1rem; 
}

.admin-tab.active { 
    background: #2d72ff; 
    color: #fff; 
}

.admin-section { 
    display: none; 
}

.admin-section.active { 
    display: block; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-bottom: 20px; 
}

th, td { 
    border: 1px solid #ddd; 
    padding: 10px; 
    text-align: center; 
}

th { 
    background: #f0f4fa; 
}

label { 
    font-weight: 500; 
    margin-bottom: 6px; 
}

input, textarea { 
    padding: 10px; 
    border-radius: 6px; 
    border: 1px solid #ccc; 
    font-size: 1rem; 
    width: 100%; 
}

.admin-btn { 
    padding: 10px 18px; 
    border-radius: 6px; 
    border: none; 
    background: #2d72ff; 
    color: #fff; 
    font-weight: 600; 
    cursor: pointer; 
    margin-right: 8px; 
}

.admin-btn:hover { 
    background: #1956c6; 
}

.admin-btn.delete { 
    background: #e74c3c; 
}

.admin-btn.delete:hover { 
    background: #c0392b; 
}

.admin-btn.move { 
    background: #28a745; 
}

.admin-btn.move:hover { 
    background: #218838; 
}

.section-title { 
    font-size: 1.2rem; 
    font-weight: 700; 
    margin-bottom: 18px; 
}

/* 모델하우스 검색 스타일 */
.house-search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.house-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
}

.house-search-input:focus {
    outline: none;
    border-color: #2d72ff;
    box-shadow: 0 0 0 2px rgba(45, 114, 255, 0.2);
}

/* 링크 입력 필드 스타일 */
.link-input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.link-input-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

.link-input-item label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.link-input-item input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #fff;
}

.link-input-item input:focus {
    outline: none;
    border-color: #2d72ff;
    box-shadow: 0 0 0 2px rgba(45, 114, 255, 0.2);
}

.link-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.link-remove-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* Fieldset 스타일 */
fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin: 0;
}

legend {
    font-weight: 600;
    color: #333;
    padding: 0 10px;
    font-size: 1rem;
}

/* 메인 페이지 스타일 */
.header { 
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
    padding: 20px 60px 0 60px; 
}

.logo { 
    font-size: 2.2rem; 
    font-weight: 700; 
    letter-spacing: 2px; 
}

.login-signup { 
    font-size: 1.1rem; 
    font-weight: 400; 
}

.login-signup a { 
    color: #111; 
    text-decoration: none; 
    margin-left: 10px; 
}

.main-title { 
    text-align: center; 
    margin-top: 30px; 
}

.main-title h1 { 
    font-size: 2.5rem; 
    margin-bottom: 0.5rem; 
}

.main-title .brand { 
    font-size: 4rem; 
    font-weight: 900; 
    margin: 0.5rem 0 1.5rem 0; 
}

.search-bar { 
    display: flex; 
    justify-content: center; 
    margin: 30px 0 40px 0; 
}

.search-box { 
    width: 500px; 
    height: 50px; 
    border-radius: 30px; 
    border: none; 
    box-shadow: 0 2px 10px #eee; 
    padding: 0 60px 0 20px; 
    font-size: 1.2rem; 
}

.search-btn { 
    position: relative; 
    left: -45px; 
    background: none; 
    border: none; 
    font-size: 1.5rem; 
    cursor: pointer; 
}

.recent-section { 
    text-align: center; 
    margin-top: 30px; 
}

.recent-title { 
    font-size: 1.3rem; 
    font-weight: 600; 
    margin-bottom: 20px; 
}

.recent-list {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    gap: 0;
}

.carousel-viewport {
    overflow: hidden;
    width: 1075px;
    display: flex;
    align-items: center;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
    will-change: transform;
    gap: 15px;
}

.house-card {
    width: 200px;
    height: 260px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10), 0 1.5px 4px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 12px 14px 12px;
    box-sizing: border-box;
    margin: 0;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    cursor: pointer;
    user-select: none;
}

.house-card:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 8px 32px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.10);
}

.house-img {
    width: 170px;
    height: 140px;
    background: #f5f6fa;
    border-radius: 12px;
    box-shadow: 0 2px 8px #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #bbb;
    margin-bottom: 18px;
    overflow: hidden;
}

.house-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.house-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #222;
    text-align: center;
    margin-top: 8px;
    letter-spacing: 0.01em;
    word-break: keep-all;
}

.empty-card { 
    opacity: 0.6; 
}

/* 지도 페이지 스타일 */
#map {
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    z-index: 1;
}

.map-search-bar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0;
    background: transparent;
    padding: 0;
    align-items: center;
    width: 500px;
    height: 52px;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.side-panel.open ~ .map-search-bar {
    left: calc(50% - 200px);
    transform: translateX(-50%);
}

.side-panel.open ~ .hamburger-btn {
    right: calc(24px + 200px);
}

@media (max-width: 800px) {
    .side-panel.open ~ .map-search-bar {
        left: calc(50% - 45vw);
        transform: translateX(-50%);
    }
    
    .side-panel.open ~ .hamburger-btn {
        right: calc(24px + 45vw);
    }
}

.map-search-bar .search-box {
    width: 100%;
    height: 52px;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    font-weight: 400;
    padding: 0 20px 0 20px;
    outline: none;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-right: 0;
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: #333;
    letter-spacing: -0.01em;
    flex: 1;
    border: 1px solid rgba(255,255,255,0.3);
}

.map-search-bar .search-box::placeholder {
    color: #999;
    font-weight: 400;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.map-search-bar .search-box:focus::placeholder {
    opacity: 0.5;
}

.map-search-bar .search-box:focus {
    background: rgba(255,255,255,0.5);
    transform: translateY(-1px);
}

.map-search-bar .search-btn {
    height: 52px;
    width: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    color: #666;
    border: 1px solid rgba(255,255,255,0.3);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-sizing: border-box;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 8px;
}

.map-search-bar .search-btn:before {
    content: '';
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
}

.map-search-bar .search-btn:hover {
    background: rgba(0,0,0,0.05);
    transform: scale(1.1);
}

.map-search-bar .search-btn:active {
    transform: scale(0.95);
}

/* 카테고리 필터 스타일 */
.category-filter {
    position: fixed;
    top: 85px;
    left: calc(50% - 250px - 20px);
    display: flex;
    gap: 8px;
    z-index: 1000;
    padding: 8px;
    width: 500px;
    justify-content: center;
}

.filter-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 15px;
    background: #f0f0f0;
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    line-height: 1.2;
}

.filter-btn:hover {
    background: #e0e0e0;
}

.filter-btn.active {
    background: #2d72ff;
    color: white;
}

/* 햄버거 버튼 스타일 */
.hamburger-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 0;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.hamburger-btn span {
    width: 20px;
    height: 2px;
    background: #666;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-btn:hover {
    background: rgba(255,255,255,0.98);
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

.hamburger-btn:hover span {
    background: #333;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 사이드 패널 스타일 */
.side-panel {
    position: fixed;
    top: 0; 
    right: 0; 
    bottom: 0;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
    align-items: stretch;
    pointer-events: none;
    will-change: transform;
    backdrop-filter: blur(10px);
}

.side-panel.open {
    transform: translateX(0) !important;
    pointer-events: auto;
}

.side-panel.open .panel-close-btn {
    pointer-events: auto !important;
    z-index: 1002 !important;
}

.panel-close-btn {
    position: fixed;
    top: 12px; 
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    z-index: 1002;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    user-select: none;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.side-panel.open ~ .panel-close-btn {
    display: flex;
}

.panel-close-btn:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.panel-close-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.9);
}

/* 마커 호버 효과 */
.marker-hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* 펄스 효과 */
.pulse-effect {
    position: absolute;
    pointer-events: none;
    z-index: 999;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* 사이드 패널 내용 스타일 */
.info-header-image {
    width: 100%;
    height: 283px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

#headerImg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#headerImg:hover {
    transform: scale(1.02);
}

.info-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    text-align: left;
}

.house-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin: 12px 0;
    text-align: center;
}

.house-address {
    font-size: 0.9rem;
    color: #666;
    margin: 8px 0;
    line-height: 1.4;
    text-align: left;
}

.house-category {
    font-size: 0.85rem;
    color: #666;
    margin: 6px 0;
    text-align: left;
}

.house-type {
    font-size: 0.9rem;
    color: #666;
    margin: 6px 0;
    text-align: left;
}

.house-phone {
    font-size: 0.9rem;
    color: #666;
    margin: 6px 0;
    text-align: left;
}

.house-price {
    font-size: 0.9rem;
    color: #666;
    margin: 8px 0;
    text-align: left;
}

.house-ad {
    font-size: 0.9rem;
    color: #666;
    margin: 6px 0;
    text-align: left;
}

.house-size {
    font-size: 0.9rem;
    color: #666;
    margin: 6px 0;
    text-align: left;
}

.house-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 12px 0;
    text-align: left;
}

.links-container {
    margin-top: 20px;
}

.link-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.link-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.link-thumbnail {
    width: 60px;
    height: 45px;
    margin-right: 12px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.link-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.link-icon {
    font-size: 0.8rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 2px;
}

.link-text {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

/* 링크 타입별 스타일 */
.link-item.youtube {
    border-left: 4px solid #ff0000;
}

.link-item.blog {
    border-left: 4px solid #03c75a;
}

.link-item.cafe {
    border-left: 4px solid #4ecdc4;
}

.link-item.instagram {
    border-left: 4px solid #e91e63;
}

.link-item.facebook {
    border-left: 4px solid #3b5998;
}

.link-item.web {
    border-left: 4px solid #607d8b;
}

.copy-btn {
    background: #f0f0f0;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    margin-left: 8px;
}

.copy-btn:hover {
    background: #e0e0e0;
}

.ad-content {
    margin-top: 8px;
    padding: 0;
    background: transparent;
    border-radius: 6px;
    min-height: 60px;
    color: #666;
    font-style: italic;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* 링크 섹션 스타일 */
.links-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.links-content {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-item {
    display: block;
    padding: 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    font-style: normal;
    margin-bottom: 8px;
    overflow: hidden;
}

.link-item:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.link-thumbnail {
    width: 100%;
    height: 195px;
    overflow: hidden;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
    border-radius: 8px;
}

.link-item:hover .link-thumbnail img {
    transform: scale(1.05);
}

/* 검색 결과 스타일 */
.search-results {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-result-item {
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-title {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    margin-bottom: 4px;
}

.result-address {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 2px;
}

.result-category {
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
}

/* 전체화면 이미지 뷰어 스타일 */
.fullscreen-image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-image-viewer.active {
    display: flex;
    opacity: 1;
}

/* display: flex로 직접 설정할 때도 작동하도록 */
.fullscreen-image-viewer[style*="display: flex"] {
    opacity: 1;
}

.viewer-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000001;
    transition: all 0.2s ease;
}

.viewer-close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    transform: scale(1.1);
}

#viewerImage {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10000001;
}

.viewer-nav-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.viewer-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.viewer-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 반응형 스타일 */
@media (max-width: 800px) {
    .side-panel {
        width: 90vw;
        max-width: 400px;
    }
    
    .info-header-image {
        height: 240px;
    }
    
    .recent-list { 
        width: 95vw; 
        max-width: 775px;
    }
    
    .carousel-track {
        justify-content: center;
    }
    
    .house-card {
        width: 140px;
        height: 180px;
    }
    
    .house-img {
        width: 120px;
        height: 120px;
    }
    
    .header { 
        flex-direction: column; 
        gap: 10px; 
    }
    
    .search-box { 
        width: 90vw; 
    }
    
    .arrow-btn.left { 
        left: 5px; 
    }
    
    .arrow-btn.right { 
        right: 5px; 
    }
    
    .map-search-bar {
        width: 420px;
        height: 50px;
        gap: 0;
        padding: 0;
    }
    
    .map-search-bar .search-box {
        width: 100%;
        height: 50px;
        font-size: 1rem;
        border-radius: 25px;
        padding: 0 18px;
    }
    
    .map-search-bar .search-btn {
        height: 50px;
        width: 50px;
        border-radius: 50%;
        margin-right: 6px;
    }
    
    .map-search-bar .search-btn:before {
        width: 18px;
        height: 18px;
    }
    
    .hamburger-btn {
        width: 40px;
        height: 40px;
        top: 20px;
        right: 20px;
    }
    
    .hamburger-btn span {
        width: 18px;
        height: 2px;
    }
    
    .category-filter {
        top: 75px;
        width: 420px;
        left: calc(50% - 210px - 20px);
    }
}

@media (max-width: 600px) {
    .side-panel {
        width: 95vw;
        max-width: 350px;
    }
    
    .info-header-image {
        height: 200px;
    }
    
    .recent-list { 
        width: 98vw; 
        max-width: 625px;
    }
    
    .carousel-track {
        justify-content: center;
    }
    
    .house-card {
        width: 120px;
        height: 160px;
    }
    
    .house-img {
        width: 100px;
        height: 100px;
    }
    
    .arrow-btn {
        width: 35px;
        height: 35px;
    }
    
    .arrow-btn.left { 
        left: 2px; 
    }
    
    .arrow-btn.right { 
        right: 2px; 
    }
    
    .map-search-bar {
        width: 380px;
        height: 46px;
        top: 15px;
        gap: 0;
        padding: 0;
    }
    
    .map-search-bar .search-box {
        width: 100%;
        height: 46px;
        font-size: 0.9rem;
        border-radius: 23px;
        padding: 0 16px;
    }
    
    .map-search-bar .search-btn {
        height: 46px;
        width: 46px;
        border-radius: 50%;
        margin-right: 4px;
    }
    
    .map-search-bar .search-btn:before {
        width: 16px;
        height: 16px;
    }
    
    .hamburger-btn {
        width: 36px;
        height: 36px;
        top: 16px;
        right: 16px;
    }
    
    .hamburger-btn span {
        width: 16px;
        height: 2px;
    }
    
    .side-panel.open ~ .map-search-bar {
        left: calc(50% - 40vw);
        transform: translateX(-50%);
    }
    
    .side-panel.open ~ .hamburger-btn {
        right: calc(24px + 40vw);
    }
    
    .category-filter {
        top: 65px;
        padding: 4px;
        gap: 2px;
        width: 380px;
        left: calc(50% - 190px - 20px);
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 0.65rem;
        white-space: nowrap;
        line-height: 1.2;
    }
}

/* 공통 커서 스타일 */
.arrow-btn,
.slider-arrow,
.search-btn,
.house-card {
    cursor: pointer;
} 

/* 메인/지도 페이지의 관리자 버튼 */
.admin-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #2d72ff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(45, 114, 255, 0.3);
}

.admin-btn:hover {
    background: #1e5fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 114, 255, 0.4);
}

.admin-btn:active {
    transform: translateY(0);
}

/* 관리자 페이지 내부의 버튼들 */
.admin-container .admin-btn {
    position: static;
    top: auto;
    left: auto;
    z-index: auto;
    box-shadow: none;
    margin: 5px;
}

.admin-container .admin-btn:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
} 