/* CSS 변수 */
:root {
    --primary-gradient: linear-gradient(135deg, #63b3ff 0%, #7dd3fc 100%);
    --growth-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --bg-gradient: linear-gradient(135deg, #74d8f8 0%, #7ef2e4 50%, #6ec7ff 100%);
    --primary-color: #2563eb;
    --primary-color-light: rgba(37, 99, 235, 0.1);
    --primary-color-medium: rgba(37, 99, 235, 0.2);
    --primary-color-dark: #1e40af;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --bounce: cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 히어로 섹션 그라데이션 텍스트 */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 의약품 결과 아이템 스타일 */
.emedicine-result-item {
    border-left-color: rgba(37, 99, 235, 0.4) !important;
}

.emedicine-result-item:hover {
    border-left-color: rgba(37, 99, 235, 0.7) !important;
}

.emedicine-thumbnail-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.emedicine-thumbnail-image {
    flex-shrink: 0;
    width: 200px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    overflow: hidden;
}

.emedicine-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.emedicine-thumbnail-info {
    flex: 1;
    min-width: 0;
}

.emedicine-thumbnail-info .item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.emedicine-thumbnail-info .emedicine-company {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    padding: 0;
    border: none;
}

.emedicine-company {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.emedicine-info-section {
    margin-top: 12px;
}

.emedicine-info-section:first-of-type {
    margin-top: 0;
}

.emedicine-info-section strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.emedicine-info-section p {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.6;
    margin: 0;
}

/* 페이지네이션 스타일 */
.emedicine-pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.emedicine-pagination button {
    min-width: 36px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #ffffff;
    color: #475569;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emedicine-pagination button:hover {
    border-color: rgba(37, 99, 235, 0.4);
    color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
}

.emedicine-pagination button.active {
    background: var(--growth-gradient);
    color: #ffffff;
    border-color: transparent;
    font-weight: 600;
}

/* 로딩 상태 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.loading-spinner {
    font-size: 2rem;
    color: rgba(37, 99, 235, 0.6);
}

.loading-state p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* =====================================================
   모바일 UI 스타일
   ===================================================== */

/* 모바일 검색 트리거 버튼 */
.mobile-search-trigger {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--growth-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    z-index: 9999;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
}

.mobile-search-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

.mobile-search-interface {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-search-interface.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

.mobile-search-overlay {
    display: none !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    backdrop-filter: none;
}

.mobile-search-content {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    max-height: 85vh;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    transform: translateY(100%) !important;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    z-index: 10001;
}

.mobile-search-interface.active .mobile-search-content {
    transform: translateY(0) !important;
}

.mobile-search-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.mobile-search-close {
    position: absolute;
    top: -10px;
    right: 0;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mobile-search-close:hover {
    background: #f0f0f0;
    color: #333;
}

.mobile-search-header h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    color: #333;
    font-weight: 600;
}

.mobile-search-header p {
    margin: 0;
    font-size: 14px;
    color: #666;
    text-align: center;
}

.mobile-form-helper {
    margin: 0 0 16px;
    padding: 10px 14px;
    background: var(--primary-color-light);
    border: 1px solid var(--primary-color-medium);
    border-radius: 12px;
    color: var(--primary-color-dark);
    font-size: 12px;
    line-height: 1.5;
}

.mobile-form-helper span {
    display: block;
    margin-bottom: 4px;
}

.mobile-form-helper span:last-child {
    margin-bottom: 0;
}

.mobile-form-group {
    margin-bottom: 18px;
}

.mobile-form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.mobile-form-label i {
    color: var(--primary-color);
    font-size: 16px;
}

.mobile-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    background: var(--white);
    color: var(--gray-700);
    font-size: 14px;
    transition: all 0.2s ease;
}

.mobile-form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color-light);
}

.mobile-form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-form-hint i {
    color: var(--primary-color);
}

.mobile-search-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--growth-gradient);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    margin-top: 10px;
}

.mobile-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* 모바일 검색 결과 영역 */
.mobile-search-results {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 10000;
    display: none;
    flex-direction: column;
    padding: 0;
}

.mobile-search-results.active {
    display: flex;
}

.mobile-results-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-200);
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-back-button {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--gray-700);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-back-button:hover {
    background: rgba(37, 99, 235, 0.2);
    transform: translateX(-2px);
}

.mobile-results-title {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
}

.mobile-results-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.mobile-results-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.mobile-empty-state {
    text-align: center;
    color: var(--gray-500);
    padding: 40px 20px;
}

.mobile-empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    color: rgba(37, 99, 235, 0.35);
    display: block;
}

.mobile-empty-state h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--gray-800);
}

.mobile-empty-state p {
    margin: 0;
    line-height: 1.6;
    font-size: 14px;
}

.mobile-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.mobile-loading-spinner {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.mobile-loading-state p {
    color: var(--gray-600);
    font-size: 14px;
}

.mobile-results-panel {
    background: white;
}

.mobile-result-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: #dc2626;
}

.mobile-result-error i {
    font-size: 1.2rem;
    margin-top: 2px;
}

.mobile-result-error strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

/* 모바일 결과 아이템 스타일 */
.mobile-results-panel .emedicine-result-item {
    margin-bottom: 16px;
}

.mobile-results-panel .emedicine-thumbnail-header {
    flex-direction: column;
    gap: 12px;
}

.mobile-results-panel .emedicine-thumbnail-image {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .hero-title {
        color: var(--gray-900) !important;
    }

    .hero-description {
        color: var(--gray-800) !important;
    }

    .hero-badge {
        background: rgba(255, 255, 255, 0.95) !important;
        color: var(--gray-900) !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
    }

    .pc-search-interface {
        display: none;
    }

    .mobile-search-interface {
        display: block;
    }

    .mobile-search-trigger {
        display: flex;
    }

    .search-results-area {
        display: none !important;
    }

    .mobile-search-results {
        display: flex;
    }

    .mobile-search-results:not(.active) {
        display: none;
    }
}

