/* ================================
 * KOC Enhanced - Beautiful Design System
 * Version: 2.6 - CSS File Separated
 * ================================ */

/* 기본 컨테이너 */
#koc-enhanced-checker {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 1400px;
    margin: 2rem auto;
    border-radius: 25px;
    box-shadow: 
        0 20px 60px rgba(102, 126, 234, 0.4),
        0 8px 32px rgba(118, 75, 162, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

#koc-enhanced-checker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* 메인 카드 */
.koc-main-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 12px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.6s ease;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.koc-main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
    background-size: 400% 100%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.koc-main-card:hover {
    transform: translateY(-8px) scale(1.005);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.2),
        0 15px 35px rgba(0, 0, 0, 0.15);
}

/* 타이틀 */
.koc-main-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
    padding: 3rem 2rem 1rem;
    position: relative;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.koc-icon-wrapper {
    display: inline-block;
    margin-right: 1rem;
    padding: 0.8rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    animation: iconFloat 6s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
}

.koc-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    font-weight: 500;
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
    line-height: 1.6;
}

/* 폼 스타일 */
.koc-form-container {
    padding: 0 3rem 3rem;
    position: relative;
}

.koc-form-group {
    margin-bottom: 2rem;
}

.koc-form-label {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.15rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.koc-label-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.koc-form-control {
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.4s ease;
    width: 100%;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.koc-form-control:focus {
    border-color: #667eea;
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 8px 30px rgba(102, 126, 234, 0.15);
    outline: none;
    transform: translateY(-3px) scale(1.02);
    background: rgba(255, 255, 255, 1);
}

.koc-btn-analyze {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    padding: 1.8rem 3rem;
    font-weight: 800;
    font-size: 1.3rem;
    color: #ffffff;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        0 4px 15px rgba(118, 75, 162, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    cursor: pointer;
    width: 100%;
    transition: all 0.4s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.koc-btn-analyze:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.6),
        0 8px 25px rgba(118, 75, 162, 0.4);
}

.koc-btn-analyze:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

/* 진행 상황 표시 */
.koc-progress-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    margin: 3rem 0;
    position: relative;
    z-index: 2;
}

.koc-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.koc-progress-header h5 {
    margin: 0;
    color: #1e293b;
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.koc-spin-icon {
    display: inline-block;
    animation: spin 2s linear infinite;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 12px;
}

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

.koc-progress-stats {
    display: flex;
    gap: 2rem;
    font-size: 1rem;
    color: #64748b;
    font-weight: 600;
    align-items: center;
}

.koc-progress-bar-container {
    border-radius: 20px;
    overflow: hidden;
    height: 2.2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.koc-progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 30%, #f093fb 100%);
    background-size: 400% 100%;
    animation: progressGradient 3s ease infinite;
    transition: width 1s ease;
    height: 100%;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes progressGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 결과 컨테이너 */
.koc-results-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 3rem;
    margin: 3rem 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.8s ease-out;
}

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

/* 알림 메시지 */
.koc-alert {
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border: none;
    font-weight: 500;
}

.koc-alert-success {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1), rgba(56, 249, 215, 0.05));
    color: #065f46;
    border-left: 5px solid #10b981;
}

.koc-alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(79, 172, 254, 0.05));
    color: #1e3a8a;
    border-left: 5px solid #3b82f6;
}

.koc-alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(254, 225, 64, 0.05));
    color: #92400e;
    border-left: 5px solid #f59e0b;
}

.koc-alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
    color: #7f1d1d;
    border-left: 5px solid #ef4444;
}

/* 분석 요약 */
.koc-analysis-summary {
    margin-bottom: 3rem;
}

.koc-analysis-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.koc-analysis-url {
    font-size: 1rem;
    color: #667eea;
    word-break: break-all;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 1.5rem 2rem;
    border-radius: 14px;
    margin-bottom: 2rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.koc-page-info {
    background: rgba(102, 126, 234, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.koc-page-info div {
    margin-bottom: 1rem;
}

.koc-page-info div:last-child {
    margin-bottom: 0;
}

/* 통계 카드들 */
.koc-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 3rem 0;
}

.koc-stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    min-height: 200px;
}

.koc-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    transition: height 0.3s ease;
}

.koc-stat-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
}

.koc-stat-card:hover::before {
    height: 6px;
}

.koc-stat-primary { --gradient: linear-gradient(135deg, #667eea, #764ba2); }
.koc-stat-info { --gradient: linear-gradient(135deg, #4facfe, #00f2fe); }
.koc-stat-success { --gradient: linear-gradient(135deg, #43e97b, #38f9d7); }
.koc-stat-warning { --gradient: linear-gradient(135deg, #fa709a, #fee140); }

.koc-stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.koc-stat-card:hover .koc-stat-icon {
    transform: scale(1.1) rotateY(180deg);
}

.koc-stat-number {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 0.8rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.koc-stat-label {
    font-size: 1rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.koc-stat-description {
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 500;
    line-height: 1.3;
}

/* 키워드 섹션 */
.koc-keywords-section {
    margin: 3rem 0;
}

.koc-keywords-section h4 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2rem;
}

.koc-keywords-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 2개에서 3개로 변경 */
    gap: 1.5rem;
    margin-top: 2rem;
}

.koc-keyword-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 1.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.koc-keyword-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 1);
}

.koc-keyword-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.koc-keyword-term {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
}

.koc-keyword-rank {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.koc-keyword-stats {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
}

.koc-keyword-stats strong {
    color: #374151;
}

/* ================================
 * 네트워크 그래프 크기 수정 (4:3 비율)
 * ================================ */

/* 네트워크 섹션 전체 */
.koc-network-section {
    margin: 3rem 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
}

.koc-network-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.05));
    padding: 2.5rem 3rem;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
}

.koc-network-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    right: 5%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, #764ba2, transparent);
    border-radius: 2px;
}

.koc-network-header h4 {
    font-size: 2rem;
    font-weight: 900;
    color: #1e293b;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.koc-network-header p {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
    line-height: 1.6;
}

/* 메인 그래프 컨테이너 - 4:3 비율로 대폭 확대 */
#koc-enhanced-network {
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 비율 (75% = 3/4) */
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 0 0 20px 20px;
    overflow: hidden;
    box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* vis.js 네트워크가 실제로 렌더링되는 영역 */
#koc-enhanced-network > div {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 0 20px 20px;
}

/* vis.js 캔버스 요소 */
#koc-enhanced-network canvas {
    border-radius: 0 0 20px 20px !important;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 그래프 컨트롤 버튼들 개선 */
.koc-network-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    display: flex;
    gap: 0.5rem;
}

.koc-network-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.koc-network-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 그래프 로딩 상태 */
.koc-network-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 50;
}

.koc-network-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-left: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.koc-network-loading-text {
    color: #64748b;
    font-weight: 600;
    font-size: 1rem;
}

/* 그래프 정보 오버레이 */
.koc-network-info {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    color: #64748b;
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.koc-network-section:hover .koc-network-info {
    transform: translateY(0);
}

.koc-network-info-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.koc-network-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    font-size: 0.8rem;
}

.koc-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.koc-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

/* 반응형 네트워크 그래프 */
@media (max-width: 1200px) {
    #koc-enhanced-network {
        padding-bottom: 80%; /* 4:3.2 비율로 약간 세로 증가 */
    }
    
    .koc-network-header {
        padding: 2rem 2.5rem;
    }
    
    .koc-network-header h4 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    #koc-enhanced-network {
        padding-bottom: 85%; /* 모바일에서 더 세로로 늘림 */
    }
    
    .koc-network-header {
        padding: 1.5rem 2rem;
    }
    
    .koc-network-header h4 {
        font-size: 1.6rem;
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .koc-network-header p {
        font-size: 1rem;
        text-align: center;
    }
    
    .koc-network-controls {
        position: relative;
        top: auto;
        right: auto;
        justify-content: center;
        padding: 1rem;
        background: rgba(248, 250, 252, 0.8);
        margin: 1rem;
        border-radius: 12px;
    }
    
    .koc-network-info {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        transform: none;
        margin: 1rem;
        border-radius: 12px 12px 0 0;
    }
    
    .koc-network-legend {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    #koc-enhanced-network {
        padding-bottom: 100%; /* 정사각형 비율 */
        border-radius: 0 0 16px 16px;
    }
    
    .koc-network-header {
        padding: 1rem 1.5rem;
        border-radius: 16px 16px 0 0;
    }
    
    .koc-network-header h4 {
        font-size: 1.4rem;
    }
    
    .koc-network-header p {
        font-size: 0.9rem;
    }
    
    .koc-network-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .koc-network-btn {
        text-align: center;
        padding: 0.75rem 1rem;
    }
}

/* 고해상도 디스플레이 최적화 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    #koc-enhanced-network canvas {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
    .koc-network-section {
        background: rgba(30, 41, 59, 0.95);
    }
    
    .koc-network-header {
        background: linear-gradient(135deg, rgba(51, 65, 85, 0.8), rgba(30, 41, 59, 0.6));
        border-bottom-color: rgba(71, 85, 105, 0.3);
    }
    
    .koc-network-header h4 {
        color: #f1f5f9;
    }
    
    .koc-network-header p {
        color: #cbd5e1;
    }
    
    #koc-enhanced-network {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }
    
    .koc-network-info {
        background: rgba(30, 41, 59, 0.95);
        border-color: rgba(71, 85, 105, 0.3);
        color: #cbd5e1;
    }
    
    .koc-network-info-title {
        color: #f1f5f9;
    }
}

/* 프린트 스타일 */
@media print {
    .koc-network-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .koc-network-controls,
    .koc-network-info {
        display: none;
    }
    
    #koc-enhanced-network {
        padding-bottom: 60%; /* 프린트 시 더 컴팩트하게 */
        background: white;
    }
}

/* 반응형 디자인 업데이트 */
@media (max-width: 1200px) {
    .koc-keywords-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .koc-keywords-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .koc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    #koc-enhanced-checker {
        padding: 2rem;
        margin: 1rem auto;
    }
    
    .koc-main-title {
        font-size: 2.2rem;
        padding: 2rem 1.5rem 1rem;
    }
    
    .koc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .koc-stat-card {
        padding: 1.5rem 1rem;
        min-height: 160px;
    }
    
    .koc-stat-number {
        font-size: 2.2rem;
    }
    
    .koc-stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .koc-keywords-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    #koc-enhanced-network {
        height: 400px;
    }
    
    .koc-progress-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .koc-progress-stats {
        justify-content: center;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .koc-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .koc-stat-card {
        padding: 2rem 1.5rem;
        min-height: 180px;
    }
    
    .koc-stat-number {
        font-size: 2.5rem;
    }
    
    .koc-stat-icon {
        width: 60px;
        height: 60px;
    }
    
    .koc-form-container {
        padding: 0 2rem 2rem;
    }
    
    .koc-btn-analyze {
        padding: 1.5rem 2rem;
        font-size: 1.1rem;
    }
    
    .koc-analysis-url {
        font-size: 0.9rem;
        padding: 1rem 1.5rem;
    }
    
    .koc-progress-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* 로딩 상태 */
.koc-loading {
    opacity: 0.7;
    pointer-events: none;
    filter: blur(1px);
    transition: all 0.3s ease;
}

/* 애니메이션 최적화 */
.koc-stat-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.koc-stat-card:nth-child(1) { animation-delay: 0.1s; }
.koc-stat-card:nth-child(2) { animation-delay: 0.2s; }
.koc-stat-card:nth-child(3) { animation-delay: 0.3s; }
.koc-stat-card:nth-child(4) { animation-delay: 0.4s; }

.koc-keyword-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

/* 고급 효과 */
.koc-main-card:hover .koc-icon-wrapper {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.koc-form-control::placeholder {
    color: #9ca3af;
    transition: opacity 0.3s ease;
}

.koc-form-control:focus::placeholder {
    opacity: 0.5;
}

/* 접근성 개선 */
.koc-btn-analyze:focus {
    outline: none;
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.3),
        0 8px 25px rgba(102, 126, 234, 0.4);
}

.koc-form-control:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 프린트 스타일 */
@media print {
    #koc-enhanced-checker {
        background: white;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .koc-main-card, .koc-results-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .koc-btn-analyze, .koc-progress-container {
        display: none;
    }
}

/* 다크모드 지원 (미래 확장용) */
@media (prefers-color-scheme: dark) {
    .koc-main-card {
        background: rgba(30, 41, 59, 0.95);
        color: #f1f5f9;
    }
    
    .koc-form-control {
        background: rgba(51, 65, 85, 0.8);
        border-color: #475569;
        color: #f1f5f9;
    }
    
    .koc-results-container {
        background: rgba(30, 41, 59, 0.95);
        color: #f1f5f9;
    }
}

.koc-tfidf-explanation {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    border-left: 4px solid #667eea;
}

.koc-tfidf-explanation strong {
    color: #667eea;
    font-weight: 700;
}