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

:root {
    --primary-color: #FF9900;
    --primary-dark: #E88B00;
    --secondary-color: #232F3E;
    --accent-color: #146EB4;
    --text-primary: #232F3E;
    --text-secondary: #545B64;
    --text-light: #879196;
    --bg-primary: #ffffff;
    --bg-secondary: #FAFAFA;
    --bg-dark: #232F3E;
    --border-color: #D5DBDB;
    --shadow-sm: 0 1px 2px 0 rgb(35 47 62 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(35 47 62 / 0.1), 0 2px 4px -2px rgb(35 47 62 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(35 47 62 / 0.1), 0 4px 6px -4px rgb(35 47 62 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(35 47 62 / 0.1), 0 8px 10px -6px rgb(35 47 62 / 0.1);
    --gradient-primary: linear-gradient(135deg, #FF9900 0%, #FFB84D 100%);
    --gradient-secondary: linear-gradient(135deg, #232F3E 0%, #37475A 100%);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Styles */
.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

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

.nav-brand i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

/* Page Management */
.page {
    display: none;
    min-height: 100vh;
    padding-top: 5rem;
}

.page.active {
    display: block;
}

/* Hero Section */
.hero {
    background: var(--gradient-secondary);
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.cta-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: var(--primary-dark);
}

.hero-visual {
    position: relative;
    height: 400px;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    font-weight: 500;
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.5rem;
    opacity: 0.9;
}

.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 20%;
    animation-delay: 2s;
}

.card-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

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

/* Section Styles */
.featured-section,
.webinar-listing {
    padding: 4rem 0;
}

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

.browse-header {
    background: var(--bg-primary);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.search-filter {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-primary);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#category-filter {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1rem;
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

#category-filter:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Webinar Grid */
.webinar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.webinar-card {
    background: var(--bg-primary);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.webinar-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.webinar-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.webinar-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.webinar-thumbnail .thumbnail-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.webinar-thumbnail .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;
}

.thumbnail-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.webinar-card:hover .play-overlay {
    opacity: 1;
}

/* Progress badges */
.progress-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 4;
}

.progress-badge.completed {
    background: var(--accent-color);
    color: white;
}

.progress-badge.in-progress {
    background: var(--primary-color);
    color: white;
}

.webinar-info {
    padding: 1.5rem;
}

.webinar-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.webinar-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.webinar-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.webinar-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.webinar-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: fit-content;
}

/* Watch Page Styles */
.watch-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.back-button {
    background: none;
    border: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-weight: 500;
}

.back-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.video-section {
    margin-bottom: 2rem;
}

.video-player {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: var(--bg-dark);
}

#main-video {
    width: 100%;
    height: auto;
    display: block;
    min-height: 400px;
}

.video-info {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: start;
}

.video-details h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.video-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    min-width: fit-content;
}

/* Speakers list styling */
#video-speakers {
    flex-basis: 100%;
    font-weight: 500;
    color: var(--primary-color);
}

.video-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1.05rem;
}

.video-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.action-btn.primary {
    background: var(--primary-color);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-dark);
}

.action-btn.secondary {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.action-btn.secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.related-webinars {
    margin-top: 4rem;
}

.related-webinars h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.related-card {
    display: flex;
    background: var(--bg-primary);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.related-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.related-thumbnail {
    width: 120px;
    height: 80px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.related-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.related-info {
    padding: 1rem;
    flex: 1;
}

.related-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.3;
}

.related-duration {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Loading Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .webinar-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .search-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .video-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .video-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .floating-card {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .video-meta {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title,
    .page-title {
        font-size: 2rem;
    }
    
    .webinar-card {
        margin: 0 0.5rem;
    }
    
    .related-card {
        flex-direction: column;
    }
    
    .related-thumbnail {
        width: 100%;
        height: 120px;
    }
}
