/* User Library Styles */
.user-library {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.library-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.library-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.library-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.library-item-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2/3;
    background: #f5f5f5;
}

.library-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.library-item:hover .library-item-image img {
    transform: scale(1.05);
}

.library-item-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.library-item-badge.advent {
    background: linear-gradient(135deg, #c31432 0%, #240b36 100%);
}

.library-item-badge.regular {
    background: rgba(0, 0, 0, 0.7);
}

.library-item-badge.reading {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.library-item-badge.finished {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.library-item-content {
    padding: 12px;
}

.library-item-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.library-item-subtitle {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.library-item-progress {
    margin-top: 8px;
}

.progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    transition: width 0.3s ease;
}

.library-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.library-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.library-empty-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.library-empty-subtext {
    font-size: 14px;
    color: #999;
}

/* Advent Calendar View */
.advent-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.advent-day-card {
    aspect-ratio: 1;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.advent-day-card.unlocked {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    cursor: pointer;
}

.advent-day-card.unlocked:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.advent-day-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.advent-day-card.current {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #ffffff 0%, #fff0f0 100%);
    animation: pulse 2s infinite;
}

.advent-day-card.has-progress {
    border-color: #2196F3;
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
}

.advent-day-card.has-progress:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 107, 107, 0);
    }
}

.advent-day-number {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.advent-day-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #666;
    margin-top: 4px;
}

.advent-day-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .user-library {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .advent-calendar {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }

    .advent-day-number {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .user-library {
        grid-template-columns: repeat(2, 1fr);
    }

    .advent-calendar {
        grid-template-columns: repeat(4, 1fr);
    }
}
