* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    background: linear-gradient(135deg, #FF8C42 0%, #FFA500 50%, #FF6B35 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    color: white;
    margin-bottom: 40px;
    padding: 20px 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.header-left {
    flex-shrink: 0;
}

.logo {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

.header-right {
    flex: 1;
    text-align: left;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 700;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.15rem;
    opacity: 0.95;
    line-height: 1.4;
}

.search-section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

#searchInput {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s;
}

#searchInput:focus {
    border-color: #FF8C42;
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.15);
}

.filter-section {
    margin-top: 20px;
}

.filter-label {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
    display: block;
}

.symptom-select {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
    font-family: inherit;
}

.symptom-select:hover {
    border-color: #FF8C42;
}

.symptom-select:focus {
    border-color: #FF8C42;
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.15);
}

.results-info {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.medicine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.medicine-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.medicine-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.medicine-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #fff5eb 0%, #ffe4c4 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.medicine-image::before {
    content: '💊';
    font-size: 4rem;
    opacity: 0.2;
    position: absolute;
}

.medicine-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.medicine-card:hover .medicine-image img {
    transform: scale(1.05);
}

.medicine-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.symptom-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FF8C42 0%, #FFA500 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(255, 140, 66, 0.3);
}

.medicine-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 16px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ingredients {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
    padding: 14px;
    background: #fff8f0;
    border-radius: 10px;
    border-left: 4px solid #FF8C42;
    flex-grow: 1;
}

.price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #FF6B35;
    margin-bottom: 16px;
}

.buy-link {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #FF8C42 0%, #FFA500 100%);
    color: white;
    padding: 14px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
    margin-top: auto;
}

.buy-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.5);
    background: linear-gradient(135deg, #FFA500 0%, #FF6B35 100%);
}

.loading,
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
}

.no-results {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

/* 로딩 애니메이션 */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .search-section {
        padding: 20px;
    }

    #searchInput {
        padding: 14px 18px;
        font-size: 1rem;
    }

    .medicine-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .medicine-card {
        padding: 20px;
    }

    .medicine-name {
        font-size: 1.3rem;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        font-size: 0.85rem;
        padding: 8px 14px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .medicine-name {
        font-size: 1.2rem;
    }

    .price {
        font-size: 1.2rem;
    }
}

/* 이미지 로딩 최적화 */
.medicine-image img[src*="placeholder"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 모바일에서 이미지 높이 조정 */
@media (max-width: 768px) {
    .medicine-image {
        height: 180px;
    }

    .medicine-content {
        padding: 20px;
    }
}


/* Category-specific styling */
.category-cold {
    border-top: 4px solid #FF8C42;
}

.category-pain {
    border-top: 4px solid #FF6B35;
}

.category-digestive {
    border-top: 4px solid #FFA500;
}

.category-allergy {
    border-top: 4px solid #FF9F40;
}

.category-other {
    border-top: 4px solid #FFB366;
}

/* Enhanced medicine card with category indicator */
.medicine-card {
    position: relative;
}

.medicine-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF8C42 0%, #FFA500 100%);
    border-radius: 16px 16px 0 0;
}

/* Purchase link with icon */
.buy-link::before {
    content: '🛒 ';
    margin-right: 8px;
}

/* Price badge styling */
.price::before {
    content: '💰 ';
    margin-right: 4px;
}

/* Symptom badge variations */
.symptom-badge.cold {
    background: linear-gradient(135deg, #FF8C42 0%, #FFB366 100%);
}

.symptom-badge.pain {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
}

.symptom-badge.digestive {
    background: linear-gradient(135deg, #FFA500 0%, #FFB366 100%);
}

.symptom-badge.allergy {
    background: linear-gradient(135deg, #FF9F40 0%, #FFC266 100%);
}

.symptom-badge.other {
    background: linear-gradient(135deg, #FFB366 0%, #FFD699 100%);
}

/* Improved search section */
.search-section {
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 140, 66, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Enhanced hover effects */
.medicine-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Loading spinner */
.loading::after {
    content: '💊';
    display: block;
    font-size: 3rem;
    margin-top: 20px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Responsive image placeholder */
.medicine-image img[src*="placeholder"] {
    opacity: 0.8;
}

/* Enhanced results info */
.results-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: inline-block;
}

/* Ingredient list styling */
.ingredients strong {
    color: #FF6B35;
    font-weight: 600;
}

/* Better mobile card layout */
@media (max-width: 768px) {
    .medicine-card::after {
        height: 3px;
    }

    .symptom-badge {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}


/* Disclaimer Banner */
.disclaimer-banner {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #FF8C42;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.2);
}

.disclaimer-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.disclaimer-content strong {
    color: #FF6B35;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 8px;
}

.disclaimer-content p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 16px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.tab-btn:hover {
    border-color: #FF8C42;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.2);
}

.tab-btn.active {
    background: linear-gradient(135deg, #FF8C42 0%, #FFA500 100%);
    color: white;
    border-color: #FF8C42;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.category-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-left: 6px solid;
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.category-header {
    padding: 20px;
    color: white;
}

.category-header h3 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
}

.symptom-count {
    font-size: 0.9rem;
    opacity: 0.95;
}

.category-symptoms {
    padding: 20px;
}

.symptom-item {
    padding: 16px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.symptom-item:hover {
    background: #fff5eb;
    border-left-color: #FF8C42;
    transform: translateX(4px);
}

.symptom-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.symptom-korean {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1rem;
}

.symptom-english {
    display: block;
    color: #FF6B35;
    font-weight: 600;
    margin-bottom: 6px;
}

.symptom-desc {
    display: block;
    color: #666;
    font-size: 0.9rem;
}

/* Speak Button */
.speak-btn {
    background: linear-gradient(135deg, #FF8C42 0%, #FFA500 100%);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255, 140, 66, 0.3);
}

.speak-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}

.speak-btn:active {
    transform: scale(0.95);
}

.speak-btn-small {
    background: #FF8C42;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease-in;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    padding: 0;
}

.modal-close svg {
    width: 20px;
    height: 20px;
    color: #666;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #FF6B35;
    border-color: #FF6B35;
    transform: scale(1.1);
}

.modal-close:hover svg {
    color: white;
}

.modal-close:active {
    transform: scale(0.95);
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 16px;
}

.modal-content h3 {
    color: #FF6B35;
    margin: 24px 0 16px 0;
}

.modal-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

.phrases-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.phrase-item {
    padding: 14px 16px;
    background: #fff5eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid #FF8C42;
}

.phrase-item:hover {
    background: #ffe4c4;
    transform: translateX(4px);
}

.phrase-text {
    color: #2c3e50;
    font-weight: 500;
}

.modal-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF8C42 0%, #FFA500 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

/* Phrases Section */
.phrases-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.phrases-header {
    text-align: center;
    margin-bottom: 30px;
}

.phrases-header h2 {
    color: #2c3e50;
    margin-bottom: 12px;
}

.phrases-header p {
    color: #666;
    font-size: 1.1rem;
}

.phrases-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.phrase-category {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 16px;
}

.phrase-category h3 {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
}

.phrase-group {
    margin-bottom: 24px;
}

.phrase-group:last-child {
    margin-bottom: 0;
}

.phrase-group h4 {
    color: #2c3e50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.phrase-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.phrase-card {
    background: white;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid #FF8C42;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.phrase-card:hover {
    background: #fff5eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.2);
}

.phrase-card span:first-child {
    color: #2c3e50;
    font-weight: 500;
}

.speak-icon {
    font-size: 1.2rem;
}

/* GP Consultation Banner */
.gp-consultation-banner {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196F3;
    border-radius: 16px;
    padding: 24px;
    margin: 30px 0;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.gp-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.gp-content h3 {
    color: #1976D2;
    margin: 0 0 12px 0;
}

.gp-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 16px;
}

.gp-link {
    display: inline-block;
    padding: 12px 24px;
    background: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.gp-link:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* Footer */
.site-footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    margin-top: 40px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.site-footer p {
    color: #666;
    margin: 8px 0;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {

    .disclaimer-banner,
    .gp-consultation-banner {
        flex-direction: column;
        text-align: center;
    }

    .disclaimer-icon,
    .gp-icon {
        font-size: 2rem;
    }

    .tab-navigation {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .phrase-list {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 24px;
    }

    .phrases-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .disclaimer-content strong {
        font-size: 1rem;
    }

    .disclaimer-content p {
        font-size: 0.9rem;
    }

    .symptom-korean {
        font-size: 1rem;
    }

    .speak-btn {
        padding: 6px 10px;
        font-size: 1rem;
    }
}


/* 약품 상세 모달 스타일 */
.medicine-detail-modal {
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.medicine-detail-scroll {
    overflow-y: auto;
    padding: 40px;
    max-height: 90vh;
}

/* 헤더 섹션 */
.medicine-detail-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.symptom-badge-container {
    margin-bottom: 20px;
}

.symptom-badge-large {
    display: inline-block;
    background: linear-gradient(135deg, #FF8C42 0%, #FFA500 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
    letter-spacing: 0.5px;
}

.medicine-title {
    font-size: 2.2rem;
    color: #2c3e50;
    margin: 0 0 16px 0;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1.3;
    word-break: keep-all;
    font-weight: 700;
    padding: 0 20px;
}

.medicine-title:hover {
    color: #FF8C42;
    transform: scale(1.02);
}

.header-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.copy-hint {
    font-size: 0.9rem;
    color: #999;
    margin: 0;
    font-weight: 500;
}

.header-price {
    font-size: 1.4rem;
    color: #FF6B35;
    font-weight: 700;
    margin: 0;
    padding: 6px 16px;
    background: linear-gradient(135deg, #fff0f0 0%, #ffe0e0 100%);
    border-radius: 20px;
    border: 2px solid #FF6B35;
}

.medicine-detail-main {
    margin-bottom: 40px;
}

.medicine-image-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 30px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.medicine-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* 정보 섹션 */
.medicine-info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.info-box {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.info-box:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.info-box-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #e0e0e0;
}

.info-box-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.info-box-header h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 0;
    font-weight: 700;
}

.info-box-content {
    padding: 24px;
}

/* 주요 성분 박스 */
.ingredients-box .info-box-header {
    background: linear-gradient(135deg, #fff5eb 0%, #ffe4c4 100%);
    border-bottom-color: #FF8C42;
}

.ingredients-text {
    color: #555;
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
    word-break: keep-all;
}



/* 주의사항 박스 */
.warning-box {
    background: linear-gradient(135deg, #fff8f0 0%, #fff0e0 100%);
}

.warning-box .info-box-header {
    background: linear-gradient(135deg, #ffe4c4 0%, #ffd4a4 100%);
    border-bottom-color: #FFB366;
}

.warning-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.warning-list li {
    color: #555;
    padding: 12px 0;
    padding-left: 32px;
    position: relative;
    line-height: 1.6;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 140, 66, 0.1);
}

.warning-list li:last-child {
    border-bottom: none;
}

.warning-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #FF8C42;
    font-weight: bold;
    font-size: 1.2rem;
}

/* 모달 내 약품 목록 */
.modal-medicines-view {
    padding: 20px 0;
}

.modal-medicines-view h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.medicine-count {
    color: #666;
    margin-bottom: 24px;
    font-size: 1rem;
}

.modal-medicine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.modal-medicine-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-medicine-card:hover {
    border-color: #FF8C42;
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.2);
    transform: translateY(-4px);
}

.modal-medicine-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-medicine-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-medicine-info {
    padding: 16px;
}

.modal-medicine-info h3 {
    font-size: 1rem;
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modal-medicine-price {
    font-size: 1.1rem;
    color: #FF6B35;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.modal-medicine-detail-btn {
    width: 100%;
    padding: 8px 16px;
    background: linear-gradient(135deg, #FF8C42 0%, #FFA500 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-medicine-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}

/* 관련 약품 섹션 */
.related-medicines {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.related-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.related-icon {
    font-size: 1.6rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.related-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.related-card:hover {
    border-color: #FF8C42;
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.2);
    transform: translateY(-4px);
}

.related-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-info {
    padding: 12px;
}

.related-info h4 {
    font-size: 0.9rem;
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-price {
    font-size: 1rem;
    color: #FF6B35;
    font-weight: 700;
    margin: 0;
}

.buy-link-large {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #FF8C42 0%, #FFA500 100%);
    color: white;
    padding: 18px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}

.buy-link-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.5);
}

/* 약품 카드 클릭 효과 */
.medicine-card {
    cursor: pointer;
    transition: all 0.3s;
}

.medicine-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .medicine-detail-modal {
        width: 100%;
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
    }

    .medicine-detail-scroll {
        padding: 24px 16px;
    }

    .medicine-detail-header {
        margin-bottom: 30px;
        padding-bottom: 24px;
    }

    .medicine-title {
        font-size: 1.6rem;
        padding: 0 10px;
        margin-bottom: 12px;
    }

    .symptom-badge-large {
        font-size: 0.9rem;
        padding: 8px 20px;
    }

    .header-meta {
        flex-direction: column;
        gap: 10px;
    }

    .copy-hint {
        font-size: 0.85rem;
    }

    .header-price {
        font-size: 1.2rem;
        padding: 5px 14px;
    }

    .info-box-header {
        padding: 16px 20px;
    }

    .info-box-icon {
        font-size: 1.5rem;
    }

    .info-box-header h3 {
        font-size: 1.1rem;
    }

    .info-box-content {
        padding: 20px;
    }

    .ingredients-text {
        font-size: 0.95rem;
    }

    .warning-list li {
        font-size: 0.95rem;
        padding: 10px 0 10px 28px;
    }

    .related-title {
        font-size: 1.2rem;
    }

    .modal-medicine-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .modal-medicine-image {
        height: 120px;
    }

    .modal-medicine-info {
        padding: 12px;
    }

    .modal-medicine-info h3 {
        font-size: 0.9rem;
    }

    .modal-medicine-price {
        font-size: 1rem;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .related-image {
        height: 100px;
    }

    .related-info {
        padding: 10px;
    }

    .related-info h4 {
        font-size: 0.85rem;
    }

    .related-price {
        font-size: 0.9rem;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
    }

    .modal-close svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .medicine-detail-scroll {
        padding: 20px 12px;
    }

    .medicine-detail-header {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }

    .medicine-title {
        font-size: 1.4rem;
        padding: 0 5px;
        margin-bottom: 10px;
    }

    .symptom-badge-large {
        font-size: 0.85rem;
        padding: 7px 18px;
    }

    .header-meta {
        gap: 8px;
    }

    .copy-hint {
        font-size: 0.8rem;
    }

    .header-price {
        font-size: 1.1rem;
        padding: 4px 12px;
    }

    .info-box-header {
        padding: 14px 16px;
    }

    .info-box-icon {
        font-size: 1.3rem;
    }

    .info-box-header h3 {
        font-size: 1rem;
    }

    .info-box-content {
        padding: 16px;
    }

    .ingredients-text {
        font-size: 0.9rem;
    }

    .warning-list li {
        font-size: 0.9rem;
        padding: 8px 0 8px 26px;
    }

    .warning-list li:before {
        font-size: 1rem;
    }

    .modal-medicines-view h2 {
        font-size: 1.4rem;
    }

    .modal-medicine-grid {
        grid-template-columns: 1fr;
        max-height: 70vh;
    }

    .modal-medicine-card {
        display: flex;
        flex-direction: row;
    }

    .modal-medicine-image {
        width: 120px;
        height: 100px;
        flex-shrink: 0;
    }

    .modal-medicine-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .modal-medicine-info h3 {
        font-size: 0.9rem;
    }

    .modal-medicine-price {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .modal-medicine-detail-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-card {
        display: flex;
        flex-direction: row;
    }

    .related-image {
        width: 100px;
        height: 80px;
        flex-shrink: 0;
    }

    .related-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* 로고 스타일 개선 */
.logo {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* 이미지 반응형 크기 조정 및 로딩 최적화 */
.medicine-image {
    position: relative;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    overflow: hidden;
}

.medicine-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.medicine-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s, opacity 0.3s;
    opacity: 0;
    will-change: transform;
}

.medicine-image img.loaded {
    opacity: 1;
}

.medicine-image img.loaded~.medicine-image::before {
    display: none;
}

.medicine-card:hover .medicine-image img.loaded {
    transform: scale(1.05);
}

/* 모바일에서 이미지 크기 조정 */
@media (max-width: 768px) {
    .medicine-image {
        height: 180px;
    }

    .medicine-image img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .medicine-image {
        height: 150px;
    }

    .medicine-image img {
        height: 150px;
    }
}

/* SEO Content Section */
.seo-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin: 40px auto;
    max-width: 1200px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.seo-content-inner h2 {
    color: #FF8C42;
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.seo-content-inner h3 {
    color: #FF6B35;
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.seo-content-inner p {
    color: #333;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1rem;
}

.seo-content-inner ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.seo-content-inner ul li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: #555;
    line-height: 1.6;
}

.seo-content-inner ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #FF8C42;
    font-weight: bold;
    font-size: 1.2rem;
}

.seo-content-inner strong {
    color: #FF6B35;
    font-weight: 600;
}

/* Enhanced Footer Styles */
.site-footer {
    background: linear-gradient(135deg, #FF8C42 0%, #FFA500 50%, #FF6B35 100%);
    color: white;
    padding: 50px 20px 20px;
    margin-top: 60px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-section p {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.footer-section ul li a:hover {
    color: #FFE4C4;
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 600;
}

.footer-bottom a:hover {
    color: #FFE4C4;
    text-decoration: underline;
}

.footer-bottom small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 20px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-section h3 {
        font-size: 1.2rem;
    }

    .seo-content {
        padding: 30px 20px;
    }

    .seo-content-inner h2 {
        font-size: 1.5rem;
    }

    .seo-content-inner h3 {
        font-size: 1.2rem;
    }
}

/* Ingredient Translation Styling */
.ingredients {
    font-size: 0.9rem;
    color: #666;
    margin: 10px 0;
    line-height: 1.6;
}

.medicine-detail-modal .info-section p {
    line-height: 1.8;
    word-break: break-word;
}

/* Image Loading Optimization */
.medicine-image {
    position: relative;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    overflow: hidden;
}

.medicine-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.medicine-image img {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    will-change: opacity;
}

.medicine-image img.loaded {
    opacity: 1;
}

/* Hide shimmer when image is loaded */
.medicine-image:has(img.loaded)::before {
    display: none;
}

/* Optimize image rendering */
.medicine-image img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Reduce layout shift */
.medicine-card {
    contain: layout style paint;
}

/* GPU Acceleration */
.medicine-card,
.medicine-image,
.medicine-image img {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Ingredient Translation Styling */
.ingredients {
    font-size: 0.9rem;
    color: #666;
    margin: 10px 0;
    line-height: 1.6;
}

/* 약 이름 클릭 스타일 */
.medicine-name {
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    position: relative;
}

.medicine-name:hover {
    color: #FF8C42;
    transform: scale(1.02);
}

.medicine-name:active {
    transform: scale(0.98);
}

.medicine-detail-header h2 {
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    position: relative;
}

.medicine-detail-header h2:hover {
    color: #FF8C42;
}

.medicine-detail-header h2:active {
    transform: scale(0.98);
}

/* 복사 버튼 스타일 */
.copy-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF8C42 0%, #FFA500 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.5);
    background: linear-gradient(135deg, #FFA500 0%, #FF6B35 100%);
}

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

/* 헤더 브랜드 스타일 */
.header-logo {
    margin-bottom: 20px;
}

.header-brand {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
    color: white;
    margin-top: 8px;
}

/* 로고 개선 */
.logo {
    width: 150px !important;
    max-width: 150px;
    height: auto;
    background: white;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: logoFadeIn 0.5s ease-in;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 모바일 로고 크기 */
@media (max-width: 768px) {
    .logo {
        width: 120px !important;
        max-width: 120px;
        padding: 12px;
        border-radius: 16px;
    }

    .header-brand {
        font-size: 0.9rem;
    }
}


/* 모바일 반응형 - 헤더 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .header-right {
        text-align: center;
    }

    .logo {
        width: 80px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .logo {
        width: 70px;
    }
}

/* 모바일 
반응형 개선 - 헤더 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
        padding: 0 10px;
    }
    
    .header-left {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .header-right {
        text-align: center !important;
        width: 100%;
    }
    
    .logo {
        width: 80px !important;
    }
    
    header {
        margin-bottom: 30px;
        padding: 15px 0;
    }
    
    header h1 {
        font-size: 1.8rem !important;
        margin-bottom: 6px;
    }
    
    .subtitle {
        font-size: 1rem !important;
        line-height: 1.5;
    }
    
    .tab-navigation {
        gap: 8px;
    }
    
    .tab-btn {
        min-width: 120px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .header-content {
        gap: 12px !important;
    }
    
    header h1 {
        font-size: 1.5rem !important;
    }
    
    .subtitle {
        font-size: 0.9rem !important;
    }
    
    .logo {
        width: 70px !important;
    }
    
    .tab-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .tab-btn {
        width: 100%;
        min-width: auto;
        padding: 14px 20px;
        font-size: 1rem;
    }
}
