/* ============================================
     RESPONSIVO PARA CELULAR
     ============================================ */

@media (max-width: 600px) {
    .container {
        padding: 1rem 0.5rem;
        gap: 1.2rem;
        max-width: 100vw;
    }

    .header {
        padding: 0.3rem 0 0.3rem 0;
    }

    .logo {
        max-width: 70vw;
        margin-bottom: 1rem !important;
    }

    .content-wrapper {
        gap: 1.2rem;
        padding: 0;
    }

    .video-container {
        max-width: 98vw;
        border-radius: 10px;
    }

    .lessons-grid {
        max-width: 98vw;
        gap: 0.7rem;
    }

    .lesson-card {
        padding: 0.8rem 0.7rem;
        gap: 0.7rem;
        font-size: 0.95rem;
    }

    .lesson-number {
        min-width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .lesson-title {
        font-size: 1rem;
    }

    .lesson-desc {
        font-size: 0.75rem;
    }
}

/* CSS Variables */
:root {
    --color-bg: #0d172b;
    /* Beige background from logo */
    --color-primary: #0d172b;
    /* Dark Blue from logo */
    --color-accent: #fc4314;
    /* Orange from logo */
    --color-accent-hover: #e23b10;
    --color-light: #ffffff;
    --color-text: #c8cdd6;
    /* Slightly lighter than primary for better readability */

    --font-main: 'Outfit', sans-serif;

    --shadow-sm: 0 4px 6px rgba(13, 23, 43, 0.05);
    --shadow-md: 0 10px 30px rgba(13, 23, 43, 0.1);
    --shadow-lg: 0 20px 40px rgba(13, 23, 43, 0.15);

    --border-radius: 16px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   LOADING SCREEN
   ============================================ */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg);
    transition: opacity 0.6s ease, visibility 0.6s ease;
    padding: 1rem;
    box-sizing: border-box;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-screen-logo {
    max-width: 320px;
    width: 80%;
    height: auto;
    display: block;
    margin: 0 auto;
    animation: logoEntrance 1.2s ease-out forwards;
}

.loading-bar-track {
    width: 180px;
    height: 3px;
    background: rgba(13, 23, 43, 0.1);
    border-radius: 4px;
    margin-top: 2rem;
    overflow: hidden;
}

.loading-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
    border-radius: 4px;
    animation: loadingProgress 1.5s ease-in-out forwards;
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.7);
        filter: blur(8px);
    }

    60% {
        opacity: 1;
        transform: scale(1.03);
        filter: blur(0px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0px);
    }
}

@keyframes loadingProgress {
    0% {
        width: 0%;
    }

    30% {
        width: 40%;
    }

    60% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Background Decoration */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(252, 67, 20, 0.03), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(13, 23, 43, 0.04), transparent 30%);
}

/* Beams Canvas Background */
.beams-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    filter: blur(8px);
}

/* Layout Container */
.container {
    width: 100%;
    max-width: 1000px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

/* Header & Logo */
.header {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0.5rem 0 0.5rem 0;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    max-width: 360px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.02));
}

/* Content Wrapper */
.content-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Video Container */
.video-container {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    background-color: var(--color-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 10;
}

/* Loading State for Video */
.loading-state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    gap: 1rem;
    z-index: 5;
}

.loading-state p {
    color: var(--color-primary);
    font-weight: 500;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(13, 23, 43, 0.1);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Call to Action Wrapper */
.cta-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
    padding: 0 1rem;
    box-sizing: border-box;
}

.cta-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* ============================================
   LESSON CARDS (Hub Page)
   ============================================ */

.lessons-grid {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lesson-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    text-decoration: none;
    color: var(--color-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.lesson-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(252, 67, 20, 0.2);
    border-color: rgba(252, 67, 20, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

.lesson-number {
    min-width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 12px;
    flex-shrink: 0;
}

.lesson-info {
    flex: 1;
}

.lesson-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.lesson-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.lesson-arrow {
    color: var(--color-accent);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.lesson-card:hover .lesson-arrow {
    transform: translateX(4px);
}

/* ============================================
   GLOW GRADIENT BUTTON
   ============================================ */

.glow-btn-wrapper {
    position: relative;
    display: inline-flex;
}

/* Subtle outer glow light behind button */
.glow-btn-wrapper::before {
    content: '';
    position: absolute;
    inset: -6px -12px;
    border-radius: 60px;
    background: linear-gradient(135deg, rgba(252, 67, 20, 0.5), rgba(255, 120, 70, 0.3), rgba(13, 23, 43, 0.2));
    filter: blur(16px);
    opacity: 0.7;
    z-index: 0;
    animation: glowPulse 2.5s ease-in-out infinite alternate;
}

.glow-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1.2rem 2.8rem;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;

    /* Smooth uniform gradient */
    background: linear-gradient(135deg,
            #fc4314 0%,
            #e23b10 25%,
            #1a2744 50%,
            #0d172b 75%,
            #fc4314 100%);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;

    /* Text */
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);

    /* Shadow */
    box-shadow:
        0 4px 15px rgba(252, 67, 20, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Glass-like highlight on top */
.glow-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    border-radius: 50px 50px 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

.glow-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 25px rgba(252, 67, 20, 0.5),
        0 0 40px rgba(252, 67, 20, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.glow-btn:active {
    transform: translateY(1px) scale(0.98);
}

.btn-icon {
    transition: transform 0.3s ease;
}

.glow-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* ============================================
   KEYFRAMES
   ============================================ */

/* Smooth gradient position shift — gives the liquid feel */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Subtle glow pulse behind button */
@keyframes glowPulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    100% {
        opacity: 0.85;
        transform: scale(1.03);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Error State */
.error-state {
    padding: 2rem;
    background-color: rgba(252, 67, 20, 0.1);
    color: var(--color-primary);
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid rgba(252, 67, 20, 0.2);
    font-weight: 500;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
        gap: 2rem;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .logo {
        max-width: 220px;
    }

    .cta-text {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    .glow-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        white-space: normal;
    }

    .glow-btn-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .glow-btn {
        width: 100%;
    }

    .loading-screen-logo {
        max-width: 240px;
    }
}