/* VS Code Dark Theme & Base Styles */
:root {
    /* Colors */
    --bg-primary: #1e1e1e;
    --bg-secondary: #252526;
    --bg-hover: #2a2d2e;
    --bg-input: #3c3c3c;
    --text-primary: #d4d4d4;
    --text-secondary: #cccccc;
    --text-muted: #858585;
    --accent-color: #f2c94c;
    /* Yellow */
    --accent-hover: #e0b844;
    --border-color: #3e3e3e;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --info-color: #007acc;
    /* VS Code Blue for info/links */

    /* Glassmorphism */
    --glass-bg: rgba(20, 20, 22, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);

    /* Spacing */
    --sp-xs: 4px;
    --sp-sm: 8px;
    --sp-md: 16px;
    --sp-lg: 24px;
    --sp-xl: 32px;

    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Consolas', 'Monaco', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: var(--info-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-color);
}

/* Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--sp-md);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-sm {
    gap: var(--sp-sm);
}

.gap-md {
    gap: var(--sp-md);
}

.grid {
    display: grid;
}

.text-accent {
    color: var(--accent-color);
}

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

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.font-bold {
    font-weight: 700;
}

.font-mono {
    font-family: var(--font-mono);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-sm) var(--sp-md);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #1e1e1e;
    /* Dark text for contrast on yellow */
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

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

.btn-secondary:hover {
    background-color: var(--bg-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background-color: rgba(242, 201, 76, 0.1);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    background-color: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 6px;
    min-height: 32px;
    min-width: 32px;
    gap: 6px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Compatibilidad para botones y elementos con utilidades de color */
.text-danger-color {
    color: #ef4444 !important;
}

.text-success-color {
    color: #22c55e !important;
}

.text-info-color {
    color: #38bdf8 !important;
}

.btn.text-danger-color,
.btn-secondary.text-danger-color {
    color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.35);
}

.btn.text-danger-color:hover,
.btn-secondary.text-danger-color:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* Layout Structure */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 100;
}

.sidebar-header {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 var(--sp-md);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.nav-links {
    flex: 1;
    padding: var(--sp-md) 0;
    list-style: none;
    overflow-y: auto;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-sm) var(--sp-md);
    color: var(--text-secondary);
    border-left: 3px solid transparent;
}

.nav-item a:hover,
.nav-item a.active {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item a.active {
    border-left-color: var(--accent-color);
}

.sidebar-footer {
    padding: var(--sp-md);
    border-top: 1px solid var(--border-color);
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.top-bar {
    height: 60px;
    background-color: var(--bg-primary);
    /* Blend with body or use secondary */
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sp-md);
}

.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-lg);
}

/* Cards */
.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: var(--sp-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: var(--text-muted);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-md);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Forms */
.form-group {
    margin-bottom: var(--sp-md);
}

.form-label {
    display: block;
    margin-bottom: var(--sp-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 4px;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Login/Modal Specific */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: radial-gradient(circle at center, #2d2d30 0%, #1e1e1e 100%);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--bg-secondary);
    padding: var(--sp-xl);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--sp-lg);
}

.course-thumbnail {
    width: 100%;
    height: 160px;
    background-color: #000;
    border-radius: 4px;
    margin-bottom: var(--sp-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Progress Bar */
.progress-bar {
    height: 6px;
    background-color: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
    margin-top: var(--sp-sm);
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-color);
    width: 0%;
    transition: width 0.5s ease;
}

/* Live Badge */
.live-badge {
    background-color: var(--danger-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        height: 100%;
    }

    .sidebar.active {
        transform: translateX(250px);
        left: -250px;
        /* Reset needed if using transform? Actually keep left as is and transform to 0 or use class to change left. Let's rely on transform. */
        /* Better: just use transform. */
        left: 0;
        /* Wait, if I use transform translateX, I should start at -100%. Let's simplify. */
        transform: none;
        /* Just simple toggle class for now */
    }

    /* Let's fix the transform approach */
    .sidebar {
        transform: translateX(-100%);
        left: 0;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: block;
    }
}

/* Tailwind-like Utilities for Spacing and Typography */
.max-w-2xl {
    max-width: 42rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

.mb-20 {
    margin-bottom: 5rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-12 {
    margin-top: 3rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.text-white {
    color: #ffffff !important;
}

.text-black {
    color: #000000 !important;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.font-bold {
    font-weight: 700;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.object-cover {
    object-fit: cover;
}

.rounded-full {
    border-radius: 9999px;
}

.overflow-hidden {
    overflow: hidden;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.top-0 {
    top: 0;
}

.left-0 {
    left: 0;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.gap-6 {
    gap: 1.5rem;
}

/* Global Premium Pricing Cards (memberships/index) */
.pricing-header {
    text-align: center;
    padding: 120px 20px 80px;
    background: transparent;
    position: relative;
}

.pricing-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, rgba(242, 201, 76, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.pricing-title {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(to right, #fff, #e2e2e2, #f2c94c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.pricing-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Cards Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 100px;
    position: relative;
    z-index: 10;
}

/* Glassmorphism Cards */
.pricing-card {
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.8) 0%, rgba(15, 15, 18, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 48px 40px;
    position: relative;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.pricing-card:hover {
    transform: translateY(-15px);
    border-color: rgba(242, 201, 76, 0.3);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(242, 201, 76, 0.05);
}

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

/* VIP/Popular Card */
.pricing-card.popular {
    background: linear-gradient(145deg, rgba(40, 35, 20, 0.9) 0%, rgba(20, 18, 15, 0.95) 100%);
    border: 1px solid rgba(242, 201, 76, 0.4);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(242, 201, 76, 0.1);
    transform: scale(1.05);
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 50px rgba(242, 201, 76, 0.15);
}

.popular-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(90deg, #f2c94c, #f2994a);
    color: #000;
    padding: 8px 24px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 10px 20px rgba(242, 201, 76, 0.3);
}

.plan-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.plan-desc {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 32px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.plan-price {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-price .amount-wrapper {
    display: flex;
    align-items: baseline;
}

.price-currency {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-right: 4px;
}

.price-amount {
    font-size: 4rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    letter-spacing: -2px;
}

.price-period {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    margin-left: 8px;
}

.plan-features {
    list-style: none;
    margin-bottom: 48px;
    flex: 1;
    padding: 0;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.4;
}

.feature-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    flex-shrink: 0;
}

.plan-features i {
    font-size: 0.8rem;
}

/* Elegant Buttons */
.btn-plan {
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.1rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.btn-plan-primary {
    background: linear-gradient(90deg, #f2c94c, #f2994a);
    color: #000 !important;
    box-shadow: 0 10px 20px rgba(242, 201, 76, 0.2);
}

.btn-plan-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(242, 201, 76, 0.4);
    color: #000 !important;
}

.btn-plan-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white !important;
}

.btn-plan-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    color: white !important;
}

@media (max-width: 900px) {
    .pricing-card.popular {
        transform: scale(1);
    }

    .pricing-card.popular:hover {
        transform: translateY(-5px);
    }

    .pricing-grid {
        margin-top: 0;
        padding-top: 40px;
    }

    .pricing-title {
        font-size: 3rem;
    }
}