@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

:root {
    --bg-color: #0a0e1a;
    --card-color: rgba(17, 24, 39, 0.75);
    --border-color: rgba(55, 65, 81, 0.4);
    --primary-color: #22d3ee;
    --secondary-color: #818cf8;
    --text-color: #e2e8f0;
    --text-muted-color: #94a3b8;
    --success-color: #34d399;
    --shadow-color: rgba(129, 140, 248, 0.25);
    --glow-color: rgba(34, 211, 238, 0.5);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
    background-image: radial-gradient(circle at 15% 50%, rgba(34, 211, 238, 0.1), transparent 30%),
                      radial-gradient(circle at 85% 30%, rgba(129, 140, 248, 0.1), transparent 30%);
}

/* --- Animations --- */
@keyframes shine {
    to { background-position: 200% center; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-25px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

.animate-fade-in-down { animation: fadeInDown 0.8s ease-out forwards; }
.animate-fade-in-up { animation: fadeInUp 0.8s ease-out 0.3s forwards; opacity: 0; }
.module-card.is-visible { animation: fadeInUp 0.6s ease-out forwards; }

/* --- Header --- */
.main-header {
    background: rgba(10, 14, 26, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
    z-index: 1000;
}

.main-header.header-hidden { transform: translateY(-100%); }

.logo {
    height: 55px;
    width: 55px;
    transition: transform 0.3s ease;
}
.logo:hover { transform: rotate(15deg); }

.brand-name {
    font-size: 1.85rem;
    font-weight: 800;
}

.shine-effect {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
}

.cta-button {
    background-image: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 9999px;
    padding: 0.8rem 1.8rem;
    font-weight: 700;
    color: #0f172a;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 15px 0 rgba(34, 211, 238, 0.3), 0 4px 15px 0 rgba(129, 140, 248, 0.2);
}

.cta-button:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(34, 211, 238, 0.5), 0 8px 25px 0 rgba(129, 140, 248, 0.3);
}

/* --- Course Intro --- */
.course-intro h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.15;
}

/* --- Module Cards --- */
#modules-section h2 {
    margin-bottom: 4rem;
}

.module-card {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 1.75rem;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
    position: relative;
    opacity: 0;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.module-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), var(--glow-color), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.module-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2), 0 0 40px var(--shadow-color);
}

.module-card:hover:before { opacity: 1; }

.module-card.locked {
    background: rgba(30, 41, 59, 0.5);
    cursor: not-allowed;
}

.module-card.locked .module-content {
    filter: blur(3px);
    opacity: 0.6;
}

.module-card.locked:hover {
    transform: none;
    border-color: var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.module-card.locked:hover:before { opacity: 0; }

.module-status-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 28px;
    height: 28px;
    color: var(--border-color);
    transition: all 0.3s ease;
}

.module-card:hover .module-status-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.module-card.locked .module-status-icon {
    color: var(--text-muted-color);
}

.module-number {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.module-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    min-height: 4.5rem;
}

.module-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: auto;
}

.btn {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn svg {
    width: 20px;
    height: 20px;
}

.btn-start {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}

.btn-start:hover {
    background-color: #67e8f9;
    border-color: #67e8f9;
    transform: scale(1.03);
    box-shadow: 0 0 20px var(--glow-color);
}

.btn-video {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-video:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--glow-color);
}

.btn-locked {
    background-color: var(--border-color);
    color: var(--text-muted-color);
    cursor: not-allowed;
}

/* --- Footer --- */
.main-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: transparent;
    border-top: 1px solid var(--border-color);
    padding: 4rem 1rem 2rem;
    text-align: center;
    margin-top: 6rem;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.footer-socials a {
    color: var(--text-muted-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-socials a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}
.footer-links a {
    color: var(--text-muted-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-links a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.copyright {
    color: var(--text-muted-color);
    font-size: 0.875rem;
}

/* --- Video Modal --- */
.video-modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(10, 14, 26, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.video-modal-backdrop:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.video-modal-content {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2.5rem;
    width: 90%;
    max-width: 550px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.video-modal-backdrop:not(.hidden) .video-modal-content {
    transform: scale(1) translateY(0);
}

.video-modal-content .modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

.video-modal-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
}

/* --- Utility Classes --- */
.container { margin: 0 auto; max-width: 1200px; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.text-center { text-align: center; }
.my-12 { margin-top: 3rem; margin-bottom: 3rem; }
.md\:my-24 { margin-top: 6rem; margin-bottom: 6rem; }
.text-white { color: #fff; }
.text-lg { font-size: 1.125rem; }
.text-slate-400 { color: var(--text-muted-color); }
.max-w-2xl { max-width: 42rem; }
.mt-4 { margin-top: 1rem; }
.text-3xl { font-size: 1.875rem; }
.md\:text-4xl { font-size: 2.25rem; }
.font-bold { font-weight: 700; }
.mb-12 { margin-bottom: 3rem; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mt-24 { margin-top: 6rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.text-2xl { font-size: 1.5rem; }
.w-full { width: 100%; }
.hidden { display: none; }

@media (max-width: 768px) {
    .main-header .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .brand-name {
        font-size: 1.5rem;
    }
    .cta-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    .course-intro h1 {
        font-size: 2.5rem;
    }
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    .md\:grid-cols-2 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}