/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

/* Header de navegación */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-medical {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: logoFloat 3s ease-in-out infinite;
}

.logo-medical i {
    font-size: 1.2rem;
    color: white;
    z-index: 2;
}

.logo-tech {
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: -5px;
    right: -5px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    animation: logoTechPulse 2s ease-in-out infinite;
}

.logo-tech i {
    font-size: 0.6rem;
    color: white;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.logo-med {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-note {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-2px) rotate(1deg);
    }
}

@keyframes logoTechPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 3px 12px rgba(251, 191, 36, 0.6);
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Información del usuario */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.user-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}

.btn-primary:hover {
    background: var(--bg-secondary);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3), var(--shadow-lg);
}

.btn-primary:hover::before {
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
}

.btn-gold {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #f8fafc;
    border: 2px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4), 0 2px 8px rgba(0, 0, 0, 0.1);
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.btn-gold::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #f1f5f9;
    border-color: rgba(245, 158, 11, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.5), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-gold:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-demo {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: 2px solid transparent;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-demo::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.btn-demo:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
}

.btn-demo:active {
    transform: translateY(-1px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Sección Hero */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    animation: heroBackgroundShift 20s ease-in-out infinite;
}

@keyframes heroBackgroundShift {
    0%, 100% {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    50% {
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    color: white;
    animation: heroContentFadeIn 1s ease-out;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    animation: heroContentFadeIn 1s ease-out 0.2s both;
}

.hero-badge i {
    color: #fbbf24;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    animation: heroContentFadeIn 1s ease-out 0.4s both;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    max-width: 500px;
    animation: heroContentFadeIn 1s ease-out 0.6s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: heroContentFadeIn 1s ease-out 0.8s both;
}


/* Visual del Hero */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-cards {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-student {
    position: absolute;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.student-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.4);
    animation: studentFloat 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.student-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: studentShine 4s linear infinite;
}

.student-avatar i {
    font-size: 1.8rem;
    color: white;
    z-index: 2;
    position: relative;
}

.student-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.3) 0%, transparent 70%);
    animation: studentGlow 2s ease-in-out infinite;
}

.power-aura {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.4) 0%, rgba(34, 197, 94, 0.2) 30%, rgba(99, 102, 241, 0.1) 60%, transparent 80%);
    border-radius: 50%;
    z-index: 0;
    opacity: 0;
}

.center-student:hover .student-avatar {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.6);
}

.center-student:hover .student-glow {
    transform: scale(1.2);
    opacity: 1;
}

@keyframes studentFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(1deg);
    }
    50% {
        transform: translateY(-8px) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

@keyframes studentShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes studentGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes powerAura {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes powerAuraCycle {
    0%, 70% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    80% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1.1);
    }
    90% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

@keyframes absorbCards {
    0% {
        transform: rotate(var(--rotation)) translateX(150px) rotate(calc(-1 * var(--rotation))) scale(1);
        opacity: 1;
    }
    70% {
        transform: rotate(var(--rotation)) translateX(75px) rotate(calc(-1 * var(--rotation))) scale(0.5);
        opacity: 0.7;
    }
    100% {
        transform: rotate(var(--rotation)) translateX(0px) rotate(calc(-1 * var(--rotation))) scale(0);
        opacity: 0;
    }
}

@keyframes studentPowerUp {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.3);
        filter: brightness(1.5) drop-shadow(0 0 20px rgba(34, 197, 94, 0.8));
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes centripetalCycle {
    0% {
        transform: rotate(var(--rotation)) translateX(160px) rotate(calc(-1 * var(--rotation))) scale(1);
        opacity: 1;
    }
    25% {
        transform: rotate(calc(var(--rotation) + 90deg)) translateX(160px) rotate(calc(-1 * var(--rotation) - 90deg)) scale(1);
        opacity: 1;
    }
    50% {
        transform: rotate(calc(var(--rotation) + 180deg)) translateX(160px) rotate(calc(-1 * var(--rotation) - 180deg)) scale(1);
        opacity: 1;
    }
    75% {
        transform: rotate(calc(var(--rotation) + 270deg)) translateX(160px) rotate(calc(-1 * var(--rotation) - 270deg)) scale(1);
        opacity: 1;
    }
    100% {
        transform: rotate(calc(var(--rotation) + 360deg)) translateX(160px) rotate(calc(-1 * var(--rotation) - 360deg)) scale(1);
        opacity: 1;
    }
}

@keyframes studentPowerCycle {
    0%, 70% {
        transform: scale(1);
        filter: brightness(1);
    }
    80% {
        transform: scale(1.2);
        filter: brightness(1.3) drop-shadow(0 0 15px rgba(34, 197, 94, 0.6));
    }
    90% {
        transform: scale(1.3);
        filter: brightness(1.5) drop-shadow(0 0 20px rgba(34, 197, 94, 0.8));
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

.card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    color: white;
    font-weight: 600;
    width: 130px;
    height: 110px;
    transition: all 0.3s ease;
    animation: cardGlow 4s ease-in-out infinite;
    z-index: 2;
    justify-content: center;
}

.card:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.card i {
    font-size: 1.8rem;
    color: #fbbf24;
}

.card span {
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.1;
    word-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    overflow-wrap: break-word;
}

.card-1 {
    --rotation: 0deg;
    animation: centripetalCycle 20s linear infinite;
    transform-origin: 200px 200px;
}

.card-2 {
    --rotation: 60deg;
    animation: centripetalCycle 20s linear infinite;
    transform-origin: 200px 200px;
}

.card-3 {
    --rotation: 120deg;
    animation: centripetalCycle 20s linear infinite;
    transform-origin: 200px 200px;
}

.card-4 {
    --rotation: 180deg;
    animation: centripetalCycle 20s linear infinite;
    transform-origin: 200px 200px;
}

.card-5 {
    --rotation: 240deg;
    animation: centripetalCycle 20s linear infinite;
    transform-origin: 200px 200px;
}

.card-6 {
    --rotation: 300deg;
    animation: centripetalCycle 20s linear infinite;
    transform-origin: 200px 200px;
}

@keyframes rotateCard1 {
    0% {
        transform: rotate(0deg) translateX(150px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(150px) rotate(-360deg);
    }
}

@keyframes rotateCard2 {
    0% {
        transform: rotate(120deg) translateX(150px) rotate(-120deg);
    }
    100% {
        transform: rotate(480deg) translateX(150px) rotate(-480deg);
    }
}

@keyframes rotateCard3 {
    0% {
        transform: rotate(240deg) translateX(150px) rotate(-240deg);
    }
    100% {
        transform: rotate(600deg) translateX(150px) rotate(-600deg);
    }
}

@keyframes rotateCard4 {
    0% {
        transform: rotate(270deg) translateX(150px) rotate(-270deg);
    }
    100% {
        transform: rotate(630deg) translateX(150px) rotate(-630deg);
    }
}

@keyframes rotateCard5 {
    0% {
        transform: rotate(300deg) translateX(150px) rotate(-300deg);
    }
    100% {
        transform: rotate(660deg) translateX(150px) rotate(-660deg);
    }
}

@keyframes rotateCard6 {
    0% {
        transform: rotate(330deg) translateX(150px) rotate(-330deg);
    }
    100% {
        transform: rotate(690deg) translateX(150px) rotate(-690deg);
    }
}

@keyframes cardGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    }
}

/* Sección de Características */
.features-section {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Sección de Testimonios */
.testimonials-section {
    padding: 6rem 0;
    background: var(--bg-primary);
    position: relative;
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.testimonial-card:hover::before {
    transform: scaleX(1);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.testimonial-content {
    margin-bottom: 2rem;
}

.quote-icon {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.testimonial-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-style: italic;
    position: relative;
}

.testimonial-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.author-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.author-info span {
    font-size: 0.9rem;
    color: var(--text-light);
}

.rating {
    display: flex;
    gap: 0.25rem;
}

.rating i {
    color: #fbbf24;
    font-size: 0.9rem;
}

/* Sección CTA */
.cta-section {
    padding: 6rem 0;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-content {
    color: white;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

.cta-note {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Sección de bienvenida (para usuarios no autenticados) */
.welcome-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    padding: 2rem;
}

.welcome-content {
    background: var(--bg-primary);
    padding: 4rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 100%;
}

.welcome-content i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.welcome-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.welcome-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Contenido principal (solo visible para usuarios autenticados) */
#mainContent {
    margin-top: 80px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Dashboard de estadísticas */
.dashboard-section {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.dashboard-container h2 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-container h2 i {
    color: var(--primary-color);
}

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

.stat-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 1.25rem;
    color: white;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}


/* Formularios */
.form-section {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-section h2 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section h2 i {
    color: var(--primary-color);
}

.note-form {
    display: grid;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: var(--bg-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 1rem;
}

/* Filtros */
.filters-section {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.filters-section h2 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filters-section h2 i {
    color: var(--primary-color);
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Lista de apuntes */
.notes-section {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.notes-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.notes-header h2 i {
    color: var(--primary-color);
}

.notes-actions {
    display: flex;
    gap: 1rem;
}

.notes-list {
    display: grid;
    gap: 1.5rem;
}

.note-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    border-left: 4px solid var(--border-color);
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--primary-color);
}

.note-card.priority-alta {
    border-left-color: var(--error-color);
}

.note-card.priority-media {
    border-left-color: var(--warning-color);
}

.note-card.priority-baja {
    border-left-color: var(--success-color);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.note-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.note-title i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.note-title h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.note-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    transform: scale(1.1);
}

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

.delete-btn:hover {
    color: var(--error-color);
}

.note-content {
    margin-bottom: 1.5rem;
}

.note-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
}

.note-tags {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.note-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.note-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
}

.note-meta i {
    font-size: 0.8rem;
}

/* Estados de carga y vacío */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.loading i {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    animation: spin 1s linear infinite;
}

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

.no-notes {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-notes i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-notes p {
    font-size: 1.1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.close {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal .note-form {
    padding: 2rem;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.notification.error {
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%);
}

.notification.info {
    background: linear-gradient(135deg, var(--accent-color) 0%, #0891b2 100%);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .floating-cards {
        width: 300px;
        height: 300px;
    }
    
    .card {
        width: 110px;
        height: 90px;
        padding: 1rem;
    }
    
    .card i {
        font-size: 1.5rem;
    }
    
    .card span {
        font-size: 0.75rem;
    }
    
    .card-4 {
        animation: centripetalCycle 20s linear infinite;
        transform-origin: 150px 150px;
    }
    
    .card-5 {
        animation: centripetalCycle 20s linear infinite;
        transform-origin: 150px 150px;
    }
    
    .card-6 {
        animation: centripetalCycle 20s linear infinite;
        transform-origin: 150px 150px;
    }
    
    .center-student {
        width: 60px;
        height: 60px;
    }
    
    .student-avatar {
        width: 45px;
        height: 45px;
    }
    
    .student-avatar i {
        font-size: 1.4rem;
    }
    
    .student-glow {
        width: 75px;
        height: 75px;
    }
    
    .power-aura {
        width: 150px;
        height: 150px;
        animation: powerAuraCycle 15s ease-in-out infinite;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .logo-medical i {
        font-size: 1rem;
    }
    
    .logo-tech {
        width: 18px;
        height: 18px;
        top: -4px;
        right: -4px;
    }
    
    .logo-tech i {
        font-size: 0.5rem;
    }
    
    .logo-text {
        font-size: 1.6rem;
    }
    
    .logo-med,
    .logo-note {
        font-size: inherit;
    }
    
    .hero-container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    
    .features-container {
        padding: 0 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-container {
        padding: 0 1rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
    
    .testimonial-card {
        padding: 2rem;
    }
    
    .testimonial-author {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .floating-cards {
        width: 250px;
        height: 250px;
    }
    
    .card {
        width: 90px;
        height: 80px;
        padding: 0.75rem;
    }
    
    .card i {
        font-size: 1.2rem;
    }
    
    .card span {
        font-size: 0.7rem;
    }
    
    .card-4 {
        animation: centripetalCycle 20s linear infinite;
        transform-origin: 125px 125px;
    }
    
    .card-5 {
        animation: centripetalCycle 20s linear infinite;
        transform-origin: 125px 125px;
    }
    
    .card-6 {
        animation: centripetalCycle 20s linear infinite;
        transform-origin: 125px 125px;
    }
    
    .center-student {
        width: 50px;
        height: 50px;
    }
    
    .student-avatar {
        width: 35px;
        height: 35px;
    }
    
    .student-avatar i {
        font-size: 1.1rem;
    }
    
    .student-glow {
        width: 60px;
        height: 60px;
    }
    
    .power-aura {
        width: 120px;
        height: 120px;
        animation: powerAuraCycle 15s ease-in-out infinite;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .notes-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .notes-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
    
    .note-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .note-actions {
        align-self: flex-end;
    }
    
    .note-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header,
    .modal .note-form {
        padding: 1.5rem;
    }
}

/* ===== Estilos mejorados para preguntas ===== */
.question-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}
.question-header { display:flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.question-text { color: var(--text-primary); margin-bottom: 0.5rem; font-weight: 600; }
.question-options { display:flex; flex-direction: column; gap: 0.5rem; }
.question-option {
    padding: 0.6rem 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}
.question-option:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.question-option.selected { outline: 2px solid var(--primary-color); background: #eef2ff; color: var(--text-primary); }
.question-option.correct { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.4); color: #065f46; }
.question-option.wrong { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.35); color: #991b1b; }
.question-explanation { background: var(--bg-secondary); border-left: 3px solid var(--primary-color); padding: 0.75rem; border-radius: 6px; margin-top: 0.5rem; color: var(--text-secondary); }

/* Resaltado en el editor de texto */
.editor-highlight-container {
    background: var(--bg-secondary);
    border: 1px solid var(--success-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    border-left: 4px solid var(--success-color);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.editor-highlight {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--success-color);
    border-radius: 4px;
    padding: 2px 4px;
    margin: 0 1px;
    font-weight: 500;
    color: #065f46;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
}

.editor-highlight:hover {
    background: rgba(16, 185, 129, 0.3);
    transform: scale(1.02);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

/* Estilos para el editor de referencias */
.sentence-item {
    transition: all 0.2s ease;
    border-radius: 4px;
}

/* Resaltados independientes de referencias */
.ref-hl-q {
    background: rgba(16, 185, 129, 0.18) !important;
    border-left: 4px solid var(--success-color) !important;
    transform: scale(1.02);
}

.ref-hl-fc {
    background: rgba(59, 130, 246, 0.16) !important; /* azul tenue */
    border-left: 4px solid #3b82f6 !important;
    transform: scale(1.02);
}

.sentence-item:hover {
    background: var(--bg-tertiary);
}

.sentence-item input[type="checkbox"] {
    margin-top: 0.25rem;
    transform: scale(1.2);
}

.sentence-item label {
    font-size: 0.9rem;
    line-height: 1.4;
}

.sentence-item label strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Estilos para móviles */
@media (max-width: 768px) {
    /* Editor de documentos en móviles */
    .document-editor-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        background: var(--bg-primary);
        overflow-y: auto;
        padding: 1rem;
    }
    
    .document-editor-panel .form-section {
        margin-bottom: 1.5rem;
    }
    
    .document-editor-panel .form-group {
        margin-bottom: 1rem;
    }
    
    .document-editor-panel textarea {
        min-height: 120px;
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    /* Banco de preguntas en móviles */
    .question-item {
        margin-bottom: 1.5rem;
        padding: 1rem;
        border-radius: 12px;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .question-number {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--primary-color);
    }
    
    .question-text {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    .question-options {
        gap: 0.75rem;
    }
    
    .question-option {
        padding: 1rem;
        font-size: 0.95rem;
        border-radius: 12px;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .question-explanation {
        margin-top: 1rem;
        padding: 1rem;
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Controles de navegación en móviles */
    .inline-practice-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .inline-practice-controls > div {
        display: flex;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .inline-practice-controls button {
        flex: 1;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Resaltado del editor en móviles */
    .editor-highlight-container {
        margin-top: 1rem;
        padding: 1rem;
        font-size: 0.9rem;
        line-height: 1.5;
        max-height: 150px;
    }
    
    .editor-highlight {
        padding: 3px 6px;
        margin: 1px;
        font-size: 0.9rem;
    }
    
    /* Botones de acción en móviles */
    .outline-item-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .outline-item-actions .btn-icon {
        padding: 0.5rem;
        width: 36px;
        height: 36px;
    }
    
    /* Modal de práctica en móviles */
    .large-modal .modal-content {
        height: 95vh;
        max-height: 95vh;
        display: flex;
        flex-direction: column;
    }
    
    .large-modal .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
    }
    
    .practice-controls {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        border-top: 1px solid var(--border-color);
    }
    
    .practice-controls > div {
        display: flex;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .practice-controls button {
        flex: 1;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Modal de generación en móviles */
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Evita zoom en iOS */
        padding: 0.75rem;
    }
    
    /* Segmentación en móviles */
    .entry-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .entry-content h5 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .entry-content div {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Outline en móviles */
    .outline-tree {
        padding: 0.5rem;
    }
    
    .outline-item {
        margin-bottom: 0.5rem;
        border-radius: 8px;
    }
    
    .outline-item-header {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .outline-item-title {
        font-size: 0.95rem;
        flex: 1;
    }
    
    .outline-item-icon {
        font-size: 1rem;
    }
    
    /* Navegación principal en móviles */
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-logo .logo-text {
        font-size: 1.2rem;
    }
    
    /* Mejorar el espaciado general */
    .main-container {
        padding: 0 1rem;
    }
    
    .outline-container {
        padding: 0 0.5rem;
    }
    
    /* Botones flotantes en móviles */
    .floating-add-btn {
        bottom: 1rem;
        right: 1rem;
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
}

/* Estilos para móviles muy pequeños */
@media (max-width: 480px) {
    .logo-icon {
        width: 30px;
        height: 30px;
    }
    
    .logo-medical i {
        font-size: 0.9rem;
    }
    
    .logo-tech {
        width: 16px;
        height: 16px;
        top: -3px;
        right: -3px;
    }
    
    .logo-tech i {
        font-size: 0.45rem;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
    
    .logo-med,
    .logo-note {
        font-size: inherit;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    .note-title h3 {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-large {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Editor de documentos en móviles pequeños */
    .document-editor-panel {
        padding: 0.75rem;
    }
    
    .document-editor-panel .form-section {
        margin-bottom: 1rem;
    }
    
    .document-editor-panel textarea {
        min-height: 100px;
        font-size: 16px;
    }
    
    .question-item {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .question-text {
        font-size: 0.95rem;
    }
    
    .question-option {
        padding: 0.75rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .question-explanation {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .inline-practice-controls button {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .editor-highlight-container {
        padding: 0.75rem;
        font-size: 0.85rem;
        max-height: 120px;
    }
    
    .editor-highlight {
        padding: 2px 4px;
        font-size: 0.85rem;
    }
    
    .outline-item-actions .btn-icon {
        width: 32px;
        height: 32px;
        padding: 0.4rem;
    }
    
    .modal-content {
        margin: 1% auto;
        width: 98%;
        max-height: 95vh;
    }
    
    .large-modal .modal-content {
        height: 98vh;
        max-height: 98vh;
    }
    
    .practice-controls button {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
        padding: 0.5rem;
    }
    
    .entry-item {
        padding: 0.5rem;
    }
    
    .entry-content h5 {
        font-size: 0.85rem;
    }
    
    .entry-content div {
        font-size: 0.85rem;
    }
    
    /* Mejorar la visibilidad de los botones en móviles */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Mejorar el espaciado en el outline */
    .outline-item {
        padding: 0.75rem;
    }
    
    .outline-item-header {
        gap: 0.5rem;
    }
    
    .outline-item-title {
        font-size: 0.9rem;
    }
    
    /* Mejorar los headers de secciones */
    .notes-header h2 {
        font-size: 1.1rem;
    }
    
    .notes-header .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Mejorar la experiencia táctil */
    .btn, .btn-icon, .question-option {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Mejorar el scroll en móviles */
    .document-editor-panel,
    .modal-body,
    .outline-tree {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Ajustar el header principal para móviles */
    .main-header-section {
        padding: 1rem 0;
        margin-top: 60px;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    /* Mejorar la visibilidad de los elementos interactivos */
    .outline-item-header {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .question-option {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    
    /* Mejorar el contraste en móviles */
    .question-option.correct {
        background: rgba(16, 185, 129, 0.2);
        border-color: var(--success-color);
        color: #065f46;
        font-weight: 600;
    }
    
    .question-option.wrong {
        background: rgba(239, 68, 68, 0.2);
        border-color: var(--error-color);
        color: #991b1b;
        font-weight: 600;
    }
    
    .question-option.selected {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        font-weight: 600;
    }
}

/* Animaciones adicionales */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.note-card {
    animation: fadeIn 0.5s ease;
}

.feature-card {
    animation: fadeIn 0.6s ease;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Utilidades */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Bloque de cuadernos eliminado por limpieza */

/* ===== ESTILOS PARA MAPA MENTAL INTERACTIVO ===== */

/* Bloque de mapa mental eliminado por limpieza */

/* ===== ESTILOS PARA SISTEMA MÓVIL DE JERARQUÍA ===== */

/* Header principal */
.main-header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 0;
    margin-top: 80px;
}

.main-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-content h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-content p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Sistema de acordeón jerárquico */
.accordion-hierarchy-system {
    padding: 1rem 0;
    background: var(--bg-primary);
    min-height: calc(100vh - 200px);
}

/* Breadcrumb de navegación */
.breadcrumb-container {
    margin-bottom: 1rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.breadcrumb-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.breadcrumb-item.active {
    background: var(--primary-color);
    color: white;
}

.breadcrumb-item i {
    font-size: 0.8rem;
}

/* Contenedor de acordeón */
.accordion-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Sección de acordeón */
.accordion-section {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-section:hover {
    box-shadow: var(--shadow-md);
}

/* Header del acordeón */
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.accordion-header:hover {
    background: var(--primary-color);
    color: white;
}

.accordion-header:hover .accordion-title i {
    color: white;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.accordion-title i {
    font-size: 1.1rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.accordion-title span:first-of-type {
    font-weight: 600;
    font-size: 1rem;
}

.count {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

.accordion-header:hover .count {
    background: white;
    color: var(--primary-color);
}

.accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
}

.accordion-header:hover .accordion-toggle {
    background: white;
    color: var(--primary-color);
    transform: scale(1.1);
}

.accordion-toggle i {
    transition: transform 0.3s ease;
}

.accordion-section.expanded .accordion-toggle i {
    transform: rotate(180deg);
}

/* Contenido del acordeón */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-section.expanded .accordion-content {
    max-height: 1000px;
}

.accordion-list {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Lista de jerarquía */
.hierarchy-list {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Items de jerarquía */
.hierarchy-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

.hierarchy-item:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    transform: translateX(4px);
}

.hierarchy-item.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.hierarchy-item.selected .item-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.item-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.item-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.item-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.item-count {
    font-size: 0.8rem;
    opacity: 0.7;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.hierarchy-item:hover .item-actions {
    opacity: 1;
}

.item-actions .btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: var(--success-color);
    color: white;
}

.btn-delete {
    background: var(--error-color);
    color: white;
}

.btn-add {
    background: var(--primary-color);
    color: white;
}

/* Botón flotante para agregar */
.floating-add-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

.floating-add-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.large-modal .modal-content {
    max-width: 90%;
    max-height: 95vh;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

/* Editor de texto */
.topic-editor-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.topic-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.topic-path {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.topic-actions {
    display: flex;
    gap: 0.75rem;
}

.editor-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

#topicEditor {
    min-height: 300px;
}

/* Sección de entradas */
.entries-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.entries-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.entries-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.entry-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.entry-content h5 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.entry-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.entry-actions {
    display: flex;
    gap: 0.5rem;
}

/* Formularios */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-actions .btn {
    flex: 1;
    justify-content: center;
}

/* Estado vacío */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: var(--primary-color);
}

.empty-state p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.empty-state .btn {
    margin-top: 1rem;
}

/* Modal grande */
.large-modal .modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: 1000px;
}

/* Header del banco de preguntas */
.question-bank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.question-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
}

.question-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.question-actions {
    display: flex;
    gap: 0.5rem;
}

/* Estado de carga */
.loading-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Botones mejorados */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-success {
    background: var(--success-color);
    color: white;
    border: none;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-info {
    background: #0ea5e9;
    color: white;
    border: none;
}

.btn-info:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

/* Insignia para preguntas importadas */
.badge-imported {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header-section {
        padding: 1rem 0;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .accordion-hierarchy-system {
        padding: 0.75rem 0;
    }
    
    .accordion-header {
        padding: 0.75rem 1rem;
    }
    
    .accordion-title {
        gap: 0.5rem;
    }
    
    .accordion-title span:first-of-type {
        font-size: 0.9rem;
    }
    
    .accordion-toggle {
        width: 28px;
        height: 28px;
    }
    
    .accordion-list {
        padding: 0.75rem;
    }
    
    .hierarchy-item {
        padding: 0.5rem;
    }
    
    .breadcrumb {
        padding: 0.5rem;
    }
    
    .breadcrumb-item {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .hierarchy-item {
        padding: 0.75rem;
    }
    
    .item-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
    }
    
    .large-modal .modal-content {
        width: 98%;
        margin: 1% auto;
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    
    .topic-info {
        flex-direction: column;
        align-items: stretch;
    }
    
    .topic-actions {
        justify-content: center;
    }
    
    .floating-add-btn {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Estilos para Outline Inteligente */
.outline-section {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
    background: var(--bg-secondary);
}

.outline-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.outline-tree {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-top: 2rem;
}

.outline-controls {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.global-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.global-controls .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.global-controls .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.global-controls .btn:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s ease;
}

.global-controls .btn.pulsing {
    animation: pulseButton 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pulseButton {
    0% {
        transform: scale(1);
        box-shadow: var(--shadow-sm);
    }
    50% {
        transform: scale(1.05);
        box-shadow: var(--shadow-lg);
    }
    100% {
        transform: scale(1);
        box-shadow: var(--shadow-sm);
    }
}

.outline-level-0 {
    list-style: none;
    padding: 0;
    margin: 0;
}

.outline-level-1,
.outline-level-2,
.outline-level-3,
.outline-level-4 {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-left: 2rem;
    border-left: 2px solid var(--border-color);
    padding-left: 1rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
}

.outline-level-1.collapsing,
.outline-level-2.collapsing,
.outline-level-3.collapsing,
.outline-level-4.collapsing {
    animation: collapseAnimation 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.outline-level-1.expanding,
.outline-level-2.expanding,
.outline-level-3.expanding,
.outline-level-4.expanding {
    animation: expandAnimation 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.outline-item {
    margin-bottom: 0.5rem;
    position: relative;
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.outline-item:nth-child(1) { animation-delay: 0.1s; }
.outline-item:nth-child(2) { animation-delay: 0.15s; }
.outline-item:nth-child(3) { animation-delay: 0.2s; }
.outline-item:nth-child(4) { animation-delay: 0.25s; }
.outline-item:nth-child(5) { animation-delay: 0.3s; }
.outline-item:nth-child(n+6) { animation-delay: 0.35s; }

.outline-item:last-child {
    margin-bottom: 0;
}

.outline-item-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.outline-item-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.outline-item-content:hover::before {
    left: 100%;
}

.outline-item-content:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px) scale(1.02);
}

.outline-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.expand-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    transform-origin: center;
}

.expand-spacer {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.outline-item-header:hover .expand-icon {
    color: var(--primary-color);
    transform: scale(1.2);
}

.expand-icon.rotating {
    animation: rotateIcon 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Animaciones keyframes */
@keyframes expandAnimation {
    0% {
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px) scaleY(0.8);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-5px) scaleY(0.9);
    }
    100% {
        max-height: 1000px;
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

@keyframes collapseAnimation {
    0% {
        max-height: 1000px;
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-5px) scaleY(0.9);
    }
    100% {
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px) scaleY(0.8);
    }
}

@keyframes rotateIcon {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(90deg);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.outline-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 8px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.outline-item-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    flex: 1;
}

.outline-item-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.outline-item-content:hover .outline-item-actions {
    opacity: 1;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.btn-icon.btn-danger:hover {
    background: var(--error-color);
}

/* Estilos específicos por nivel */
.outline-level-0 .outline-item-icon {
    background: var(--gradient-primary);
    font-size: 1.2rem;
}

.outline-level-1 .outline-item-icon {
    background: var(--gradient-secondary);
    font-size: 1.1rem;
}

.outline-level-2 .outline-item-icon {
    background: var(--gradient-accent);
    font-size: 1rem;
}

.outline-level-3 .outline-item-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    font-size: 0.9rem;
}

.outline-level-4 .outline-item-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    font-size: 0.8rem;
}

/* Responsive para outline */
@media (max-width: 768px) {
    .outline-tree {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    .outline-controls {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .global-controls {
        gap: 0.5rem;
    }
    
    .global-controls .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .global-controls .btn i {
        font-size: 0.8rem;
    }
    
    .outline-level-1,
    .outline-level-2,
    .outline-level-3,
    .outline-level-4 {
        margin-left: 1rem;
        padding-left: 0.5rem;
    }
    
    .outline-item-content {
        padding: 0.75rem;
    }
    
    .outline-item-header {
        gap: 0.5rem;
    }
    
    .expand-icon {
        width: 14px;
        height: 14px;
        font-size: 0.8rem;
    }
    
    .expand-spacer {
        width: 14px;
        height: 14px;
    }
    
    .outline-item-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .outline-item-title {
        font-size: 1rem;
    }
    
    .outline-item-actions {
        opacity: 1; /* Siempre visible en móvil */
    }
    
    .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}
