/* 침수차량 조회 서비스 - unified_search 스타일 기반 */

/* CSS 변수 */
:root {
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    --flooded-gradient: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    --glass-blur: blur(12px);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 24px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    line-height: 1.5;
    color: var(--gray-700);
    background: var(--gray-50);
    overflow-x: hidden;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 컬러풀 배경 */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.glass-blob {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: var(--glass-blur);
    animation: float 8s ease-in-out infinite;
}

.blob-1 {
    width: 300px;
    height: 300px;
    top: 5%;
    left: 5%;
    animation-delay: 0s;
    background: rgba(6, 182, 212, 0.1);
}

.blob-2 {
    width: 200px;
    height: 200px;
    top: 40%;
    right: 5%;
    animation-delay: 3s;
    background: rgba(59, 130, 246, 0.1);
}

.blob-3 {
    width: 150px;
    height: 150px;
    bottom: 5%;
    left: 40%;
    animation-delay: 6s;
    background: rgba(16, 185, 129, 0.1);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(3deg); }
    66% { transform: translateY(8px) rotate(-3deg); }
}

/* 메인 래퍼 */
.main-wrapper {
    position: relative;
    backdrop-filter: var(--glass-blur);
}

/* 히어로 섹션 */
.hero-section {
    padding: 10px 0 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: var(--glass-blur);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-badge i {
    color: #06b6d4;
}

.hero-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    line-height: 1.4;
}

/* 메인 컨텐츠 */
.main-content {
    position: relative;
    min-height: 100vh;
    padding-top: 70px; /* 헤더 높이 고려 */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15 20px;
}

/* PC 검색 인터페이스 - 2열 레이아웃 */
.pc-search-interface {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    max-width: 1400px;
    margin: 15 0 0 0px;
    height: calc(100vh - 180px);
    align-items: start;
}

/* 검색 사이드바 */
.search-sidebar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: 25px;
    box-shadow: var(--shadow-xl);
    position: sticky;
    top: 20px;
    height: fit-content;
}

.search-sidebar-header {
    margin-bottom: 20px;
}

.header-with-back {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.back-btn {
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.2);
    color: var(--gray-700);
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    flex-shrink: 0;
}

.back-btn:hover {
    background: rgba(79, 70, 229, 0.2);
    transform: translateX(-2px);
}

.back-btn i {
    font-size: 16px;
}

.header-text {
    flex: 1;
}

.header-text h3 {
    color: var(--gray-800);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
}

.header-text p {
    color: var(--gray-600);
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

/* 검색 폼 컨테이너 */
.search-form-container {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--gray-700);
    font-size: 14px;
    transition: var(--transition-normal);
}

.form-control:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-btn-primary {
    width: 100%;
    padding: 12px 20px;
    background: var(--flooded-gradient);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
}

.search-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* 정보 섹션 */
.info-section {
    margin-top: 20px;
}

.info-card {
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.info-icon {
    background: rgba(6, 182, 212, 0.1);
    border-radius: var(--radius-md);
    padding: 8px;
    flex-shrink: 0;
}

.info-icon i {
    color: #06b6d4;
    font-size: 16px;
}

.info-content h5 {
    color: var(--gray-800);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-content p {
    color: var(--gray-600);
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

/* 검색 결과 영역 */
.search-results-area {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: 25px;
    box-shadow: var(--shadow-xl);
    height: calc(80vh - 220px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-200);
}

/* 정적 헤더 (항상 표시) */
.static-results-title h3 {
    color: var(--gray-800);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.result-count {
    color: var(--gray-500);
    font-size: 14px;
}

/* 동적 결과 헤더 (애니메이션 포함) */
.results-title-section h3 {
    color: var(--gray-800);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.results-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* 검색 플레이스홀더 */
.search-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.search-placeholder i {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--gray-400);
}

.search-placeholder h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.search-placeholder p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-500);
    margin: 0;
}

/* 로딩 상태 */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dots div {
    width: 12px;
    height: 12px;
    background: var(--flooded-gradient);
    border-radius: 50%;
    animation: loading-bounce 1.4s ease-in-out infinite;
}

.loading-dots div:nth-child(1) { animation-delay: -0.32s; }
.loading-dots div:nth-child(2) { animation-delay: -0.16s; }
.loading-dots div:nth-child(3) { animation-delay: 0s; }

@keyframes loading-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.loading-animation p {
    color: var(--gray-600);
    font-size: 14px;
    margin: 0;
}

.tips-list li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}

.tips-list li::before {
    content: '•';
    color: var(--white);
    position: absolute;
    left: 0;
}



/* ===== 결과 컨테이너 ===== */
.results-container {
    padding: 0;
}

.results-title-section {
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.results-title-section.fade-in,
.vehicle-info-message.fade-in {
    opacity: 1;
    transform: translateY(0);
}



/* ===== 결과 카드 - 새로운 심플한 디자인 ===== */
.result-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
}

.result-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.result-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--gray-300);
}

/* 결과 헤더 - 가로 레이아웃 */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.car-number {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: 1px;
}

.car-number i {
    color: #3b82f6;
    font-size: 20px;
}

.search-date {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

/* 상태 태그 - 작고 심플하게 */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 16px;
}

.status-tag.safe {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-tag.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-tag i {
    font-size: 10px;
}

/* 정보 그리드 - 컴팩트하게 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.info-item {
    background: var(--gray-50);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}

.info-item:hover {
    background: var(--white);
    border-color: var(--gray-200);
    transform: translateY(-1px);
}

.info-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    display: block;
    font-size: 14px;
    color: var(--gray-800);
    font-weight: 600;
    line-height: 1.2;
}

/* ===== 에러 메시지 - 심플하고 예쁘게 ===== */
.error-message, .error-container {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    backdrop-filter: blur(10px);
}

.error-message i, .error-container i {
    color: #dc2626;
    font-size: 16px;
    flex-shrink: 0;
}

.error-text, .error-message span {
    color: #dc2626;
    font-weight: 500;
    font-size: 14px;
    margin: 0;
}

/* ===== 침수차량 안내 메시지 - 결과와 함께 표시 ===== */
.vehicle-info-message {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.06), 
        rgba(5, 150, 105, 0.04)
    );
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 12px;
    padding: 20px;
    margin-top: 4px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.info-message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.info-message-header i {
    color: #059669;
    font-size: 20px;
    flex-shrink: 0;
}

.info-message-header h4 {
    color: var(--gray-800);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.info-message-list {
    color: var(--gray-700);
    font-size: 13px;
    line-height: 1.7;
    padding-left: 20px;
    margin: 0;
}

.info-message-list li {
    margin-bottom: 12px;
    padding-left: 6px;
    position: relative;
}

.info-message-list li::marker {
    color: #059669;
    font-weight: 600;
}

.info-message-list li:last-child {
    margin-bottom: 0;
}



/* 반응형 디자인 */
@media (max-width: 1200px) {
    .pc-search-interface {
        grid-template-columns: 360px 1fr;
        gap: 15px;
    }
}

@media (max-width: 1024px) {
    .pc-search-interface {
        grid-template-columns: 1fr;
        gap: 20px;
        height: auto;
    }
    
    .search-sidebar {
        position: static;
        top: auto;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 40px 0 15px;
    }
    
    .main-content {
        padding: 15px 0 30px 0;
    }
    
    .search-sidebar,
    .search-results-area {
        padding: 20px;
        border-radius: var(--radius-lg);
    }
    
    .search-results-area {
        height: auto;
        min-height: 400px;
    }
    
    .results-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .result-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        align-items: center;
    }
    
    .car-number {
        font-size: 16px;
    }
    
    .search-date {
        font-size: 11px;
    }
    
    .info-item {
        padding: 10px;
    }
    
    .info-label {
        font-size: 10px;
    }
    
    .info-value {
        font-size: 13px;
    }
    
    .static-results-title h3,
    .results-title-section h3 {
        font-size: 18px;
    }
    
    .vehicle-info-message {
        padding: 16px;
        margin-top: 16px;
    }
    
    .info-message-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
        gap: 8px;
    }
    
    .info-message-header i {
        font-size: 18px;
    }
    
    .info-message-header h4 {
        font-size: 15px;
    }
    
    .info-message-list {
        font-size: 12px;
        line-height: 1.6;
        padding-left: 16px;
    }
    
    .info-message-list li {
        margin-bottom: 10px;
        padding-left: 4px;
    }
}

/* ===== 애니메이션 - 부드럽고 자연스럽게 ===== */
.fade-in {
    animation: smoothFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.main-wrapper.fade-in {
    animation: containerFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes smoothFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 스크롤바 - 모던하게 ===== */
.search-results-area::-webkit-scrollbar {
    width: 8px;
}

.search-results-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.search-results-area::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.6), rgba(37, 99, 235, 0.4));
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.search-results-area::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 0.6));
}

/* 기본 스크롤바 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gray-400), var(--gray-300));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gray-500), var(--gray-400));
}

/* 추가 유틸리티 클래스 */
.text-center {
    text-align: center;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--gray-400);
}

.empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.empty-state p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}