/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #e8f5f5 0%, #b2dfdb 50%, #80cbc4 100%);
    min-height: 100vh;
}

/* Top Right Auth Buttons */
.top-auth-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-auth-buttons .auth-btn {
    text-decoration: none;
    color: #26a69a;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.top-auth-buttons .auth-btn:hover {
    color: #00897b;
    background: rgba(38, 166, 154, 0.1);
    border-color: rgba(38, 166, 154, 0.3);
    transform: translateY(-2px);
}

.top-auth-buttons .admin-link {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
}

.top-auth-buttons .admin-link:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.5);
    color: #e74c3c;
}

.top-auth-buttons .separator {
    color: #b2dfdb;
    font-size: 0.9rem;
    font-weight: 300;
}

.top-auth-buttons .user-info {
    color: #26a69a;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid rgba(38, 166, 154, 0.2);
}

.top-auth-buttons .logout-btn {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.top-auth-buttons .logout-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.5);
    color: #c0392b;
}

.top-auth-buttons .admin-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 6rem 2rem 3rem;
    margin-bottom: 2rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.brand-title {
    font-size: 5rem;
    font-weight: 800;
    color: #26a69a;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -2px;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Search Section */
.search-section {
    text-align: center;
    margin-bottom: 5rem;
}

.search-container {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #4db6ac 0%, #26a69a 50%, #00897b 100%);
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: 0 4px 15px rgba(77, 182, 172, 0.3);
    border: none;
    transition: all 0.3s ease;
}

.search-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 182, 172, 0.4);
}

.search-input {
    width: 400px;
    padding: 1.2rem 1.5rem;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    outline: none;
    color: white;
    border-radius: 50px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.search-btn {
    background: linear-gradient(135deg, #80cbc4 0%, #4db6ac 50%, #26a69a 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(128, 203, 196, 0.4);
}

.search-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #b2dfdb 0%, #80cbc4 50%, #4db6ac 100%);
    box-shadow: 0 4px 15px rgba(128, 203, 196, 0.6);
}

.search-btn i {
    font-size: 1.1rem;
}

/* Carousel Section */
.carousel-section {
    text-align: center;
    overflow: hidden;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #26a69a 0%, #4db6ac 50%, #80cbc4 100%);
    border-radius: 2px;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
    padding: 2rem 0;
}

.carousel-track {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.carousel-item {
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 0.8;
    transform: scale(0.95);
    width: 240px;
    margin: 0;
}

.carousel-item.active {
    opacity: 1;
    transform: scale(1);
}

.carousel-item:hover {
    opacity: 1;
    transform: scale(1.05);
}

.model-preview {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2.6rem;
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.15);
    transition: all 0.4s ease;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.model-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #26a69a 0%, #4db6ac 50%, #80cbc4 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.model-preview:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(76, 175, 80, 0.25);
    border-color: rgba(38, 166, 154, 0.3);
}

.model-preview:hover::before {
    transform: scaleX(1);
}

.preview-image-container {
    width: 100%;
    height: 160px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.preview-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8f5f5 0%, #c8e6c9 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(76, 175, 80, 0.1);
    position: relative;
    overflow: hidden;
    flex-direction: column;
}

/* 이미지 로드 실패 시 기본 스타일 */
.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.preview-image img:not([src]), 
.preview-image img[src=""],
.preview-image img[src*="placeholder"] {
    display: none;
}

/* 기본 이미지가 없을 때 표시할 아이콘 */
.preview-image:not(:has(img[src]:not([src*="placeholder"]))) {
    background: linear-gradient(135deg, #26a69a 0%, #4db6ac 100%);
}

.preview-image:not(:has(img[src]:not([src*="placeholder"])))::before {
    content: '\f015';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.representative-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.preview-image i {
    font-size: 2rem;
    color: #4db6ac;
    margin-bottom: 0.3rem;
    z-index: 2;
}

.house-type {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 하우스 타입별 색상 */
.modern-house {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.modern-house i {
    color: #1976d2;
}

.traditional-house {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.traditional-house i {
    color: #f57c00;
}

.smart-house {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

.smart-house i {
    color: #7b1fa2;
}

.eco-house {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
}

.eco-house i {
    color: #388e3c;
}

.luxury-house {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

.luxury-house i {
    color: #fbc02d;
}

/* 카테고리별 색상 추가 */
.아파트 {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
}

.아파트 i {
    color: #388e3c;
}

.단독주택 {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.단독주택 i {
    color: #f57c00;
}

.오피스텔 {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

.오피스텔 i {
    color: #7b1fa2;
}

.토지 {
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
}

.토지 i {
    color: #00695c;
}

.상가 {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
}

.상가 i {
    color: #c2185b;
}

.preview-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.model-preview:hover .preview-image::before {
    transform: translateX(100%);
}

.house-info {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    justify-content: center;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.7rem;
    color: #7f8c8d;
    font-weight: 500;
}

.info-item i {
    color: #4db6ac;
    font-size: 0.8rem;
}

.house-description {
    color: #7f8c8d;
    font-size: 0.75rem;
    line-height: 1.3;
    text-align: center;
    margin: 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: left;
    width: 100%;
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.carousel-btn.prev {
    left: -25px;
}

.carousel-btn.next {
    right: -25px;
}

.carousel-btn i {
    color: #26a69a;
    font-size: 1.2rem;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .main-content {
        padding: 0 1.5rem;
    }
    
    .hero-section {
        padding: 5rem 1.5rem 2rem;
    }
    
    .main-title {
        font-size: 3rem;
    }
    
    .brand-title {
        font-size: 4rem;
    }
    
    .search-input {
        width: 350px;
    }
    
    .preview-image {
        width: 100%;
        height: 150px;
    }
    
    .model-title {
        font-size: 1.1rem;
    }
    
    .carousel-item {
        width: 220px;
        margin: 0;
    }
    
    .carousel-container {
        max-width: 950px;
    }
}

@media (max-width: 768px) {
    .top-auth-buttons {
        top: 15px;
        right: 15px;
    }
    
    .top-auth-buttons .auth-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .hero-section {
        padding: 4rem 1rem 2rem;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .brand-title {
        font-size: 3rem;
    }
    
    .main-content {
        padding: 0 1rem;
    }
    
    .search-input {
        width: 280px;
        padding: 1rem 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .carousel-track {
        gap: 5px;
    }
    
    .preview-image {
        width: 100%;
        height: 140px;
    }
    
    .model-title {
        font-size: 1.0rem;
    }
    
    .carousel-item {
        width: 200px;
        margin: 0;
    }
    
    .house-info {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .carousel-container {
        max-width: 850px;
    }
}

@media (max-width: 480px) {
    .top-auth-buttons {
        top: 10px;
        right: 10px;
    }
    
    .top-auth-buttons .auth-btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .hero-section {
        padding: 3rem 0.5rem 1.5rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .brand-title {
        font-size: 2.5rem;
    }
    
    .main-content {
        padding: 0 0.5rem;
    }
    
    .search-input {
        width: 240px;
        padding: 0.8rem 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .carousel-track {
        gap: 5px;
    }
    
    .preview-image {
        width: 100%;
        height: 130px;
    }
    
    .model-title {
        font-size: 0.9rem;
    }
    
    .carousel-item {
        width: 180px;
        margin: 0;
    }
    
    .carousel-container {
        max-width: 750px;
    }
}

/* 추가적인 민트색 강조 요소 */
.section-title i {
    color: #26a69a;
    margin-right: 0.5rem;
}

.model-preview .model-title {
    color: #26a69a;
}

.model-preview p {
    color: #4db6ac !important;
    font-size: 0.8rem;
}

/* 버튼 스타일 추가 */
.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #138496;
}

/* 새로고침 버튼 스타일 */
.refresh-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.refresh-btn:hover {
    background-color: #218838;
}

.refresh-btn i {
    margin-right: 0.5rem;
}
