/* ============================
   MÁS VOZ — Platform Styles
   Auth, Dashboard, Course Player, Admin
   ============================ */

/* ---- Shared Platform Layout ---- */
.platform-page {
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
}

.platform-header {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(245, 184, 0, 0.15);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.platform-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.platform-header .logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text);
    text-decoration: none;
}

.platform-header .logo span {
    color: var(--color-gold);
}

.platform-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.platform-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.platform-nav a:hover {
    color: var(--color-gold);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    border: 1px solid var(--color-border);
    transition: all 0.3s;
}

.user-menu:hover {
    border-color: var(--color-gold);
    background: var(--color-gold-dim);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-gold), #b8860b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #000;
}

.user-name {
    font-size: 0.85rem;
    color: var(--color-text);
}

.btn-logout {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-logout:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

/* ========== AUTH PAGE ========== */
.auth-container {
    display: flex;
    min-height: 100vh;
}

.auth-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--color-bg);
}

.auth-right {
    flex: 1;
    background: linear-gradient(135deg, rgba(245, 184, 0, 0.08), var(--color-bg-elevated));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-right::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(245, 184, 0, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.auth-right-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 400px;
}

.auth-right-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.auth-right-content .gold {
    color: var(--color-gold);
}

.auth-right-content p {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.auth-features {
    text-align: left;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.auth-feature i {
    color: var(--color-gold);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo a {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-text);
    text-decoration: none;
}

.auth-logo a span {
    color: var(--color-gold);
}

.auth-logo p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.auth-form {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 0.7rem;
    border: none;
    background: none;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
    font-family: var(--font-body);
}

.auth-tab.active {
    background: var(--color-gold);
    color: #000;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px var(--color-gold-dim);
}

.form-group input::placeholder {
    color: var(--color-text-muted);
}

.btn-auth {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--color-gold), #b8860b);
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--color-gold-glow);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.btn-google {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}

.auth-error.show {
    display: block;
}

.auth-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}

.auth-success.show {
    display: block;
}

/* ========== DASHBOARD ========== */
.dashboard-content {
    padding: 2rem 0;
}

.dashboard-welcome {
    margin-bottom: 2rem;
}

.dashboard-welcome h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.dashboard-welcome p {
    color: var(--color-text-muted);
}

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

.dash-stat {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dash-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--color-gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-stat-icon i {
    color: var(--color-gold);
    width: 24px;
    height: 24px;
}

.dash-stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.dash-stat-info p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Course Cards */
.my-courses {
    margin-top: 2rem;
}

.my-courses h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.course-card-dash {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s;
    margin-bottom: 1rem;
}

.course-card-dash:hover {
    border-color: var(--color-gold-glow);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.course-thumb {
    width: 120px;
    height: 80px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-gold-dim), var(--color-bg-elevated));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.course-thumb i {
    color: var(--color-gold);
    width: 32px;
    height: 32px;
}

.course-info-dash {
    flex: 1;
}

.course-info-dash h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.course-info-dash .course-meta {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50px;
    height: 8px;
    width: 100%;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
    border-radius: 50px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.course-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-continue {
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, var(--color-gold), #b8860b);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    font-family: var(--font-body);
}

.btn-continue:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--color-gold-glow);
}

.btn-certificate {
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid var(--color-gold-glow);
    color: var(--color-gold);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    font-family: var(--font-body);
}

.btn-certificate:hover {
    background: var(--color-gold-dim);
}

/* No courses state */
.no-courses {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 3rem;
    text-align: center;
}

.no-courses i {
    color: var(--color-gold);
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.no-courses h3 {
    margin-bottom: 0.5rem;
}

.no-courses p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* ========== COURSE PLAYER ========== */
.course-player-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: calc(100vh - 60px);
}

.course-sidebar {
    background: var(--color-bg-elevated);
    border-right: 1px solid var(--color-border);
    overflow-y: auto;
    padding: 1.5rem 0;
}

.course-sidebar-header {
    padding: 0 1.25rem 1rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1rem;
}

.course-sidebar-header h2 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.course-sidebar-header p {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.sidebar-module {
    margin-bottom: 0.5rem;
}

.sidebar-module-header {
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.3s;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.sidebar-module-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-module-header .module-progress {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.sidebar-lessons {
    display: none;
}

.sidebar-lessons.open {
    display: block;
}

.sidebar-lesson {
    padding: 0.6rem 1.25rem 0.6rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    position: relative;
}

.sidebar-lesson:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text);
}

.sidebar-lesson.active {
    background: var(--color-gold-dim);
    color: var(--color-gold);
    border-right: 3px solid var(--color-gold);
}

.sidebar-lesson.completed {
    color: var(--color-text-muted);
}

.lesson-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-lesson.completed .lesson-check {
    background: var(--color-gold);
    border-color: var(--color-gold);
}

.sidebar-lesson.completed .lesson-check i {
    width: 12px;
    height: 12px;
    color: #000;
}

.sidebar-lesson.active .lesson-check {
    border-color: var(--color-gold);
}

/* Video area */
.course-main {
    padding: 2rem;
    overflow-y: auto;
}

.video-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder {
    color: var(--color-text-muted);
    text-align: center;
}

.video-placeholder i {
    width: 64px;
    height: 64px;
    color: var(--color-gold);
    margin-bottom: 1rem;
}

.lesson-info h1 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.lesson-info .lesson-meta {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.lesson-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-complete-lesson {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--color-gold), #b8860b);
    color: #000;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-family: var(--font-body);
}

.btn-complete-lesson:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--color-gold-glow);
}

.btn-next-lesson {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-family: var(--font-body);
}

.btn-next-lesson:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ========== CUSTOM VIDEO PLAYER ========== */
.video-container {
    position: relative;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
}

.video-controls-custom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-container:hover .video-controls-custom {
    opacity: 1;
}

.vc-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.3rem;
    display: flex;
    align-items: center;
}

.vc-btn i {
    width: 20px;
    height: 20px;
}

.vc-progress {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s;
}

.vc-progress:hover {
    height: 8px;
}

.vc-progress-fill {
    height: 100%;
    background: var(--color-gold);
    border-radius: 50px;
    width: 0%;
    transition: width 0.1s linear;
}

.vc-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Fullscreen video styles */
.video-container:fullscreen {
    background: #000;
}

.video-container:fullscreen video {
    height: 100vh;
}

.video-container:fullscreen .video-controls-custom {
    padding: 1.5rem 2rem;
}

/* ========== LOADING SPINNER ========== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.loading-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-right {
        display: none;
    }

    .auth-left {
        padding: 1.5rem;
    }

    .auth-form {
        padding: 1.5rem;
    }

    .course-player-layout {
        grid-template-columns: 1fr;
    }

    .course-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        max-height: 300px;
    }

    .course-main {
        padding: 1rem;
    }

    .course-card-dash {
        flex-direction: column;
        text-align: center;
    }

    .course-actions {
        width: 100%;
    }

    .btn-continue,
    .btn-certificate {
        width: 100%;
    }

    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }

    .lesson-controls {
        flex-direction: column;
    }

    .btn-complete-lesson,
    .btn-next-lesson {
        width: 100%;
        justify-content: center;
    }
}