/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Header y navegación */
header {
    background:linear-gradient(135deg, #7b3285 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.search-bar {
    display: flex;
    gap: 0.5rem;
    border-radius: 25px;
    border: 2px solid #764ba2;
    padding: 5px 5px 5px 10px;
    background-color: white;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.6rem 0.5rem;
    font-size: 0.95rem;
    background-color: transparent;
    color: #333;
}

.deslizablegrados{
      display: flex;
    gap: 0.5rem;
    border-radius: 25px;
    border: 2px solid #764ba2;
    padding: 5px 5px 5px 10px;
    background-color: white;
}

.search-bar input::placeholder {
    color: #999;
}

.btn-buscar {
    padding: 0.6rem 1.5rem;
    background-color: white;
    color: #7b3285;
    border: 2px solid white;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    cursor: pointer;
}

.btn-buscar:hover {
    background-color: transparent;
    color: rgb(0, 0, 0);
    border: 2px solid white;
}

header h1 {
    margin-bottom: 1rem;
    font-size: 2rem;
    text-align: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

nav ul li a:hover {
    opacity: 0.8;
}

nav ul li a.active {
    font-weight: 700;
    text-decoration: underline;
    opacity: 1;
}

/* Botones de autenticación */
.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.6rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-registro {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-registro:hover {
    background-color: white;
    color: #7b3285;
}

.btn-login {
    background-color: white;
    color: #7b3285;
    border: 2px solid white;
}

.btn-login:hover {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* === Estilos del Main e Info Box === */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.content-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Cuadro informativo */
.info-box {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #7b3285;
}

.info-box h3 {
    color: #7b3285;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.info-box > p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.info-box strong {
    color: #7b3285;
}

/* Características en grid */
.info-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-item {
    background: linear-gradient(135deg, rgba(123, 50, 133, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 1.8rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(123, 50, 133, 0.1);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(123, 50, 133, 0.15);
}

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.feature-item h4 {
    color: #7b3285;
    font-size: 1.2rem;
    margin-bottom: 0.7rem;
    font-weight: 600;
}

.feature-item p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Sección de beneficios */
.info-benefits {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
    border: 1px solid #e9ecef;
}

.info-benefits h4 {
    color: #7b3285;
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.info-benefits ul {
    list-style: none;
    padding: 0;
}

.info-benefits ul li {
    padding: 0.7rem 0;
    padding-left: 2rem;
    position: relative;
    color: #555;
    line-height: 1.7;
    font-size: 1rem;
}

.info-benefits ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #7b3285;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Estilos para el recuadro de recursos destacados */
.recursos-box {
    min-height: 400px;
}

.recursos-content {
    min-height: 300px;
    padding: 1rem;
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-style: italic;
}

.recursos-content:empty::after {
    content: "Contenido próximamente...";
}

/* === Estilos de Login === */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #7b3285 0%, #764ba2 100%);
    padding: 2rem;
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: #7b3285;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 0.95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.9rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: #7b3285;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.forgot-password {
    color: #7b3285;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.forgot-password:hover {
    opacity: 0.8;
}

.btn-submit {
    padding: 1rem;
    background: linear-gradient(135deg, #7b3285 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.register-link {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.register-link p {
    color: #666;
    font-size: 0.95rem;
}

.register-link a {
    color: #7b3285;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.register-link a:hover {
    opacity: 0.8;
}

.back-home {
    text-align: center;
    margin-top: 1.5rem;
}

.back-home a {
    color: #7b3285;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.back-home a:hover {
    opacity: 0.8;
}

/* Estilos específicos para registro */
.register-box {
    max-width: 500px;
}

.terms-link {
    color: #7b3285;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.terms-link:hover {
    opacity: 0.8;
}

.checkbox-label span {
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-left {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .auth-buttons {
        margin-top: 0.5rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    /* Main e Info Box responsive */
    main {
        padding: 1rem;
    }
    
    .content-section {
        grid-template-columns: 1fr;
    }
    
    .info-box {
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .info-box h3 {
        font-size: 1.4rem;
    }
    
    .info-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-item {
        padding: 1.3rem;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    .info-benefits {
        padding: 1.5rem;
    }
    
    .info-benefits ul li {
        padding-left: 1.5rem;
        font-size: 0.95rem;
    }
    
    .recursos-box {
        min-height: 300px;
    }
    
    /* Login responsive */
    .login-container {
        padding: 1rem;
    }
    
    .login-box {
        padding: 2rem 1.5rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* ================================
   ESTILOS DEL CATÁLOGO Y FILTROS
   ================================ */

.catalog-container {
    display: flex;
    min-height: calc(100vh - 80px);
    background-color: #f5f5f5;
}

/* Sidebar de filtros */
.filters-sidebar {
    width: 320px;
    background-color: white;
    padding: 2rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #7b3285;
}

.filters-header h2 {
    color: #7b3285;
    font-size: 1.5rem;
    margin: 0;
}

.btn-reset-filters {
    background-color: #f0f0f0;
    color: #666;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-reset-filters:hover {
    background-color: #764ba2;
    color: white;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section h3 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.7rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #764ba2;
}

.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.filter-checkboxes .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.filter-checkboxes .checkbox-label:hover {
    background-color: #f8f8f8;
}

.filter-checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-results-count {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.filter-results-count p {
    color: #666;
    font-size: 0.95rem;
}

.filter-results-count span {
    font-weight: 700;
    color: #7b3285;
    font-size: 1.2rem;
}

/* Área principal del catálogo */
.catalog-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.catalog-header h2 {
    color: #333;
    font-size: 1.8rem;
    margin: 0;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sort-options label {
    color: #666;
    font-size: 0.95rem;
}

.sort-options select {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Grid de recursos */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(123, 50, 133, 0.3);
    border-color: #7b3285;
}

.resource-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.resource-type {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.resource-type.apunte {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.resource-type.trabajo {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.resource-type.investigacion {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.resource-type.presentacion {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.resource-type.guia {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.resource-type.ejercicios {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.resource-nivel {
    background-color: #f0f0f0;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #666;
    text-transform: capitalize;
}

.resource-title {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.resource-autor,
.resource-categoria {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.resource-descripcion {
    color: #777;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.resource-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #999;
}

.btn-view-resource {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #7b3285 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-view-resource::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-view-resource:hover::before {
    left: 100%;
}

.btn-view-resource:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(123, 50, 133, 0.5);
    background: linear-gradient(135deg, #6a2875 0%, #5a3a8a 100%);
}

.btn-view-resource:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(123, 50, 133, 0.4);
}

.btn-view-resource::after {
    content: '→';
    margin-left: 0.5rem;
    transition: margin-left 0.3s ease;
}

.btn-view-resource:hover::after {
    margin-left: 1rem;
}

/* Botón Guardar Recurso */
.btn-guardar-recurso {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.2);
}

.btn-guardar-recurso:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.btn-guardar-recurso:active {
    transform: translateY(0);
}

.btn-guardar-recurso:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.resource-card-destacada-header .btn-guardar-recurso {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Animaciones para notificaciones */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Sin resultados */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    margin-top: 2rem;
}

.no-results p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* Menú de usuario autenticado */
.user-menu {
    display: flex;
    align-items: center;
}

.user-dropdown {
    position: relative;
}

.user-button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.user-button:hover {
    background-color: #45a049;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s;
}

.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    border-radius: 5px;
    z-index: 1000;
    margin-top: 5px;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown-content a:first-child {
    border-radius: 5px 5px 0 0;
}

.dropdown-content a:last-child {
    border-radius: 0 0 5px 5px;
}

.subir-archivo-nav a {
    font-weight: bold;
    color: #4CAF50;
}

/* === Estilos del formulario de subida === */
.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    color: #7b3285;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: #7b3285;
    background-color: #f9f9f9;
}

.radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: #7b3285;
}

.radio-label span {
    font-size: 1rem;
}

/* Área de subida de archivos */
.upload-area {
    margin-top: 1rem;
}

.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    display: none;
}

.file-input-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    border: 3px dashed #7b3285;
    border-radius: 12px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input-label:hover {
    background-color: #f0e6f6;
    border-color: #5a2461;
}

.file-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.file-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.file-hint {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.file-preview,
.image-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    display: none;
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-name {
    font-weight: 600;
    color: #333;
}

.file-size {
    color: #666;
    font-size: 0.9rem;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* Mensajes */
.message-box {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: none;
}

.error-box {
    background-color: #fee;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
}

.success-box {
    background-color: #efd;
    border-left: 4px solid #27ae60;
    color: #1e8449;
}

/* Botones de acción */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-secondary {
    padding: 0.8rem 2rem;
    background-color: #e0e0e0;
    color: #666;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #d0d0d0;
}

.btn-submit {
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #7b3285 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(123, 50, 133, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2rem;
}

/* Estilos para perfil de usuario */
.profile-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.profile-info p {
    margin: 0.8rem 0;
    font-size: 1.05rem;
}

.resource-stats {
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    border-top: 1px solid #f0f0f0;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.stat-icon {
    font-size: 1.2rem;
}

.resource-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit-resource {
    flex: 1;
    padding: 0.7rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.btn-edit-resource:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* Modal de vista previa de recurso */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    overflow-y: auto;
    padding: 2rem;
}

.modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 2rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.modal-header h2 {
    color: #7b3285;
    font-size: 1.8rem;
    margin: 0;
    flex: 1;
}

.modal-close {
    background: #f0f0f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e74c3c;
    color: white;
}

.modal-body {
    padding: 2rem;
}

.resource-details {
    display: grid;
    gap: 1.5rem;
}

.resource-info-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.resource-info-item {
    flex: 1;
    min-width: 200px;
}

.resource-info-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.3rem;
}

.resource-info-item span {
    color: #333;
    font-size: 1.05rem;
}

.resource-description-full {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #7b3285;
    margin: 1.5rem 0;
}

.resource-description-full h3 {
    color: #7b3285;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.resource-preview-area {
    background: #f0f0f0;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resource-preview-area iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 8px;
}

.resource-preview-area img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
}

/* Sistema de valoración con estrellas */
.rating-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.rating-section h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rating-stars-display {
    display: flex;
    gap: 0.2rem;
    font-size: 1.5rem;
}

.rating-info {
    color: #666;
    font-size: 0.95rem;
}

.rating-form {
    border-top: 1px solid #ddd;
    padding-top: 1rem;
    margin-top: 1rem;
}

.rating-form label {
    display: block;
    color: #666;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.rating-stars-input {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.star-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #ddd;
    transition: all 0.2s ease;
    padding: 0;
}

.star-btn:hover,
.star-btn.active {
    color: #ffd700;
    transform: scale(1.1);
}

/* Sección de Comentarios */
.comments-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.comments-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #7b3285;
    box-shadow: 0 0 0 3px rgba(123, 50, 133, 0.1);
}

.comments-list {
    margin-bottom: 1rem;
}

.comment-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #7b3285;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.comment-author {
    font-weight: 600;
    color: #7b3285;
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.85rem;
    color: #999;
}

.comment-text {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

.comments-loading {
    text-align: center;
    color: #999;
    padding: 2rem;
    font-style: italic;
}

.no-comments {
    text-align: center;
    color: #999;
    padding: 2rem;
    font-style: italic;
}

.error-comments {
    text-align: center;
    color: #e74c3c;
    padding: 2rem;
}

.btn-ver-todos-comentarios {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #7b3285 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-ver-todos-comentarios:hover {
    background: linear-gradient(135deg, #5a2461 0%, #5a3678 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(123, 50, 133, 0.3);
}

.modal-actions {
    padding: 1.5rem 2rem;
    border-top: 2px solid #f0f0f0;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: linear-gradient(to top, #f8f9fa, white);
}

.btn-download {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-download:hover::before {
    width: 300px;
    height: 300px;
}

.btn-download:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.4);
}

.btn-download::after {
    content: '⬇️';
    transition: transform 0.3s ease;
}

.btn-download:hover::after {
    transform: translateY(3px);
}

.btn-report {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-report:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.btn-guardar-modal {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-guardar-modal:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9 0%, #1f618d 100%);
}

.btn-guardar-modal:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Tarjetas de recursos destacados */
.resource-card-destacada {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.resource-card-destacada::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #7b3285, #764ba2, #7b3285);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.resource-card-destacada:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(123, 50, 133, 0.25);
    border-color: #7b3285;
}

.resource-card-destacada-header {
    margin-bottom: 0.7rem;
}

.resource-title-destacada {
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    line-height: 1.3;
    font-weight: 600;
    min-height: 2.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-categoria-destacada {
    color: #666;
    font-size: 0.75rem;
    margin-bottom: 0.6rem;
}

.resource-rating-destacada {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0.8rem 0;
    padding: 0.4rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.resource-rating-destacada .stars {
    font-size: 0.85rem;
}

.resource-rating-destacada .rating-text {
    color: #666;
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-view-resource-destacada {
    width: 100%;
    padding: 0.6rem;
    background: linear-gradient(135deg, #7b3285 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-view-resource-destacada::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-view-resource-destacada:hover::before {
    width: 200px;
    height: 200px;
}

.btn-view-resource-destacada:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(123, 50, 133, 0.4);
}

/* Estilos para página de ajustes */
.settings-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    color: #7b3285;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-form {
    max-width: 500px;
}

.settings-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    gap: 2rem;
}

.setting-item strong {
    display: block;
    color: #333;
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

.setting-item p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.danger-zone {
    border: 2px solid #fee;
    background: #fff5f5;
    padding: 2rem;
    border-radius: 10px;
}

.danger-zone h3 {
    color: #e74c3c;
}

.btn-danger {
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

/* Responsive para formulario de subida */
@media (max-width: 768px) {
    /* ...existing code... */
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .setting-item button {
        width: 100%;
    }
    
    .settings-form {
        max-width: 100%;
    }
}
