/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1d1d1f;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Background Image */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.background-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(1px);
    z-index: -1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Hero Section */
.hero-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 0;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #1d1d1f 0%, #424245 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: #6e6e73;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out 0.2s both;
}

/* Table of Contents Section */
.toc-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    margin: 40px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.toc-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 60px;
    color: #1d1d1f;
}

.toc-category {
    margin-bottom: 48px;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f5f5f7;
}

.toc-items {
    display: grid;
    gap: 16px;
}

.toc-item {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    text-decoration: none;
    color: #1d1d1f;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.toc-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.toc-item:hover::before {
    left: 100%;
}

.toc-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 122, 255, 0.2);
}

.toc-number,
.toc-label {
    font-weight: 600;
    color: #007aff;
    margin-right: 16px;
    min-width: 40px;
    font-size: 0.9rem;
}

.toc-text {
    font-weight: 500;
    font-size: 1.1rem;
    flex: 1;
}

/* Videos Section */
.videos-section {
    padding: 80px 0;
}

.episode-header {
    margin: 80px 0 40px 0;
    text-align: center;
}

.episode-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1d1d1f;
    padding: 20px 0;
    border-top: 2px solid #f5f5f7;
    border-bottom: 2px solid #f5f5f7;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
}

.video-item {
    margin-bottom: 80px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
}

.video-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.video-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 24px;
    text-align: center;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-text {
    color: #6e6e73;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-section {
        padding: 60px 0;
        min-height: 50vh;
    }
    
    .toc-section {
        margin: 20px 16px;
        padding: 60px 0;
    }
    
    .toc-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .category-title {
        font-size: 1.25rem;
    }
    
    .toc-item {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .toc-number,
    .toc-label {
        margin-right: 0;
        min-width: auto;
    }
    
    .toc-text {
        font-size: 1rem;
    }
    
    .video-item {
        padding: 24px;
        margin-bottom: 60px;
    }
    
    .video-title {
        font-size: 1.25rem;
        margin-bottom: 20px;
    }
    
    .episode-title {
        font-size: 1.5rem;
        padding: 16px;
    }
    
    .videos-section {
        padding: 60px 0;
    }
    
    .episode-header {
        margin: 60px 0 30px 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .toc-section {
        margin: 16px;
        padding: 40px 0;
    }
    
    .video-item {
        padding: 20px;
    }
}

/* Smooth scrolling enhancement */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Focus styles for accessibility */
.toc-item:focus {
    outline: 2px solid #007aff;
    outline-offset: 2px;
}

/* Loading animation for videos */
.video-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007aff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Site Footer Styles */
.site-footer{
  margin-top: 4rem; padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,.14);
}
.footer-row{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.footer-icon{ opacity:.85; }
.footer-line{ margin:.35rem 0; }
.footer-line a{
  text-decoration:none; border-bottom:1px solid transparent;
}
.footer-line a:hover{ border-bottom-color: currentColor; }
