/* Auto-extracted from page-library.php (P1-5) */
/* ============================================================
   Library Page — My Library
   ============================================================ */
.library-page {
    --library-green: #22c55e;
    --library-text: #1f2937;
    --library-muted: #6b7280;
    --library-border: #e5e7eb;
}

.library-header {
    margin-bottom: 20px;
}
.library-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
.library-title-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
.library-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0;
}
.library-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
}

.library-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.library-search {
    position: relative;
    flex: 1 1 300px;
    max-width: 420px;
}
.library-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    opacity: 0.7;
}
.library-search-input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 16px 12px 40px;
    font-size: 0.95rem;
    color: #374151;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.library-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.library-stats {
    display: flex;
    gap: 18px;
    font-size: 0.88rem;
    color: #6b7280;
}
.library-stats strong {
    color: #1f2937;
    font-weight: 800;
}

.library-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.library-filter {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    color: #4b5563;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}
.library-filter:hover {
    background: #f9fafb;
    text-decoration: none;
    color: #1f2937;
}
.library-filter.active {
    background: var(--library-green);
    color: #fff;
    border-color: var(--library-green);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.library-section {
    margin-bottom: 32px;
}
.library-section-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Continue Learning */
.library-continue-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
@media (max-width: 720px) {
    .library-continue-grid { grid-template-columns: 1fr; }
}
.library-continue-card {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.library-continue-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.library-continue-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.library-continue-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}
.library-continue-icon span {
    font-size: 1.6rem;
}
.library-continue-info {
    flex: 1;
    min-width: 0;
}
.library-continue-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 2px;
}
.library-continue-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.library-continue-status {
    font-size: 0.78rem;
    color: #9ca3af;
    font-weight: 600;
}
.library-continue-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--library-green);
    color: #fff;
    font-weight: 800;
    font-size: 0.88rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}
.library-continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
    text-decoration: none;
    color: #fff;
}

/* All Courses */
.library-courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 1100px) { .library-courses-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .library-courses-grid { grid-template-columns: 1fr; } }

.library-course-card {
    position: relative;
    border-radius: 22px;
    padding: 26px 22px 22px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 240px;
}
.library-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}
.library-course-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.library-course-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.6;
}
.library-course-decor {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.12;
    z-index: 0;
}
.library-course-card.locked {
    background: #f9fafb;
}
.library-course-card.locked .library-course-title,
.library-course-card.locked .library-course-subtitle {
    color: #4b5563;
}

.library-course-icon {
    position: relative;
    z-index: 2;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}
.library-course-icon img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}
.library-course-icon span {
    font-size: 1.8rem;
}
.library-course-title {
    position: relative;
    z-index: 2;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 4px 0;
}
.library-course-subtitle {
    position: relative;
    z-index: 2;
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0 0 18px 0;
}
.library-course-meta {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 18px;
}
.library-course-difficulty,
.library-course-quests {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.library-course-progress {
    position: relative;
    z-index: 2;
    margin-top: auto;
}
.library-course-progress-bar {
    height: 8px;
    background: rgba(0,0,0,0.06);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}
.library-course-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.library-course-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 700;
}
.library-course-progress-text span:first-child {
    color: #9ca3af;
    font-weight: 600;
}

.library-course-lock {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 10px 12px;
    background: rgba(0,0,0,0.04);
    border-radius: 12px;
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 700;
}
.library-course-lock-icon {
    font-size: 1rem;
}

.library-empty {
    text-align: center;
    padding: 60px 24px;
    background: #f9fafb;
    border-radius: 20px;
    border: 2px dashed #e5e7eb;
    color: #6b7280;
}
.library-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 14px;
}
.library-empty h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 6px;
}
