/* 홈 전용 스타일 (공통 요소는 base/components로 이동) */

/* 히어로 섹션 */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    min-height: 70vh;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* 코드 애니메이션 */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-animation {
    background-color: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 30px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.code-line {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.code-line:nth-child(1) { animation-delay: 0.1s; }
.code-line:nth-child(2) { animation-delay: 0.3s; }
.code-line:nth-child(3) { animation-delay: 0.5s; }
.code-line:nth-child(4) { animation-delay: 0.7s; }
.code-line:nth-child(5) { animation-delay: 0.9s; }
.code-line:nth-child(6) { animation-delay: 1.1s; }
.code-line:nth-child(7) { animation-delay: 1.3s; }
.code-line:nth-child(8) { animation-delay: 1.5s; }

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

/* 섹션 공통 스타일 (패딩은 layout.css에서 관리) */

section:nth-child(even) {
    background-color: var(--bg-light);
}

section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-color);
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* 개요 섹션 */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.overview-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.overview-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.overview-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* 평가 섹션 */
.evaluation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.evaluation-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.evaluation-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.evaluation-percentage {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    padding: 30px;
}

.evaluation-details {
    padding: 30px;
}

.evaluation-details h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.evaluation-details p {
    color: var(--text-light);
    line-height: 1.6;
}

/* 도구 섹션 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.tool-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.tool-card:nth-child(2) {
    border-top-color: var(--secondary-color);
}

.tool-card:nth-child(3) {
    border-top-color: var(--accent-color);
}

.tool-card h3 {
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.tool-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* 커리큘럼 테이블 */
.curriculum-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table-header {
    display: grid;
    grid-template-columns: 80px 1fr 2fr 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
    padding: 20px;
}

.table-body .table-row {
    display: grid;
    grid-template-columns: 80px 1fr 2fr 120px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    transition: var(--transition);
}

.table-row:hover {
    background-color: var(--bg-light);
}

.table-row:last-child {
    border-bottom: none;
}

.col-week {
    font-weight: 600;
    color: var(--primary-color);
}

.col-topic {
    font-weight: 500;
    color: var(--text-color);
}

.col-content {
    color: var(--text-light);
    font-size: 0.95rem;
}

.col-link {
    text-align: center;
}

/* 푸터 */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 50px 0 20px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.github-link {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.7rem 1rem !important;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0.5rem;
}

.github-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.github-link svg {
    transition: var(--transition);
}

.github-link:hover svg {
    transform: scale(1.1);
}

.license-link {
    color: var(--secondary-color);
    text-decoration: underline;
}

.license-link:hover {
    color: #fff;
}

.license-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--secondary-color);
    margin-top: 1rem;
}

.open-source-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    margin: 10px 0;
    font-weight: 600;
    font-size: 0.9em;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
    transition: var(--transition);
}

.open-source-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.license-permissions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 15px 0;
}

.permission {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.permission.allowed {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-left: 3px solid #22c55e;
}

.permission.restricted {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-left: 3px solid #ef4444;
}

.permission:hover {
    transform: translateX(5px);
}

.license-info small {
    line-height: 1.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    margin: 0;
    opacity: 0.7;
}

.footer-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.badge.cc-license {
    background: linear-gradient(45deg, #f59e0b, #d97706);
}

.badge.open-source {
    background: linear-gradient(45deg, #10b981, #059669);
}

.badge.educational {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.badge.non-commercial {
    background: linear-gradient(45deg, #6366f1, #4f46e5);
}

/* Footer 반응형 */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        align-items: flex-start;
    }
}

/* 반응형 디자인 */
@media screen and (max-width: 768px) {
    /* 네비게이션 반응형 규칙은 components.css에서 관리 */

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .table-header,
    .table-body .table-row {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 10px;
    }

    .table-header {
        display: none;
    }

    .table-body .table-row {
        padding: 30px 20px;
        border-radius: 10px;
        margin-bottom: 20px;
        background: white;
        box-shadow: var(--shadow);
    }

    .col-week::before {
        content: '주차: ';
        font-weight: normal;
        color: var(--text-light);
    }

    .col-topic::before {
        content: '주제: ';
        font-weight: normal;
        color: var(--text-light);
        display: block;
        margin-top: 10px;
    }

    .col-content::before {
        content: '내용: ';
        font-weight: normal;
        color: var(--text-light);
        display: block;
        margin-top: 10px;
    }

    .col-link {
        margin-top: 15px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .code-animation {
        font-size: 0.8rem;
        padding: 20px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-content {
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .overview-grid,
    .evaluation-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }

    /* 버튼 크기 조정은 components.css에서 관리 */
}

/* 스크롤 애니메이션 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: slideInUp 0.6s ease forwards;
}

/* 로딩 애니메이션 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 참고 자료 섹션 */
.references {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.references h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: white;
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.reference-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    color: var(--text-color);
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.reference-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.reference-card.featured {
    border: 3px solid var(--secondary-color);
}

.reference-card.featured::before {
    content: "추천";
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    transform: rotate(12deg);
}

.reference-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.reference-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.reference-url {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    background: var(--bg-light);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

.reference-card p:not(.reference-url) {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.reference-tags {
    margin-bottom: 1.5rem;
}

.reference-link {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
}

.reference-link:hover {
    background: #357abd;
    transform: translateY(-2px);
}

.reference-tips {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.reference-tips h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: white;
}

.reference-tips ul {
    list-style: none;
    padding: 0;
}

.reference-tips li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.reference-tips li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.reference-tips strong {
    color: var(--secondary-color);
}

/* 반응형 디자인 - 참고 자료 */
@media (max-width: 768px) {
    .references-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .reference-card {
        padding: 1.5rem;
    }
    
    .references h2 {
        font-size: 2rem;
    }
    
    .section-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .reference-tips {
        padding: 1.5rem;
    }
}

/* Enhanced Hero Section with D3 and Animations */
.hero {
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 0 !important;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-content {
    position: relative !important;
    z-index: 3 !important;
    color: white !important;
    text-align: center !important;
    max-width: 600px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #a8edea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

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

.hero-buttons {
    display: flex !important;
    gap: 1rem !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

.btn.pulse {
    animation: pulse 2s infinite;
}


/* Enhanced Animations */
@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 172, 254, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(79, 172, 254, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 172, 254, 0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
        min-width: 100px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}
