/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4e79a7;
    --secondary-color: #59a14f;
    --accent-color: #f28e2b;
    --danger-color: #e15759;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --border-color: #dadce0;
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
    --shadow-md: 0 1px 3px 0 rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* 네비게이션 */
.navbar {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.navbar-brand i {
    font-size: 1.8rem;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 35px;
}

.navbar-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.navbar-menu a:hover {
    color: var(--primary-color);
}

/* 히어로 섹션 */
.hero {
    background: linear-gradient(135deg, #4e79a7 0%, #76b7b2 100%);
    color: white;
    padding: 100px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.5;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 50px;
    opacity: 0.95;
}

.hero-stats-row {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
}

.hero-stat-item {
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.hero-btn {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* 분석 섹션 */
.analytics-section {
    padding: 80px 0;
    background: var(--bg-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--text-primary);
}

.tabs-container {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding: 10px;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.tab-btn i {
    font-size: 2rem;
    color: var(--primary-color);
    display: block;
    margin-bottom: 10px;
}

.tab-btn span {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.tab-btn small {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tab-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.tab-btn.active i,
.tab-btn.active span,
.tab-btn.active small {
    color: white;
}

/* 탭 컨텐츠 */
.tab-content-wrapper {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

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

.chart-card {
    margin-bottom: 40px;
}

.chart-card:last-child {
    margin-bottom: 0;
}

.chart-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.chart-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

.chart-container {
    width: 100%;
    position: relative;
}

/* 데이터 섹션 */
.data-section {
    padding: 80px 0;
    background: white;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.data-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--bg-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.data-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.data-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.data-icon i {
    font-size: 2.5rem;
    color: white;
}

.data-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.data-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* About 섹션 */
.about-section {
    padding: 80px 0;
    background: var(--bg-color);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.about-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.about-card h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.about-card ul {
    list-style: none;
}

.about-card li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.about-card i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* 푸터 */
.footer {
    background: #1f2937;
    color: #d1d5db;
    padding: 40px 30px;
    text-align: center;
}

.footer p {
    margin: 5px 0;
    font-size: 0.95rem;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading {
    text-align: center;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.loading i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

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

/* 에러 오버레이 */
.error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.error-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.error-box i {
    font-size: 4rem;
    color: var(--danger-color);
    margin-bottom: 20px;
}

.error-box h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.error-box p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
}

.retry-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #3d5f7f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.retry-btn i {
    margin-right: 8px;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .about-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats-row {
        flex-direction: column;
        gap: 30px;
    }
    
    .tabs-container {
        flex-direction: column;
    }
    
    .tab-btn {
        min-width: 100%;
    }
    
    .data-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
}