/* ============================================
   Media Tracker - Library Page
   ============================================ */


.mt-page-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin: 0;
}

.mt-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color var(--transition-fast);
}

.mt-back-link:hover {
    color: var(--text-primary);
}

/* Filter Tabs */
.mt-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.mt-filter-btn {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.mt-filter-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: var(--bg-hover);
}

.mt-filter-btn.active {
    background: var(--app-media);
    color: white;
    border-color: var(--app-media);
}

/* Sections */
.mt-section {
    margin-bottom: 3.5rem;
}

.mt-section + .mt-section {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.mt-section-header {
    margin-bottom: 1.25rem;
}

.mt-section-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mt-section-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.mt-section-title-link:hover .mt-section-title {
    color: var(--app-media);
}

.mt-section-title-link:hover .mt-section-arrow {
    transform: translateX(3px);
    opacity: 1;
}

.mt-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.mt-section-icon-primary {
    background: rgba(59, 130, 246, 0.12);
    color: rgba(59, 130, 246, 1);
}

.mt-section-icon-success {
    background: rgba(16, 185, 129, 0.12);
    color: rgba(16, 185, 129, 1);
}

.mt-section-icon-warning {
    background: rgba(245, 158, 11, 0.12);
    color: rgba(245, 158, 11, 1);
}

.mt-section-icon-teal {
    background: rgba(20, 184, 166, 0.12);
    color: rgba(20, 184, 166, 1);
}

.mt-section-icon-info {
    background: rgba(99, 102, 241, 0.12);
    color: rgba(99, 102, 241, 1);
}

.mt-section-icon-danger {
    background: rgba(239, 68, 68, 0.12);
    color: rgba(239, 68, 68, 1);
}

.mt-section-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.15rem 0.55rem;
    border-radius: 50px;
}

.mt-section-arrow {
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0.5;
    transition: all var(--transition-fast);
    margin-left: auto;
}

/* Item Grid */
.mt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.mt-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.mt-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.mt-card-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--bg-tertiary);
    position: relative;
}

.mt-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.mt-card:hover .mt-card-cover img {
    transform: scale(1.04);
}

.mt-card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-muted);
}

.mt-card-status {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
}

.mt-card-rating {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fbbf24;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.mt-card-body {
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.mt-card-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mt-card-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.mt-card-release {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Cover Progress Bar (overlay) */
.mt-cover-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.mt-cover-progress-badge {
    position: absolute;
    bottom: 0.4rem;
    right: 0.4rem;
    font-size: 0.6rem;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.15rem 0.4rem;
    border-radius: 50px;
}

.mt-cover-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.mt-cover-progress-fill {
    height: 100%;
    background: #22c55e;
    transition: width var(--transition-base);
}

/* Status Badges */
.mt-badge {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
    letter-spacing: 0.02em;
}

.mt-badge-primary {
    background: rgba(59, 130, 246, 0.85);
    color: white;
}

.mt-badge-success {
    background: rgba(16, 185, 129, 0.85);
    color: white;
}

.mt-badge-warning {
    background: rgba(245, 158, 11, 0.85);
    color: white;
}

.mt-badge-teal {
    background: rgba(20, 184, 166, 0.85);
    color: white;
}

.mt-badge-info {
    background: rgba(99, 102, 241, 0.85);
    color: white;
}

.mt-badge-danger {
    background: rgba(239, 68, 68, 0.85);
    color: white;
}

.mt-badge-secondary {
    background: rgba(100, 116, 139, 0.85);
    color: white;
}

/* Error State */
.mt-error {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.mt-error i {
    font-size: 3rem;
    color: var(--accent-danger);
    display: block;
    margin-bottom: 1rem;
}

.mt-error h5 {
    margin-bottom: 0.5rem;
}

.mt-error p {
    color: var(--text-muted);
}

/* Stats */
.mt-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.mt-stat {
    text-align: center;
}

.mt-stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--app-media);
    line-height: 1;
}

.mt-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Responsive */
@media (max-width: 767.98px) {
    .mt-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .mt-filters {
        justify-content: flex-start;
    }

    .mt-stats {
        gap: 1.5rem;
    }

    .mt-section-title {
        font-size: 0.9rem;
    }

    .mt-section-icon {
        width: 1.4rem;
        height: 1.4rem;
        font-size: 0.75rem;
    }
}
