/* 접속자 통계 스타일 */
/* GameBoy.kr 접속자 통계 시스템 - 원래 디자인 복원 */

.visitor-stats-section {
    padding: 20px 0;
    margin: 20px 0;
}

.visitor-stats-section h3 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.visitor-stats-section h3 i {
    font-size: 0.8rem;
    color: #667eea;
    background: #667eea;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.visitor-stats {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.visitor-stat {
    background: white;
    padding: 18px 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.visitor-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
    line-height: 1;
}

.visitor-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 400;
}

/* 실시간 통계 업데이트 애니메이션 */
.visitor-number.updating {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .visitor-stats-section {
        padding: 20px;
    }
    
    .visitor-stats {
        gap: 12px;
    }
    
    .visitor-stat {
        padding: 16px 18px;
    }
    
    .visitor-number {
        font-size: 2.2rem;
    }
    
    .visitor-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .visitor-stats-section {
        padding: 18px;
        margin: 16px 0;
    }
    
    .visitor-stats-section h3 {
        font-size: 1rem;
    }
    
    .visitor-stats {
        gap: 10px;
    }
    
    .visitor-stat {
        padding: 14px 16px;
    }
    
    .visitor-number {
        font-size: 2rem;
    }
    
    .visitor-label {
        font-size: 0.7rem;
    }
}

/* 관리자 링크 스타일 */
.visitor-stats-actions {
    margin-top: 16px;
    text-align: center;
}

.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.admin-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.admin-link i {
    font-size: 0.8rem;
}

/* 관리자 대시보드 스타일 */
.admin-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.admin-stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.admin-stat-card h4 {
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-stat-card h4 i {
    color: #6366f1;
    font-size: 1.2rem;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 16px;
}

.chart-container canvas {
    max-height: 100%;
}

/* 통계 요약 카드 */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    border: 1px solid #cbd5e1;
}

.summary-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.summary-card .label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 실시간 업데이트 표시 */
.real-time-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.real-time-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* 에러 상태 */
.visitor-stat.error .visitor-number {
    color: #ef4444;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .admin-stat-card {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .admin-stat-card h4 {
        color: #f9fafb;
    }
    
    .summary-card {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
        border-color: #6b7280;
    }
    
    .summary-card .value {
        color: #f9fafb;
    }
    
    .summary-card .label {
        color: #d1d5db;
    }
}

/* 접근성 개선 */
.visitor-stat:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.visitor-stat[aria-label] {
    cursor: pointer;
}

/* 인쇄 스타일 */
@media print {
    .visitor-stats-section {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .visitor-stat {
        background: #f8f9fa !important;
        border: 1px solid #dee2e6 !important;
    }
    
    .visitor-number,
    .visitor-label {
        color: black !important;
    }
}
