/* CSS 로딩 테스트 - 이 스타일이 보이면 CSS가 정상 로드됨 */
body {
    background-color: #f5f5f5 !important;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a !important;
    }
}

/* 변수 정의 */
:root {
    --primary: #000000;
    --primary-dark: #000000;
    --primary-light: #333333;
    --primary-rgb: 0, 0, 0;
    --success: #333333;
    --warning: #666666;
    --danger: #000000;
    --danger-rgb: 0, 0, 0;
    --bg: #f5f5f5;
    --surface: rgba(255, 255, 255, 0.95);
    --text: #000000;
    --text-secondary: #666666;
    --border: rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --scroll-transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #ffffff;
        --primary-dark: #ffffff;
        --primary-light: #cccccc;
        --primary-rgb: 255, 255, 255;
        --bg: #1a1a1a;
        --surface: rgba(30, 30, 30, 0.95);
        --text: #ffffff;
        --text-secondary: #cccccc;
        --border: rgba(255, 255, 255, 0.2);
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    }
}

/* 리셋 및 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 부드러운 스크롤 설정 */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
    /* 오버 스크롤 여백 조정 */
    scroll-padding-bottom: 20px;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    /* 부드러운 스크롤 애니메이션 */
    scroll-behavior: smooth;
    /* 오버 스크롤 조정 */
    overscroll-behavior-y: contain;
    overscroll-behavior-x: contain;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-20px, -20px) scale(1.05); }
    66% { transform: translate(20px, -10px) scale(0.95); }
}

/* 전체 컨테이너에 부드러운 스크롤 그라데이션 효과 */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 20px 40px;
    position: relative;
}

/* 상단/하단 그라데이션 마스크 제거됨 */

/* 헤더 */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* 카드 */
.card {
    background: var(--surface);
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);
    border-radius: 24px;
    padding: 1rem !important;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: none;
    transition: var(--transition);
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 1rem !important;
}

.card:hover {
    transform: translateY(-4px) scale(1.005);
    box-shadow: var(--shadow-lg);
}

/* 입력 필드 */
.input-wrapper {
    position: relative;
    margin-bottom: 1.25rem;
}

.input-field {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
    border: 2px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
    color: var(--text);
    transition: var(--transition);
    font-family: inherit;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.1);
}

.input-field::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}



/* 버튼 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: var(--bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-block {
    width: 100%;
}

/* 검색 섹션 */
.search-box {
    justify-content: center;
    display: flex;
    gap: 0.75rem !important;
}

.search-box .input-field {
    flex: 1;
}



/* Mask removed */

.search-results {
    max-height: 350px;
    overflow-y: auto;
    margin-top: 1rem;
    position: relative;
    scroll-behavior: smooth;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    /* Scroll mask removed */
}

.search-results.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Scroll transition removed */

.search-results-content {
    position: relative;
    z-index: 1000;
}









/* Mask 클래스 기반 그라데이션을 사용하므로 기존 ::before, ::after 스타일 제거 */

/* 약물 선택 */
.drug-select-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) ;
    gap: 0.2rem;
    margin-bottom: 0.2rem;
}

.drug-select-container {
    position: relative;
}

.drug-list {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    max-height: 5px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: all 0.3s ease;
    z-index: 100000;
    scroll-behavior: smooth;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

/* 첫 번째 드러그 인풋의 결과 창이 두 번째 인풋에 가려지지 않도록 z-index 조정 */
#drug1List {
    z-index: 100001;
}

#drug2List {
    z-index: 100000;
}

/* 약물 리스트 스크롤 그라데이션 제거됨 */

.drug-list.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 300px;
    overflow-y: auto;
    pointer-events: auto;
    z-index: 100000 !important;
}

.drug-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
    transform: translateX(0);
}

.drug-item:last-child {
    border-bottom: none;
}

.drug-item:hover {
    background: rgba(var(--primary-rgb), 0.1);
    padding-left: 1.25rem;
    transform: translateX(4px) scale(1.01);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.1);
}

.drug-item.exact-match {
    background: rgba(var(--primary-rgb), 0.05);
}

.drug-item.exact-match:hover {
    background: rgba(var(--primary-rgb), 0.15);
}

.drug-item-name {
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drug-item-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-result {
    background: linear-gradient(135deg, var(--text), #333333);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 24px;
    font-weight: 700;
    margin-left: auto;
}

.match-type {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 24px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* AI 분석 스타일 */
.ai-analysis {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.ai-analysis::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    z-index: 100000;
}

.ai-analysis-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.ai-icon {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ai-analysis-header h4 {
    margin: 0;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 700;
}

.ai-analysis-content {
    color: var(--text);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* 다크 테마에서 AI 분석 텍스트 색상 조정 */
@media (prefers-color-scheme: dark) {
    .ai-analysis-content {
        color: #f5f5f5;
    }
    
    .ai-analysis-header h4 {
        color: #f5f5f5;
    }
    
    .result-main-title {
        color: #f5f5f5;
    }
    
    .result-subtitle {
        color: #f5f5f5;
    }
    
    .result-warning .result-content {
        color: #f5f5f5;
    }
    
    .result-warning .result-title {
        color: #f5f5f5;
    }
    
    /* 상호작용 설명, 권장사항, 기본 정보 텍스트 색상 */
    .basic-info {
        color: #f5f5f5;
    }
    
    .basic-info p {
        color: #f5f5f5;
    }
    
    .fda-toggle-btn .toggle-text {
        color: #f5f5f5;
    }
    
    .result-warning .interaction-box {
        color: #f5f5f5;
    }
    
    .result-warning .recommendation {
        color: #f5f5f5;
    }
    
    .result-warning .recommendation p {
        color: #f5f5f5;
    }
    
    /* DUR 시스템 텍스트 색상 */
    .dur-section {
        color: #f5f5f5;
    }
    
    .dur-section p {
        color: #f5f5f5;
    }
    
    .dur-section h4 {
        color: #f5f5f5;
    }
    
    .dur-section h5 {
        color: #f5f5f5;
    }
}

.ai-analysis-content h2,
.ai-analysis-content h3,
.ai-analysis-content h4 {
    color: var(--primary);
    margin: 1rem 0 0.5rem 0;
}

.ai-analysis-content ul,
.ai-analysis-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.ai-analysis-content li {
    margin: 0.25rem 0;
}

.separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 1.5rem 0;
}

.fda-data,
.basic-info {
    padding: 1rem;
    background: rgba(var(--primary-rgb), 0.03);
    border-radius: 24px;
}

.fda-data h4,
.basic-info h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.fda-data h5 {
    color: var(--text);
    font-size: 1rem;
    margin: 1rem 0 0.5rem 0;
}

/* FDA Toggle Section */
.fda-toggle-section {
    margin-top: 20px;
}

.fda-toggle-btn {
    width: 100%;
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 12px 16px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.fda-toggle-btn:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--text);
    transform: translateY(-1px);
}

.fda-toggle-btn.expanded {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--text);
}

.fda-toggle-btn .toggle-icon {
    margin-right: 8px;
    font-size: 1rem;
}

.fda-toggle-btn .toggle-text {
    flex: 1;
    text-align: left;
}

.fda-toggle-btn .toggle-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.fda-toggle-btn.expanded .toggle-arrow {
    transform: rotate(180deg);
}

.fda-data-container {
    margin-top: 12px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    animation: fadeInDown 0.3s ease-out;
}

/* 설정 모달 */
.settings-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.01);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem;
}

.settings-modal.show {
    opacity: 1;
    visibility: visible;
}

.settings-modal.closing {
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

.settings-content {
    background: var(--surface);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    filter: blur(0px);
}

.settings-modal.show .settings-content {
    transform: scale(1);
    filter: blur(0px);
}

.settings-modal.closing .settings-content {
    transform: scale(0.8);
    filter: blur(8px);
    opacity: 0;
}

.settings-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    border-top-left-radius: 27px;
    border-top-right-radius: 27px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 10;
}

.settings-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--border);
    min-height: 0;
    scroll-behavior: smooth;
    position: relative;
}

/* 설정 모달 바디 스크롤 그라데이션 */
.settings-body::before {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, var(--surface) 0%, rgba(255, 255, 255, 0.8) 80%, transparent 100%);
    z-index: 10;
    pointer-events: none;
    margin-bottom: -20px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.settings-body::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to top, var(--surface) 0%, rgba(255, 255, 255, 0.8) 80%, transparent 100%);
    z-index: 10;
    pointer-events: none;
    margin-top: -20px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* 스크롤 중일 때 그라데이션 표시 */
.settings-body.scrolling::before,
.settings-body.scrolling::after {
    opacity: 1;
}

/* 스크롤 위치에 따른 개별 제어 */
.settings-body.scrolling[data-scroll-top="false"]::before {
    opacity: 0;
}

.settings-body.scrolling[data-scroll-bottom="false"]::after {
    opacity: 0;
}

@media (prefers-color-scheme: dark) {
    .settings-body::before {
        background: linear-gradient(to bottom, var(--surface) 0%, rgba(30, 30, 30, 0.8) 80%, transparent 100%);
    }
    
    .settings-body::after {
        background: linear-gradient(to top, var(--surface) 0%, rgba(30, 30, 30, 0.8) 80%, transparent 100%);
    }
}

/* 설정 모달 스크롤바 스타일 (웹킷) */
.settings-body::-webkit-scrollbar {
    width: 6px;
}

.settings-body::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 24px;
}

.settings-body::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 24px;
}

.settings-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
    color: var(--text);
    transition: var(--transition);
    font-family: 'Courier New', monospace;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
    color: var(--text);
    transition: var(--transition);
    font-family: inherit;
    cursor: pointer;
}

.form-select:hover {
    border-color: var(--primary);
    background: var(--bg);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-select option {
    background: var(--surface);
    color: var(--text);
    padding: 0.5rem;
}

.form-select option:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.provider-icon {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.ai-config {
    padding-left: 0;
    margin-left: 0;
    transition: var(--transition);
}

.api-status {
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 24px;
}

.api-status h4 {
    margin: 0 0 0.75rem 0;
    color: var(--primary);
    font-size: 1rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    background-color: var(--surface) !important;
    border-radius: 26.5px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--surface);
    border-radius: 23px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.status-item.active {
    width: 80%;
    background: var(--primary);
    border: 1px solid var(--primary);
    color: var(--bg);
    border-radius: 20px;
}

.status-item.error {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: var(--text);
}

.status-icon {
    font-size: 0.8rem;
}

.status-item.active .status-icon {
    color: var(--text);
}

.status-item.error .status-icon {
    color: var(--text);
}

.form-help {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.settings-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    border-bottom-left-radius: 27px;
    border-bottom-right-radius: 27px;
    position: sticky;
    bottom: 0;
    background: var(--surface);
    z-index: 10;
}

.btn-secondary {
    background: var(--bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--bg);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 설정 버튼 */
.settings-fab {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg), 0.02;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    color: var(--text);
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.settings-fab:hover {
    transform: scale(1.1);
    background: var(--bg), 0.01;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.9rem);
}

.settings-fab.dragging {
    cursor: grabbing;
    transition: none;
    transform: scale(1.1) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    z-index: 99999;
    filter: brightness(1.1);
    backdrop-filter: blur(0.7px);
    -webkit-backdrop-filter: blur(0.7px);
}

/* 모바일에서 추가 드래그 스타일 */
@media (max-width: 768px) {
    .settings-fab.dragging {
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
    }
}

/* 결과 섹션 */
.result-section {
    display: none;
    visibility: hidden;
    opacity: 0;
    animation: fadeIn 0.5s ease;
    max-height: 80vh;
    overflow-y: auto;
    scroll-behavior: smooth;
    position: relative;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /* 상시 활성화된 상하단 마스크 제거됨 */
}

/* 스크롤 관련 그라데이션 제거됨 - 상시 활성화된 마스크로 변경 */

.result-card {
    padding: 1.5rem;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

/* 상단 라인 제거됨 */

.result-warning {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.3);
}

.result-warning::before {
    background: linear-gradient(90deg, var(--text), var(--text-secondary));
}

.result-safe {
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid rgba(128, 128, 128, 0.3);
}

.result-safe::before {
    background: linear-gradient(90deg, var(--text-secondary), #999999);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.result-icon {
    font-size: 2rem;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
}

/* 로딩 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    background: var(--surface);
    padding: 2rem;
    border-radius: 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

/* 모달 */
.modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.01);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal.closing {
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

.modal-content {
    background: var(--surface);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: blur(0px);
    scroll-behavior: smooth;
    position: relative;
}

/* 모달 콘텐츠 스크롤 그라데이션 */
.modal-content::before {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to bottom, var(--surface) 0%, rgba(255, 255, 255, 0.8) 70%, transparent 100%);
    z-index: 15;
    pointer-events: none;
    margin-bottom: -15px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal-content::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to top, var(--surface) 0%, rgba(255, 255, 255, 0.8) 70%, transparent 100%);
    z-index: 15;
    pointer-events: none;
    margin-top: -15px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* 스크롤 중일 때 그라데이션 표시 */
.modal-content.scrolling::before,
.modal-content.scrolling::after {
    opacity: 1;
}

/* 스크롤 위치에 따른 개별 제어 */
.modal-content.scrolling[data-scroll-top="false"]::before {
    opacity: 0;
}

.modal-content.scrolling[data-scroll-bottom="false"]::after {
    opacity: 0;
}

@media (prefers-color-scheme: dark) {
    .modal-content::before {
        background: linear-gradient(to bottom, var(--surface) 0%, rgba(30, 30, 30, 0.8) 70%, transparent 100%);
    }
    
    .modal-content::after {
        background: linear-gradient(to top, var(--surface) 0%, rgba(30, 30, 30, 0.8) 70%, transparent 100%);
    }
}

.modal.show .modal-content {
    transform: scale(1);
    filter: blur(0px);
}

.modal.closing .modal-content {
    transform: scale(0.8);
    filter: blur(8px);
    opacity: 0;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 10;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(var(--danger-rgb), 0.1);
    color: var(--text-secondary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.drug-detail-section {
    margin-bottom: 1.5rem;
}

.drug-detail-section h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

/* 태그 */
.tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: var(--surface);
    color: var(--text);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.25rem;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border);
}

.tag:hover {
    background: var(--bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 예시 약물 */
.example-drugs {
    background: var(--surface);
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);
    border-radius: 24px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: var(--transition);
    animation: fadeInUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.example-drugs:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.example-drugs h3 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.example-drugs ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.example-drugs li {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: var(--surface);
    color: var(--text);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.25rem;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border);
}

.example-drugs li:hover {
    background: var(--bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 알림 */
.alert {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 1.5rem;
    border-radius: 100px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 3000;
    max-width: 90vw;
    min-width: 300px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alert.show {
    top: 40px;
    transform: translateX(-50%);
}

.alert.dragging {
    cursor: grabbing;
    transition: none;
}

.alert.dismissing {
    top: -100px;
    opacity: 0;
    transform: translateX(-50%) scale(0.8);
}

.alert-success {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text);
    border: 1px solid var(--border);
}

.alert-warning {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    border: 1px solid var(--border);
}

.alert-info {
    display: block !important;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    border: 1px solid var(--border);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: var(--transition);
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1);
    background: var(--bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-40px) scale(0.95);
    }
    60% {
        opacity: 0.8;
        transform: translateY(2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Add to interaction check 버튼 스타일 */
.add-to-check-btn {
    position: relative;
    overflow: hidden;
}

.add-to-check-btn .btn-icon {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.add-to-check-btn .btn-text {
    transition: var(--transition);
}

/* 반응형 */
@media (max-width: 768px) {
    #drugSearchInput{
        width: 100%;
        margin-top: 0.2rem !important;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        font-size: 0.8rem;
        font-weight: 500;
        border-radius: 0.5rem;
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--text);
        cursor: pointer;
        transition: var(--transition);
    }
    #drugSearchInput:focus{
        outline: none;
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
        border: 1px solid var(--primary);
        background: var(--surface);
        color: var(--text);
        cursor: pointer;
        transition: var(--transition);
    }
    #drugSearchInput::placeholder{
        color: var(--text-secondary);
    }
    #drugSearchInput:hover{
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
        border: 1px solid var(--primary);
        background: var(--surface);
        color: var(--text);
        cursor: pointer;
        transition: var(--transition);
    }
    #drugSearchInput:active{
        outline: none;
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
        border: 1px solid var(--primary);
        background: var(--surface);
        color: var(--text);
        cursor: pointer;
        transition: var(--transition);
    }
    #drugSearchInput:focus-visible{
        outline: none;
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
        border: 1px solid var(--primary);
        background: var(--surface);
        color: var(--text);
        cursor: pointer;
        transition: var(--transition);
    }
    #drugSearchInput:focus-visible::placeholder{
        color: var(--text-secondary);
    }
    #drugSearchInput:focus-visible:hover{
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
        border: 1px solid var(--primary);
        background: var(--surface);
        color: var(--text);
        cursor: pointer;
        transition: var(--transition);
    }
    #drugSearchInput:focus-visible:active{
        outline: none;
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
        border: 1px solid var(--primary);
        background: var(--surface);
        color: var(--text);
        cursor: pointer;
        transition: var(--transition);
    }

    .container {
        padding: 80px 1rem 30px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .card {
        padding: 0.5rem;
    }

    .search-box {
    justify-content: center;
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }

    .search-box .input-field {
        flex: 1;
        margin-bottom: 0;
    }

    .search-box .btn {
        display: none;
    }

    .search-box .btn:hover {
        transform: none;
        box-shadow: none;
    }

    .drug-select-section {
        grid-template-columns: 1fr;
    }

    .alert {
        left: 50%;
        right: auto;
        min-width: 280px;
        max-width: calc(100vw - 20px);
        transform: translateX(-50%);
    }
    
    .alert.show {
        top: 60px;
        transform: translateX(-50%);
    }

    /* 모바일에서 예시 약물 창 숨기기 */
    .example-drugs {
        display: none;
    }

    /* 모바일에서 맨 위로 가기 버튼 숨기기 */
    .fab {
        display: none;
    }

    /* 모바일에서 Add to interaction check 버튼 아이콘만 표시 */
    .add-to-check-btn {
        min-width: 50px;
        padding: 0.875rem 1rem;
        border-radius: 50%;
        aspect-ratio: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .add-to-check-btn .btn-text {
        display: none;
    }

    .add-to-check-btn .btn-icon {
        margin-right: 0;
        font-size: 1.2rem;
    }
    .input-field{
        width: 100%;
        height: 2.5rem;
        padding: 0.75rem;
    }   
    .settings-actions {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        padding: 0.25rem;
        width: 100%;
        justify-content: space-between;
    }
    .btn.btn-secondary {
        width: 8rem;
        margin-top: 0.2rem;
        margin-bottom: 0.2rem;
        padding: 0.5rem;
        font-size: 0.8rem;
        font-weight: 500;
        border-radius: 25px;
        border: 1px solid var(--border );
        background: var(--bg) !important;
        color: var(--text);
        cursor: pointer;
        transition: none;
    }
    .btn.btn-primary {
        width: 4rem;
        height: 2.2rem !important;  
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        font-size: 0.8rem;
        font-weight: 500;
        border-radius: 25px;
        border: 1px solid var(--border);
        background: var(--bg) !important;
        color: var(--text);
        cursor: pointer;
        transition: none;
        box-shadow: none;
        z-index: 100;
    }
    .btn.btn-primary.btn-block{
        border-radius: 25px;
        box-shadow: none;
        width: 100%;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        font-size: 0.8rem;
        font-weight: 500;
        transition: none;
    }
    .api-status{
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        padding: 0.25rem;
        width: 100%;
        justify-content: space-between;
        background-color: var(--surface) !important;
    }
    #aiProvider{
        width: 100%;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        font-size: 0.8rem;
        font-weight: 500;
        border-radius: 0.5rem;
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--text);
        cursor: pointer;
        transition: none;
    }
    #aiProvider:hover{
        background: var(--bg);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        color: var(--text);
        transform: none;
        box-shadow: none;
    }
    .settings-body{
        padding: 1rem;
    }
    .settings-header{
        padding: 1rem;
    }
    .settings-title{
        font-size: 1rem;
        margin-left: 1rem;
    }
    /*헤더 모바일 스타일*/
    .header{
        padding: 0.5rem;
    }
    .header h1{
        font-size: 1.5rem;
    }
    .header h3{
        font-size: 0.9rem;
    }
}

/* 스크롤바 숨기기 */
::-webkit-scrollbar {
    display: none;
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* 초소형 화면 (400px 이하) */
@media (max-width: 370px) {
    .container {
        padding: 60px 0.5rem 20px;
    }

    .header h1 {
        font-size: 1.2rem;
        line-height: 1.3;
        margin-bottom: 0.25rem;
    }

    .header p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .card {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .search-box {
    justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .search-box .input-field {
        margin-bottom: 0;
        font-size: 0.85rem;
        padding: 0.6rem;
    }

    .search-box .btn {
        display: none;
    }

    .input-field {
        height: 2.2rem;
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .drug-select-section {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .settings-modal {
        padding: 0.5rem;
    }

    .settings-content {
        max-height: 95vh;
    }

    .settings-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .settings-title {
        font-size: 0.9rem;
        margin-left: 0;
        line-height: 1.3;
    }
    .modal-header{
        padding: 0.5rem;
        border-bottom: 1px solid var(--border);
        background: var(--surface);
        color: var(--text);
        border-top-left-radius: 27px;
        border-top-right-radius: 27px;
    }

    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }

    .settings-body {
        padding: 0.75rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .form-input, .form-select {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    .settings-actions {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .btn.btn-secondary, .btn.btn-primary {
        width: 100%;
        padding: 0.6rem;
        font-size: 0.8rem;
        border-radius: 20px;
    }

    .btn.btn-primary.btn-block {
        font-size: 0.85rem;
        padding: 0.7rem;
    }

    .api-status {
        padding: 0.75rem;
        margin-top: 1rem;
    }

    .api-status h4 {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .status-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .status-item {
        padding: 0.4rem;
        font-size: 0.8rem;
        
    }

    .alert {
        left: 50%;
        right: auto;
        min-width: 280px;
        max-width: calc(100vw - 20px);
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        transform: translateX(-50%);
    }
    
    .alert.show {
        top: 60px;
        transform: translateX(-50%);
    }

    .example-drugs {
        display: none;
    }

    /* 초소형 화면에서도 Add to interaction check 버튼 아이콘만 표시 */
    .add-to-check-btn {
        min-width: 46px;
        padding: 0.75rem 0.875rem;
        border-radius: 50%;
        aspect-ratio: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .add-to-check-btn .btn-text {
        display: none;
    }

    .add-to-check-btn .btn-icon {
        margin-right: 0;
        font-size: 1.1rem;
    }

    .recent-searches {
        margin-top: 0.75rem;
    }

    .recent-searches > div:first-child {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }

    .fab, .settings-fab {
        width: 44px;
        height: 44px;
        font-size: 16px;
        bottom: 16px;
        right: 16px;
    }

    .settings-fab {
        bottom: 70px;
    }

    /* 폰트 크기 전체적으로 조정 */
    body {
        font-size: 14px;
        line-height: 1.4;
    }

    /* 모달 제목 줄바꿈 처리 */
    .modal-title {
        font-size: 1.1rem;
        line-height: 1.3;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
}

/* 개발자 패널 */
.developer-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 400px;
    max-height: 80vh;
    background: var(--surface);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.developer-panel.closing {
    opacity: 0;
    transform: scale(0.8);
    filter: blur(8px);
}

.dev-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.dev-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.dev-close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.dev-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dev-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    position: relative;
}

.dev-content::before {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to bottom, var(--surface) 0%, rgba(255, 255, 255, 0.8) 70%, transparent 100%);
    z-index: 10;
    pointer-events: none;
    margin-bottom: -15px;
    border-radius: var(--radius) var(--radius) 0 0;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.dev-content::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to top, var(--surface) 0%, rgba(255, 255, 255, 0.8) 70%, transparent 100%);
    z-index: 10;
    pointer-events: none;
    margin-top: -15px;
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.dev-content.scrolling::before,
.dev-content.scrolling::after {
    opacity: 1;
}

.dev-content.scrolling[data-scroll-top="false"]::before {
    opacity: 0;
}

.dev-content.scrolling[data-scroll-bottom="false"]::after {
    opacity: 0;
}

.dev-section {
    margin-bottom: 1.5rem;
}

.dev-section h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
}

.dev-stats {
    display: grid;
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: 6px;
    font-size: 0.85rem;
}

.stat-item span:first-child {
    color: var(--text-secondary);
}

.stat-item span:last-child {
    font-weight: 600;
    color: var(--text);
}

.dev-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.dev-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.dev-btn:hover {
    background: var(--primary);
    color: var(--text);
    transform: translateY(-1px);
}

.dev-console {
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    position: relative;
}

.dev-console::before {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to bottom, var(--bg) 0%, rgba(255, 255, 255, 0.8) 70%, transparent 100%);
    z-index: 10;
    pointer-events: none;
    margin-bottom: -15px;
    border-radius: 6px 6px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.dev-console::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to top, var(--bg) 0%, rgba(255, 255, 255, 0.8) 70%, transparent 100%);
    z-index: 10;
    pointer-events: none;
    margin-top: -15px;
    border-radius: 0 0 6px 6px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.dev-console.scrolling::before,
.dev-console.scrolling::after {
    opacity: 1;
}

.dev-console.scrolling[data-scroll-top="false"]::before {
    opacity: 0;
}

.dev-console.scrolling[data-scroll-bottom="false"]::after {
    opacity: 0;
}

.console-line {
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

.console-line.console-error {
    color: #ff4444;
}

.console-line.console-success {
    color: #44ff44;
}

.console-line.console-warning {
    color: #ffaa44;
}

.console-line.console-info {
    color: var(--text);
}

/* 모바일에서 개발자 패널 조정 */
@media (max-width: 768px) {
    .developer-panel {
        left: 10px;
        right: 10px;
        width: auto;
        max-height: 70vh;
    }
    
    .dev-actions {
        grid-template-columns: 1fr;
    }
    
    .dev-header {
        padding: 0.75rem 1rem;
    }
    
    .dev-content {
        padding: 0.75rem;
    }
}

/* 접근성 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Scroll animations removed - all elements visible by default */
.scroll-hidden,
.scroll-fade,
.scroll-scale {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.scroll-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
    border-radius: 24px;
}

/* 특정 카드 섹션들의 border-radius 설정 */
section.card.scroll-hidden.scroll-delay-1.scroll-visible,
section.card.scroll-hidden.scroll-delay-3.scroll-visible {
    border-radius: 36px;
}

/* 부드러운 스크롤 */
html {
    scroll-behavior: smooth;
}

/* 페이지 로드 시 스크롤 애니메이션 비활성화 */
.preload * {
    transition: none !important;
    animation: none !important;
}

/* Footer Styles */
.footer {
    margin-top: 4rem;
    padding-bottom: 10px;
    background: linear-gradient(135deg, 
        rgba(var(--surface-rgb), 0.95) 0%, 
        rgba(var(--bg-rgb), 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* 초기 상태: 아래쪽에 숨겨진 상태 */
    filter: blur(15px);
    opacity: 0;
    transform: translateY(120px);
    transition: all 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 푸터가 보일 때 전체 푸터 활성화 */
.footer.visible {
    filter: blur(0px);
    opacity: 1;
    transform: translateY(0);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary) 20%, 
        var(--primary) 80%, 
        transparent 100%);
    opacity: 0.5;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
    z-index: 100001;
}

/* Main Footer Content - Desktop: 4 columns */
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--text);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section h3 {
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section h4 {
    font-size: 1rem;
    color: var(--text-secondary);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    border-radius: 4px;
}

.footer-section a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

/* Medical Links */
.medical-links {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-left: 0;
    padding-right: 0;
    max-width: 180px;
    margin-left: auto;
    margin-right: auto;
    z-index: 10;
}

.footer-section.footer-links .medical-links,
.footer-section.footer-resources .medical-links,
.footer-section.footer-contact .medical-links {
    max-width: 180px;
    margin-left: auto;
    margin-right: auto;
}

.medical-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(var(--surface-rgb), 0.5);
    transition: var(--transition);
    white-space: nowrap;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.medical-links a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateY(-2px);
}

/* Footer Badges */
.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.footer-badges .badge {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 24px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

/* Social Links */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    background: rgba(var(--surface-rgb), 0.5);
    padding: 0.5rem 0.75rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.social-links a:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Footer Stats */
.footer-stats {
    background: rgba(var(--surface-rgb), 0.7);
    padding: 1rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    display: block;
}

/* Medical Disclaimer */
.footer-disclaimer {
    background: rgba(var(--warning-rgb, 255, 193, 7), 0.05);
    border: 1px solid rgba(var(--warning-rgb, 255, 193, 7), 0.2);
    border-radius: 24px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.disclaimer-content h4 {
    color: var(--warning, #ffc107);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.disclaimer-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 0.9rem;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright p {
    color: var(--primary);
    font-size: 0.86rem;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.86rem;
    transition: var(--transition);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.footer-legal a:hover {
    color: var(--primary);
}

/* 버전과 언어 전환을 같은 줄에 배치 */
.footer-version-language {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.86rem;
}

.footer-language {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-language a {
    color: var(--primary);
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(var(--surface-rgb), 0.5);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    height: 1.5rem;
    line-height: 1.5rem;
}

.footer-language a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateY(-2px);
}

.footer-version {
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    background: rgba(var(--surface-rgb), 0.5);
    padding: 0.25rem 0.75rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    z-index: 100002;
    position: relative;
    height: 1.5rem;
    line-height: 1.5rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.footer-version a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.footer-version:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateY(-1px);
}

/* Version Page Styles */
.version-info {
    text-align: center;
    margin-bottom: 2rem;
}

.version-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.version-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

.version-status {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.version-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.version-description {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.version-description ul {
    list-style: none;
    padding: 0;
}

.version-description li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.version-description li:last-child {
    border-bottom: none;
}

.contribution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.contribution-item {
    background: rgba(var(--surface-rgb), 0.5);
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.contribution-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.1);
}

.contribution-item h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.update-item {
    background: rgba(var(--surface-rgb), 0.3);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.update-item:hover {
    background: rgba(var(--surface-rgb), 0.5);
    transform: translateY(-1px);
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.update-version {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.update-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.update-content h4 {
    color: var(--text);
    margin-bottom: 0.75rem;
}

.update-content ul {
    list-style: none;
    padding: 0;
}

.update-content li {
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1rem;
}

.update-content li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
}

.roadmap {
    margin-top: 1.5rem;
}

.roadmap-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(var(--surface-rgb), 0.3);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: var(--transition);
}

.roadmap-item:hover {
    background: rgba(var(--surface-rgb), 0.5);
    transform: translateY(-1px);
}

.roadmap-version {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    min-width: 80px;
    text-align: center;
    padding: 0.5rem;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 24px;
    height: fit-content;
}

.roadmap-content h4 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.roadmap-content p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.roadmap-content ul {
    list-style: none;
    padding: 0;
}

.roadmap-content li {
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1rem;
}

.roadmap-content li::before {
    content: "→";
    color: var(--primary);
    position: absolute;
    left: 0;
}

.tech-stack {
    margin-top: 1.5rem;
}

.tech-category {
    margin-bottom: 2rem;
}

.tech-category h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    transition: var(--transition);
}

.tech-tag:hover {
    background: rgba(var(--primary-rgb), 0.2);
    transform: translateY(-1px);
}

.back-button {
    text-align: center;
    margin: 3rem 0;
}

.back-button .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 25px;
}

/* Mobile/Tablet: Show only icon in back button */
@media (max-width: 1024px) {
    .back-button .btn {
        padding: 0;
        width: 50px;
        height: 50px;
        border-radius: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        text-indent: -9999px;
        overflow: hidden;
        position: relative;
    }
    
    .back-button .btn::before {
        content: "🏠";
        text-indent: 0;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        line-height: 1;
        margin: 0;
        padding: 0;
    }
}

/* Mobile Responsiveness for Version Page */
@media (max-width: 768px) {
    .roadmap-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .roadmap-version {
        min-width: auto;
        text-align: left;
    }
    
    .update-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .contribution-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-tags {
        justify-content: center;
    }
}

/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-about {
        grid-column: 1 / -1;
    }
    
    .footer-container {
        padding: 3rem 1.5rem 1.5rem;
    }
    
    .social-links {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .footer-legal {
        order: -1;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .footer {
        margin-top: 0.5rem;
    }
    
    .footer-container {
        padding: 2.5rem 1rem 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .footer-section h4 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-section p {
        font-size: 0.9rem;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .footer-badges {
        justify-content: center;
    }
    
    .footer-badges .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .medical-links {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .medical-links a {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .social-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .social-links a {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .footer-stats {
        max-width: 200px;
        margin: 0 auto;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .footer-disclaimer {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .disclaimer-content h4 {
        font-size: 0.9rem;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .disclaimer-content p {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
        .footer-legal {
        flex-direction: row;
        gap: 0.75rem;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-legal a {
        font-size: 0.8rem;
    }

    .footer-language {
        margin: 0.75rem 0;
    }

    .footer-language a {
        padding: 0.4rem 0.8rem;
    }

    .footer-copyright p {
        font-size: 0.8rem;
    }

    .footer-version {
        padding: 0.2rem 0.6rem;
    }
}

/* Small Mobile Styles */
@media (max-width: 370px) {
    .footer-container {
        padding: 2rem 0.75rem 1rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
    
    .footer-section h3 {
        font-size: 1rem;
    }
    
    .footer-section h4 {
        font-size: 0.9rem;
    }
    
    .footer-section p {
        font-size: 0.85rem;
    }
    
    .social-links a {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .footer-disclaimer {
        padding: 0.75rem;
    }
    
    .disclaimer-content h4 {
        font-size: 0.85rem;
    }
    
    .disclaimer-content p {
        font-size: 0.75rem;
    }
    
    .footer-legal a {
        font-size: 0.75rem;
    }
    
    .footer-copyright p {
        font-size: 0.75rem;
    }
}

/* Free AI Service Information Styles */
.free-ai-info {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-secondary) 100%);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.free-ai-info h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.free-ai-info h5 {
    color: var(--text);
    margin: 1rem 0 0.5rem 0;
    font-size: 1rem;
}

.free-ai-info ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.free-ai-info li {
    margin: 0.3rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.license-info {
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1rem;
}

.license-info h5 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* 피드백 버튼 스타일 */
.feedback-btn {
    background: rgba(var(--surface-rgb), 0.5);
    padding: 0.5rem 0.75rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-height: 2.5rem;
    font-weight: 500;
}

.feedback-btn:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.feedback-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.8rem;
    color: inherit;
}


/* 피드백 모달 폼 스타일 */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
    color: var(--text);
    transition: var(--transition);
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* 모바일에서 피드백 버튼 스타일 조정 */
@media (max-width: 768px) {
    .feedback-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 370px) {
    .feedback-btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.7rem;
    }
}
/* Allow title wrapping */
.header h1 { white-space: normal !important; word-break: keep-all; overflow-wrap: anywhere; }

/* Desktop header styles */
@media (min-width: 1024px) {
    .header.scroll-fade,
    .header.scroll-fade.scroll-visible {
        display: inline-table;
    }
    
    .header.scroll-fade p,
    .header.scroll-fade.scroll-visible p {
        text-align: left;
    }
}

