:root {
    /* Modern color palette inspired by animainteligencia.com */
    --bg-primary: #0a0a1f;
    --bg-secondary: #13132b;
    --bg-card: #1a1a3e;
    --text-primary: #ffffff;
    --text-secondary: #b8b8d4;
    --text-muted: #8888aa;

    /* Vibrant gradient colors */
    --gradient-start: #6366f1;
    --gradient-mid: #8b5cf6;
    --gradient-end: #d946ef;

    /* Accent colors */
    --accent-purple: #a855f7;
    --accent-blue: #3b82f6;
    --accent-pink: #ec4899;

    /* Functional colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    /* Border and shadow */
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

a {
    text-decoration: none;
    color: var(--accent-blue);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-purple);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header & Navigation */
header {
    background: rgba(26, 26, 62, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-purple);
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    background: linear-gradient(135deg, rgba(26, 26, 62, 0.95) 0%, rgba(19, 19, 43, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.dropdown-item.text-danger {
    color: var(--danger);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* Ensure buttons in nav keep their button styling */
.nav-links .btn,
.nav-links .btn-outline {
    padding: 0.5rem 1rem;
}

.nav-links .btn:hover {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white !important;
}

.nav-links .btn-outline:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    color: white !important;
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile login button - hidden by default, shows only on mobile */
.btn-mobile-login {
    display: none !important;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: var(--spacing-2xl) 0;
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Section Headers */
section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    position: relative;
    display: inline-block;
    padding-bottom: var(--spacing-sm);
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    border-radius: 2px;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.card {
    background: linear-gradient(135deg, rgba(26, 26, 62, 0.6) 0%, rgba(19, 19, 43, 0.6) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: var(--spacing-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
}

.card:hover::before {
    opacity: 1;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--text-primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    flex-grow: 1;
    line-height: 1.7;
}

.card strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Buttons - With guaranteed text visibility */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    color: white !important;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.95rem;
    position: relative;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white !important;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gradient-start);
    color: var(--gradient-start) !important;
    padding: 0.5rem 1.25rem;
}

.btn-outline:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    color: white !important;
    border-color: var(--gradient-mid);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary) !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary) !important;
}

/* Points System */
.points-display {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    backdrop-filter: blur(10px);
    padding: var(--spacing-xl);
    border-radius: 20px;
    text-align: center;
    border: 2px solid rgba(99, 102, 241, 0.3);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.points-display::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

.points-total {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: var(--spacing-md) 0;
    letter-spacing: -2px;
}

.points-history {
    margin-top: var(--spacing-xl);
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.history-item:last-child {
    border-bottom: none;
}

.points-badge {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    color: var(--success);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--gradient-start);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Footer */
footer {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-xl) 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    background: rgba(10, 10, 31, 0.5);
}

footer p {
    font-size: 0.9rem;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-muted {
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .logo {
        font-size: 1.5rem;
    }

    .points-total {
        font-size: 3rem;
    }

    /* Mobile Navigation */
    .burger-menu {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, rgba(26, 26, 62, 0.98) 0%, rgba(19, 19, 43, 0.98) 100%);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 0.5rem;
        transition: right 0.3s ease;
        border-left: 1px solid var(--border-color);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        padding: 1rem;
        border-radius: 8px;
        width: 100%;
        text-align: left;
    }

    .nav-links .dropdown {
        width: 100%;
    }

    .nav-links .dropdown-toggle {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-links .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 0.5rem;
        box-shadow: none;
        display: none !important;
    }

    .nav-links .dropdown:hover .dropdown-menu {
        display: none !important;
    }

    .nav-links .dropdown.active .dropdown-menu {
        display: block !important;
    }

    /* Hide desktop login, show mobile login */
    .nav-links .btn-login {
        display: none;
    }

    .btn-mobile-login {
        display: inline-block !important;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        margin-left: auto;
        margin-right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .card {
        padding: var(--spacing-md);
    }

    .nav-links {
        width: 100%;
        right: -100%;
    }

    .nav-links.active {
        right: 0;
    }
}

.course-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: block;
}