/* =============================================================================
   WIA Plagiarism Checker - Styles
   WIAsis 디자인 스타일 통일
============================================================================= */

:root {
    /* 색상 */
    --primary-gradient: linear-gradient(135deg, #667eea, #764ba2);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #4CAF50;
    --warning-color: #FFC107;
    --danger-color: #F44336;
    --info-color: #2196F3;

    /* 그레이 스케일 */
    --dark: #2c3e50;
    --gray-800: #333;
    --gray-600: #666;
    --gray-400: #999;
    --gray-200: #e0e0e0;
    --gray-100: #f5f5f5;
    --white: #ffffff;

    /* 그림자 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);

    /* 테두리 반경 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* 간격 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* =============================================================================
   기본 스타일
============================================================================= */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-100);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.hidden {
    display: none !important;
}

/* =============================================================================
   헤더
============================================================================= */

header {
    background: var(--dark);
    color: var(--white);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    color: var(--primary-color);
}

.tagline {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
}

.language-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* =============================================================================
   메인 컨텐츠
============================================================================= */

main {
    padding: var(--spacing-xl) 0;
    min-height: calc(100vh - 200px);
}

/* =============================================================================
   카드 스타일
============================================================================= */

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
}

.card h2, .card h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    color: var(--dark);
}

.card h2 i, .card h3 i {
    color: var(--primary-color);
}

/* =============================================================================
   입력 섹션
============================================================================= */

.input-card {
    max-width: 900px;
    margin: 0 auto var(--spacing-xl);
}

.textarea-wrapper {
    position: relative;
    margin-bottom: var(--spacing-md);
}

#inputText {
    width: 100%;
    min-height: 250px;
    padding: var(--spacing-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    line-height: 1.8;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#inputText:focus {
    outline: none;
    border-color: var(--primary-color);
}

.char-counter {
    position: absolute;
    bottom: var(--spacing-sm);
    right: var(--spacing-md);
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* 파일 업로드 */
.file-upload {
    margin-bottom: var(--spacing-lg);
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--gray-100);
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-label:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

/* 옵션 섹션 */
.options-section {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.options-section h3 {
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.option-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.option-item:hover {
    box-shadow: var(--shadow-sm);
}

.option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.option-icon {
    margin-left: auto;
    color: var(--gray-400);
}

.depth-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.depth-selector label {
    font-size: 0.9rem;
    font-weight: 500;
}

.depth-selector select {
    padding: var(--spacing-md) var(--spacing-lg);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--white);
    font-size: 0.9rem;
}

/* 검사 버튼 */
.check-btn {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
}

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

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

.check-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* =============================================================================
   로딩 섹션
============================================================================= */

.loading-section {
    text-align: center;
    padding: var(--spacing-xl) * 2;
}

.loading-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl) * 2;
    box-shadow: var(--shadow-md);
    max-width: 500px;
    margin: 0 auto;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-lg);
}

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

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.loading-steps .step {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    transition: all 0.3s ease;
}

.loading-steps .step.active {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

.loading-steps .step.done {
    color: var(--success-color);
}

/* =============================================================================
   결과 섹션
============================================================================= */

.results-section {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 요약 카드 */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.summary-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.summary-card h3 {
    justify-content: center;
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
}

/* 점수 원형 */
.score-circle {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto var(--spacing-md);
}

.score-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.score-circle circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.score-circle .bg {
    stroke: var(--gray-200);
}

.score-circle .progress {
    stroke: var(--success-color);
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s ease, stroke 0.3s ease;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
}

/* 리스크 배지 */
.risk-badge, .verdict-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.risk-badge.low { background: #e8f5e9; color: #2e7d32; }
.risk-badge.medium { background: #fff3e0; color: #ef6c00; }
.risk-badge.high { background: #ffebee; color: #c62828; }
.risk-badge.critical { background: #f8d7da; color: #721c24; }

.verdict-badge.human { background: #e8f5e9; color: #2e7d32; }
.verdict-badge.mixed { background: #fff3e0; color: #ef6c00; }
.verdict-badge.ai { background: #ffebee; color: #c62828; }

.score-details {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
}

/* AI 게이지 */
.gauge-container {
    margin: var(--spacing-md) auto;
    max-width: 200px;
}

.gauge {
    height: 20px;
    background: linear-gradient(90deg, var(--success-color), var(--warning-color), var(--danger-color));
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.gauge-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--dark);
    border-radius: 2px;
    transition: left 1s ease;
}

.gauge-labels {
    display: flex;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: var(--spacing-xs);
}

.gauge-value {
    font-size: 2rem;
    font-weight: 700;
    margin: var(--spacing-md) 0;
}

.ai-details {
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-metric {
    display: flex;
    justify-content: center;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--gray-200);
}

/* 통계 카드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md);
    background: var(--gray-100);
    border-radius: var(--radius-md);
}

.stat-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
}

/* 하이라이트 텍스트 */
.highlighted-card {
    max-height: 500px;
    overflow: hidden;
}

.legend {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.legend-item span:first-child {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-item.original span:first-child { background: #e8f5e9; }
.legend-item.medium span:first-child { background: #fff3e0; }
.legend-item.high span:first-child { background: #ffcdd2; }

.highlighted-text {
    line-height: 2;
    padding: var(--spacing-md);
    background: var(--gray-100);
    border-radius: var(--radius-md);
    max-height: 400px;
    overflow-y: auto;
}

.highlighted-text .original {
    background: transparent;
}

.highlighted-text .plagiarized {
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.highlighted-text .plagiarized.medium {
    background: #fff3e0;
    border-bottom: 2px solid #ef6c00;
}

.highlighted-text .plagiarized.high {
    background: #ffcdd2;
    border-bottom: 2px solid #c62828;
}

.highlighted-text .plagiarized:hover {
    opacity: 0.8;
}

/* 소스 카드 */
.source-tabs {
    flex-wrap: wrap;
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
}

.source-tab {
    flex: 1;
    min-width: 100px;
    text-align: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.source-tab:hover {
    background: var(--gray-200);
}

.source-tab.active {
    background: var(--primary-gradient);
    color: var(--white);
}

.sources-list {
    max-height: 400px;
    overflow-y: auto;
}

.source-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--gray-200);
    transition: background 0.3s ease;
}

.source-item:hover {
    background: var(--gray-100);
}

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

.source-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.source-icon.web { color: var(--info-color); }
.source-icon.arxiv { color: #b31b1b; }
.source-icon.pubmed { color: #326599; }
.source-icon.semantic { color: #1857b6; }

.source-content {
    flex: 1;
    min-width: 0;
}

.source-title {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.source-title a {
    color: var(--dark);
    text-decoration: none;
}

.source-title a:hover {
    color: var(--primary-color);
}

.source-snippet {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.source-meta {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xs);
    font-size: 0.75rem;
    color: var(--gray-400);
}

.source-similarity {
    width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.similarity-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.similarity-value.high { color: var(--danger-color); }
.similarity-value.medium { color: var(--warning-color); }
.similarity-value.low { color: var(--success-color); }

/* 액션 버튼 */
.actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-xl);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: var(--primary-gradient);
    color: var(--white);
}

.action-btn.secondary {
    background: var(--gray-100);
    color: var(--gray-800);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* =============================================================================
   모달
============================================================================= */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--gray-600);
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    max-height: 60vh;
    overflow-y: auto;
}

.language-item {
    padding: var(--spacing-md) var(--spacing-lg);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-item:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.language-item.active {
    background: var(--primary-gradient);
    color: var(--white);
    border-color: transparent;
}

/* =============================================================================
   푸터
============================================================================= */

footer {
    background: var(--dark);
    color: var(--white);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

.footer-content {
    text-align: center;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

footer p {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
}

/* =============================================================================
   반응형
============================================================================= */

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-right {
        flex-wrap: wrap;
        justify-content: center;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .source-item {
        flex-direction: column;
    }

    .source-similarity {
        width: 100%;
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
    }

    .actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.25rem;
    }

    .nav-link {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.75rem;
    }

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

    .depth-selector {
        flex-direction: column;
        align-items: flex-start;
    }

    .legend {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* =============================================================================
   Language Modal (WIAsis Style)
============================================================================= */

.language-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.language-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.language-modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.language-modal-header {
    background: var(--primary-gradient);
    padding: var(--spacing-lg);
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
}

.language-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.language-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.language-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.language-search {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--gray-100);
}

.language-search i {
    color: var(--gray-400);
}

.language-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
    color: var(--gray-800);
}

.language-section {
    padding: var(--spacing-md);
}

.language-section h4 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--spacing-sm);
    max-height: 200px;
    overflow-y: auto;
}

.language-grid.all {
    max-height: 300px;
}

.language-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-item:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.language-item.active {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
    font-weight: 600;
}

.lang-flag {
    font-size: 1.25rem;
}

.lang-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =============================================================================
   WIAsis Style Footer
============================================================================= */

.wia-footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--white);
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section {
    min-width: 150px;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--white);
}

.footer-section p {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.wia-footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-sm);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-links span {
    white-space: nowrap;
    display: inline;
}

.footer-links i {
    width: 16px;
    text-align: center;
    font-size: 0.75rem;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.footer-badges {
    display: flex;
    gap: var(--spacing-md);
}

.footer-badges .badge {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-badges .badge i {
    color: var(--primary-color);
}

/* File Upload Styles */
.file-hint {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.75rem;
    color: var(--gray-400);
}

.file-loading-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-sm);
    margin-top: var(--spacing-sm);
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-loading-status i {
    animation: spin 1s linear infinite;
}

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

/* Footer Responsive */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links a {
        white-space: nowrap;
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .footer-badges {
        flex-wrap: wrap;
        justify-content: center;
    }

    .language-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================================================================
   파일 업로드 영역 (드래그 앤 드롭 스타일)
============================================================================= */
.file-upload-zone {
    margin: var(--spacing-lg) 0;
}

.file-drop-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    border: 3px dashed rgba(102, 126, 234, 0.4);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-drop-area:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateY(-2px);
}

.file-drop-area.dragover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.upload-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 16px;
    opacity: 0.8;
}

.file-drop-area:hover .upload-icon {
    opacity: 1;
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.upload-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.upload-subtitle {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.upload-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.file-drop-area:hover .upload-button {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 파일 로딩 상태 */
.file-loading-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    margin-top: 15px;
    color: var(--primary-color);
    font-weight: 500;
}

.file-loading-status.hidden {
    display: none;
}

/* 반응형 */
@media (max-width: 576px) {
    .file-drop-area {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .upload-title {
        font-size: 1rem;
    }
    
    .upload-button {
        padding: 10px 20px;
        font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    }
}

/* =============================================================================
   기부 배너
============================================================================= */
.donate-banner {
    margin-top: 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
}

.donate-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

@media (min-width: 768px) {
    .donate-content {
        flex-direction: row;
        justify-content: center;
        text-align: left;
    }
}

.donate-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    animation: heartbeat 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.donate-text {
    flex: 1;
}

.donate-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.donate-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    max-width: none;
}

.donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 90, 90, 0.3);
    flex-shrink: 0;
}

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 90, 0.4);
}

.donate-btn i {
    font-size: 1rem;
}

/* =============================================================================
   소셜 아이콘 스타일
============================================================================= */
.footer-social a.social-facebook {
    background: #1877F2;
}

.footer-social a.social-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.footer-social a.social-youtube {
    background: #FF0000;
}

.footer-social a.social-facebook:hover,
.footer-social a.social-instagram:hover,
.footer-social a.social-youtube:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

/* =============================================================================
   UI 개선 - 버튼 크기 확대
============================================================================= */

/* Actions 버튼 - 동일 크기 */
.actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: var(--spacing-lg) !important;
    margin: var(--spacing-xl) 0 !important;
}

.action-btn {
    width: 100% !important;
    padding: var(--spacing-lg) var(--spacing-xl) !important;
    font-size: 1.1rem !important;
    justify-content: center !important;
}

.action-btn.secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    color: white !important;
}

.action-btn.secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
}

/* Source 탭 - 크고 균등하게 */
.source-tabs {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: var(--spacing-sm) !important;
    margin-bottom: var(--spacing-lg) !important;
}

.source-tab {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: var(--spacing-md) var(--spacing-sm) !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    border-radius: var(--radius-md) !important;
    white-space: nowrap !important;
}

.source-tab span {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
}

.source-tab.active span {
    background: rgba(255,255,255,0.2);
}

/* 반응형 - 모바일 */
@media (max-width: 768px) {
    .actions {
        grid-template-columns: 1fr !important;
    }
    
    .source-tabs {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .source-tab:first-child {
        grid-column: span 2;
    }
}

/* =============================================================================
   후원 배너 - 한 행 전체 너비
============================================================================= */
.donate-banner {
    margin-top: 30px !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%) !important;
    border: 2px dashed rgba(102, 126, 234, 0.3) !important;
    border-radius: 16px !important;
    padding: 20px 30px !important;
}

.donate-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    width: 100% !important;
}

.donate-icon {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.3rem !important;
    color: white !important;
}

.donate-text {
    flex: 1 !important;
    text-align: left !important;
}

.donate-text {
    flex: 1;
}

.donate-text h4 {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-bottom: 4px !important;
}

.donate-text p {
    font-size: 0.9rem !important;
    color: #6b7280 !important;
    margin: 0 !important;
}

.donate-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 14px 28px !important;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%) !important;
    color: white !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: all 0.3s ease !important;
}

.donate-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4) !important;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .donate-content {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .donate-text {
        text-align: center !important;
    }
}

/* =============================================================================
   모바일 업로드 개선
============================================================================= */
@media (max-width: 768px) {
    .file-drop-area {
        min-height: 180px !important;
        padding: 30px 20px !important;
    }
    
    .upload-icon i {
        font-size: 48px !important;
    }
    
    .upload-title {
        font-size: 16px !important;
    }
    
    .upload-button {
        padding: 14px 28px !important;
        font-size: 16px !important;
        min-height: 50px !important;
        /* iOS 터치 최적화 */
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* iOS Safari 파일 선택 버튼 */
    input[type="file"] {
        font-size: 16px !important; /* iOS 줌 방지 */
    }
}

/* 터치 디바이스 hover 효과 제거 */
@media (hover: none) {
    .file-drop-area:hover {
        transform: none !important;
        border-color: rgba(102, 126, 234, 0.3) !important;
    }
    
    .file-drop-area:active {
        transform: scale(0.98) !important;
        border-color: var(--primary-color) !important;
    }
}

/* =============================================================================
   점자 파일 지원 배지 (웹접근성)
============================================================================= */
.braille-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #059669;
    animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.braille-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* 다크모드 대응 */
@media (prefers-color-scheme: dark) {
    .braille-badge {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(6, 182, 212, 0.25) 100%);
        color: #34d399;
    }
}

/* =============================================================================
   학술 DB 검색 결과 (Semantic Scholar, OpenAlex, CrossRef)
============================================================================= */
.academic-card {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.academic-card h3 {
    color: #7c3aed;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.academic-badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.academic-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #6b7280;
    flex-wrap: wrap;
}

.academic-stats code {
    background: rgba(147, 51, 234, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    color: #7c3aed;
}

.academic-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.academic-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.academic-item:hover {
    border-color: #a855f7;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.15);
}

.academic-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.academic-item-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

.academic-item-title a {
    color: #7c3aed;
    text-decoration: none;
}

.academic-item-title a:hover {
    text-decoration: underline;
}

.academic-source-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.academic-source-badge.semantic {
    background: #dbeafe;
    color: #1d4ed8;
}

.academic-source-badge.openalex {
    background: #dcfce7;
    color: #15803d;
}

.academic-source-badge.crossref {
    background: #fef3c7;
    color: #b45309;
}

.academic-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #6b7280;
}

.academic-item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.academic-item-meta i {
    font-size: 11px;
    opacity: 0.7;
}

.academic-citations {
    color: #7c3aed !important;
    font-weight: 600;
}

.academic-abstract {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 학술 검색 로딩 */
.academic-loading {
    text-align: center;
    padding: 30px;
    color: #7c3aed;
}

.academic-loading i {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

/* =============================================================================
   WIA 접근성 도구 (Accessibility Tools)
============================================================================= */

/* FAB 버튼 (우측 하단) */
.a11y-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.a11y-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(124, 58, 237, 0.5);
}

.a11y-fab:active {
    transform: scale(0.95);
}

/* 접근성 모달 */
.a11y-modal {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 320px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.a11y-modal.hidden {
    display: none;
}

.a11y-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
}

.a11y-modal-header span {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.a11y-modal-header button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.a11y-modal-header button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.a11y-modal-content {
    padding: 16px 20px;
}

.a11y-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.a11y-option:last-child {
    border-bottom: none;
}

.a11y-option > span {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.a11y-toggle {
    background: #f3f4f6;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    transition: all 0.2s;
}

.a11y-toggle:hover {
    background: #e5e7eb;
}

.a11y-toggle.active {
    background: #7c3aed;
    color: white;
}

.a11y-font-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.a11y-font-controls button {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.a11y-font-controls button:hover {
    background: #f3f4f6;
    border-color: #7c3aed;
}

.a11y-font-controls span {
    font-size: 12px;
    color: #6b7280;
    min-width: 40px;
    text-align: center;
}

.a11y-action-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.a11y-action-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.a11y-action-btn.braille-btn {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.a11y-action-btn.braille-btn:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.a11y-link a {
    color: #7c3aed;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.a11y-link a:hover {
    text-decoration: underline;
}

.a11y-modal-footer {
    padding: 12px 20px;
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9ca3af;
}

/* 점자 결과 모달 */
.braille-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.braille-result-modal.hidden {
    display: none;
}

.braille-result-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.braille-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
}

.braille-result-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.braille-result-header button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
}

.braille-text {
    padding: 24px;
    font-family: 'Noto Sans Symbols', 'Segoe UI Symbol', sans-serif;
    font-size: 24px;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
    background: #f9fafb;
    letter-spacing: 2px;
}

.braille-result-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

.braille-copy-btn, .braille-download-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.braille-copy-btn {
    background: #f3f4f6;
    color: #374151;
}

.braille-copy-btn:hover {
    background: #e5e7eb;
}

.braille-download-btn {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
}

.braille-download-btn:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 고대비 모드 */
body.high-contrast {
    background: #000 !important;
    color: #fff !important;
}

body.high-contrast .card,
body.high-contrast .summary-card,
body.high-contrast .a11y-modal {
    background: #111 !important;
    border-color: #fff !important;
    color: #fff !important;
}

body.high-contrast input,
body.high-contrast textarea,
body.high-contrast select {
    background: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}
