/* 
   NEW COMMUNITY LIBRARY DESIGN SYSTEM
   Modern, Interactive, Community-Focused
*/

:root {
    --lib-primary: #4f46e5;
    --lib-secondary: #8b5cf6;
    --lib-accent: #f59e0b;
    --lib-bg-card: rgba(30, 41, 59, 0.7);
    --lib-border: rgba(255, 255, 255, 0.1);
    --lib-text: #f8fafc;
    --lib-text-muted: #94a3b8;
}

/* Dashboard Stats */
.library-new-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.lib-stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--lib-border);
    padding: 1.5rem;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lib-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.1), transparent);
}

.lib-stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--lib-primary);
}

.lib-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(79, 70, 229, 0.1);
    color: var(--lib-primary);
}

.lib-stat-info h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    color: white;
}

.lib-stat-info p {
    font-size: 0.85rem;
    color: var(--lib-text-muted);
    margin: 0;
}

/* Toolbar */
.lib-modern-toolbar {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid var(--lib-border);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    position: sticky;
    top: 10px;
    z-index: 100;
}

.lib-search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.lib-search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lib-text-muted);
}

.lib-search-box input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--lib-border);
    padding: 12px 12px 12px 45px;
    border-radius: 14px;
    color: white;
    transition: all 0.3s;
}

.lib-search-box input:focus {
    border-color: var(--lib-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Grid & Cards */
#library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.lib-card-premium {
    background: var(--lib-bg-card);
    border: 1px solid var(--lib-border);
    border-radius: 28px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
}

.lib-card-premium:hover {
    transform: scale(1.02);
    border-color: var(--lib-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.lib-card-tag {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(79, 70, 229, 0.15);
    color: #818cf8;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lib-card-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.lib-user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--lib-primary), var(--lib-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.lib-user-details h4 {
    font-size: 1rem;
    margin: 0;
    color: white;
}

.lib-user-details span {
    font-size: 0.75rem;
    color: var(--lib-text-muted);
}

.lib-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: white;
}

.lib-card-excerpt {
    color: var(--lib-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.lib-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--lib-border);
}

.lib-btn-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--lib-border);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.lib-btn-action:hover {
    background: var(--lib-primary);
    border-color: var(--lib-primary);
    transform: translateY(-2px);
}

.lib-btn-read {
    background: var(--lib-primary);
    color: white;
    padding: 10px 24px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.lib-btn-read:hover {
    background: var(--lib-secondary);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .library-new-dashboard {
        grid-template-columns: 1fr;
    }

    .lib-modern-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    #library-grid {
        grid-template-columns: 1fr;
    }
}