/* Estilos específicos para Recomendaciones */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --bg-light: #f8f9fa;
    --text-dark: #333;
    --text-muted: #666;
    --success: #28a745;
    --danger: #dc3545;
}

[x-cloak] {
    display: none !important;
}

body {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
}

.app-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 100px);
}

.sidebar {
    width: 250px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.content-area {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.nav-list li a {
    display: block;
    padding: 10px 15px;
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-list li.active a,
.nav-list li a:hover {
    background: #eef2ff;
    color: var(--primary);
    font-weight: 500;
}

/* Auth Message */
.auth-required {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60vh;
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* List Detail */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
}

.badge-public {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-private {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Grid de Items */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.item-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    transition: transform 0.2s;
    background: #fff;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.category-badge {
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75em;
    color: #555;
}

.item-body {
    margin-bottom: 15px;
}

.item-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9em;
}

/* Interacciones de Items (Likes, Stars, Comments) */
.item-interactions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.btn-like-item {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
    border-radius: 5px;
    transition: background 0.2s;
}

.btn-like-item:hover {
    background: #fff0f0;
}

.btn-like-item.liked {
    color: var(--danger);
}

.item-stars {
    display: flex;
    align-items: center;
    gap: 5px;
}

.star {
    cursor: pointer;
    color: #ccc;
    font-size: 1.2em;
    transition: color 0.1s;
}

.star:hover,
.star.active {
    color: #ffd700;
}

.avg-rating {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-left: 5px;
}

/* Comentarios */
.item-comments-section {
    margin-top: 15px;
}

.comments-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.comment-bubble {
    font-size: 0.85em;
    margin-bottom: 5px;
    line-height: 1.4;
}

.comment-input-area {
    display: flex;
    gap: 8px;
}

.comment-input-area input {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.85em;
}

.btn-send-comment {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
}

.btn-liked {
    background-color: #fff0f0 !important;
    border-color: #ffcdd2 !important;
}

/* Public Lists Grid */

/* Public Lists Grid */
.public-lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.list-card {
    background: white;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.list-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.list-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: var(--text-muted);
    margin-top: 5px;
}

.list-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* Modales */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
}

.full-width {
    width: 100%;
}

/* Búsqueda en Vinculaciones */
.add-link-form {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.search-container {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.9em;
}

.search-result-list {
    font-size: 0.75em;
    color: var(--text-muted);
}

.link-type-select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    height: 42px;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

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

/* Biografía */
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
}

/* Notificaciones */
.notifications-container {
    position: relative;
    margin-right: 15px;
}

.btn-notifications {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    padding: 5px;
    color: white;
}

.badge-notif {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff4757;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
    border: 2px solid #1a1a1a;
}

.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    margin-top: 10px;
    overflow: hidden;
    color: #333;
}

.notifications-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    margin: 0;
    font-size: 1rem;
}

.btn-text {
    background: none;
    border: none;
    color: #5352ed;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 15px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f1f2f6;
}

.notification-item.unread {
    background: #f0f3ff;
    border-left: 4px solid #5352ed;
}

.notif-title {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.notif-message {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.notif-time {
    font-size: 0.75rem;
    color: #a4b0be;
}

.empty-notifs {
    padding: 30px;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
}