﻿:root {
    --primary: #2D3E50;
    --primary-light: #3A5167;
    --accent: #FF6B6B;
    --accent-soft: #FFE5E5;
    --success: #10B981;
    --success-soft: #D1FAE5;
    --surface: #FAFBFC;
    --surface-elevated: #FFFFFF;
    --text-primary: #1A1F25;
    --text-secondary: #5F6C7B;
    --text-tertiary: #94A3B8;
    --border: #E5E9F0;
}

.main-content {
    padding: 0;
    width: 100%;
}

.library-container {
    padding: 2rem;
    background: var(--surface);
    min-height: calc(100vh - 72px - 80px);
}

.library-card {
    background: var(--surface-elevated);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    border-top: 4px solid transparent;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

    .library-card:hover {
        background: #F8FAFC;
    }

    .library-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, #5B6B8C 0%, #FF6B6B 100%);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .library-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .library-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .library-card:nth-child(3) {
        animation-delay: 0.3s;
    }

    .library-card:nth-child(4) {
        animation-delay: 0.4s;
    }

    .library-card:nth-child(5) {
        animation-delay: 0.5s;
    }

    .library-card:hover {
        background: #F8FAFC;
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(45, 62, 80, 0.15);
        border: 1px solid var(--primary);
    }

        .library-card:hover::before {
            transform: scaleX(1);
        }
.pool-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--surface-elevated);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    position: relative;
}

.library-title-section {
    flex: 1;
}

.library-actions-top {
    display: flex;
    gap: 0.5rem;
    position: absolute;
    top: 0;
    right: 0;
}

.btn-action-icon {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

    .btn-action-icon.btn-view {
        background: var(--text-secondary);
        color: white;
    }

        .btn-action-icon.btn-view:hover {
            background: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(45, 62, 80, 0.2);
        }

    .btn-action-icon.btn-add-pool {
        background: var(--success);
        color: white;
    }

        .btn-action-icon.btn-add-pool:hover {
            background: #059669;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
        }

        .btn-action-icon.btn-add-pool.added {
            background: var(--accent);
            color: white;
        }

            .btn-action-icon.btn-add-pool.added:hover {
                background: #e03e3e;
                transform: translateY(-2px);
                box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
            }

.library-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.library-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.library-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-action {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-view {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

    .btn-view:hover {
        background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(45, 62, 80, 0.4);
    }

.btn-add-pool {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

    .btn-add-pool:hover {
        background: linear-gradient(135deg, #059669 0%, var(--success) 100%);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    }

    .btn-add-pool.added {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); /* red */
        color: white;
    }

        .btn-add-pool.added:hover {
            background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
        }


.library-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

    .library-info i {
        margin-right: 0.5rem;
        color: var(--text-secondary);
    }

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

    .empty-state i {
        font-size: 4rem;
        color: var(--text-tertiary);
        margin-bottom: 1rem;
    }

.loading-state {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    border-top-color: var(--primary);
}

.search-box {
    margin-bottom: 2rem;
    position: relative;
}

    .search-box .search-icon {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-tertiary);
        z-index: 10;
    }

    .search-box input {
        border-radius: 10px;
        border: 1px solid var(--border);
        background: var(--surface-elevated);
        padding: 0.75rem 1.25rem 0.75rem 2.75rem;
        transition: all 0.3s ease;
        width: 100%;
    }

        .search-box input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 0.2rem rgba(45, 62, 80, 0.1);
            outline: none;
        }


/* Mobile Responsive Styles */
@media (max-width: 992px) {
    .library-container {
        padding: 1rem;
        min-height: calc(100vh - 64px - 80px);
    }

    .library-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .library-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .library-actions-top {
        position: absolute;
        bottom: 1rem;
        right: 1rem;
        width: auto;
        flex-direction: row;
        justify-content: flex-end;
    }

    .library-title {
        font-size: 1.1rem;
    }

    .library-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        font-size: 0.85rem;
        padding-right: 90px;
    }

    .btn-action-icon {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    /* Hide button text, show only icons on mobile */
    .btn-action-icon {
        font-size: 0;
        padding: 0.5rem;
        width: 40px;
        height: 40px;
        min-width: 40px;
        position: relative;
        overflow: hidden;
        text-indent: -9999px;
    }

    .btn-action-icon i {
        font-size: 1rem;
        margin: 0;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        text-indent: 0;
    }

    .search-box {
        margin-bottom: 1rem;
    }

    .search-box input {
        padding: 0.65rem 1rem 0.65rem 2.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .library-container {
        padding: 0.75rem;
        min-height: calc(100vh - 64px - 80px);
    }

    .library-card {
        padding: 0.85rem;
        border-radius: 10px;
    }

    .library-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .library-category {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .library-actions-top {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.4rem;
        position: absolute;
        bottom: 0.85rem;
        right: 0.85rem;
        width: auto;
        justify-content: flex-end;
    }

    .btn-action-icon {
        padding: 0.5rem;
        font-size: 0;
        width: 38px;
        height: 38px;
        min-width: 38px;
        gap: 0;
        position: relative;
        overflow: hidden;
        text-indent: -9999px;
    }

    .btn-action-icon i {
        font-size: 0.95rem;
        margin: 0;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        text-indent: 0;
    }

    .library-info {
        font-size: 0.8rem;
        gap: 0.4rem;
        padding-right: 85px;
    }

    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state i {
        font-size: 3rem;
    }

    .empty-state h5 {
        font-size: 1.1rem;
    }

    .empty-state p {
        font-size: 0.9rem;
    }

    .loading-state {
        padding: 2rem 1rem;
    }

    .search-box {
        margin-bottom: 0.75rem;
    }

    .search-box .search-icon {
        left: 0.75rem;
        font-size: 0.9rem;
    }

    .search-box input {
        padding: 0.6rem 0.85rem 0.6rem 2.25rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .library-container {
        padding: 1rem;
        min-height: calc(100vh - 60px - 80px);
    }

    .library-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .library-title {
        font-size: 0.95rem;
    }

    .library-actions-top {
        flex-direction: row;
        width: auto;
        gap: 0.5rem;
        position: absolute;
        bottom: 0.75rem;
        right: 0.75rem;
        justify-content: flex-end;
    }

    .btn-action-icon {
        width: 38px;
        min-width: 38px;
        justify-content: center;
        padding: 0.5rem;
        font-size: 0;
        position: relative;
        overflow: hidden;
        text-indent: -9999px;
    }

    .btn-action-icon i {
        font-size: 0.95rem;
        margin: 0;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        text-indent: 0;
    }

    .library-info {
        font-size: 0.75rem;
        padding-right: 85px;
    }

}
