/* Library Page - Dedicated Styles */
/* Complements landing-page.css */

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.library-hero {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.library-hero h1 {
    font-size: 2.8rem;
    color: #1b5e20;
    margin-bottom: 0.5rem;
    border: none;
    padding: 0;
}

.hero-tagline {
    font-size: 1.4rem;
    color: #2e7d32;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.library-hero .intro {
    max-width: 800px;
    margin: 0 auto 2rem;
    color: #444;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2e7d32;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick Navigation */
.quick-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
}

.quick-nav-link {
    padding: 0.5rem 1rem;
    background: #e8f5e9;
    color: #2e7d32;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.quick-nav-link:hover {
    background: #2e7d32;
    color: white;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Featured / Editor's Picks */
.featured-section {
    background: rgba(255, 255, 255, 0.97);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.featured-section h2 {
    color: #1b5e20;
    text-align: center;
    margin-bottom: 0.5rem;
}

.featured-section > p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.pick-card {
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e9 100%);
    border: 2px solid #c8e6c9;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.pick-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(46, 125, 50, 0.2);
    border-color: #2e7d32;
}

.pick-card.pick-featured {
    border-color: #2e7d32;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.pick-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.pick-card img {
    margin-bottom: 0.75rem;
}

.pick-card h3 {
    color: #1b5e20;
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.pick-card p {
    color: #555;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

/* Category Sections */
.category-section {
    background: rgba(255, 255, 255, 0.97);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.category-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.category-header h2 {
    color: #1b5e20;
    margin: 0;
}

.category-count {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.category-section > p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Library Grid */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.library-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Library Card */
.library-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.library-card:hover {
    background: #f1f8e9;
    border-color: #2e7d32;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
}

.library-card img {
    flex-shrink: 0;
}

.library-card-content {
    flex: 1;
    min-width: 0;
}

.library-card h3 {
    color: #1b5e20;
    font-size: 1rem;
    margin: 0 0 0.25rem;
}

.card-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

.meta-difficulty {
    color: #f57c00;
    font-weight: 600;
}

.meta-difficulty.meta-easy {
    color: #4caf50;
}

.meta-difficulty.meta-hard {
    color: #e65100;
}

.meta-difficulty.meta-expert {
    color: #c62828;
}

.meta-time {
    color: #666;
}

.meta-winrate {
    color: #2e7d32;
    font-weight: 600;
}

/* Large Library Card (Puzzle Games) */
.library-card-large {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
}

.library-card-large .library-card-content {
    width: 100%;
}

.library-card-large h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.card-description {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
}

.library-card-large .card-meta {
    justify-content: center;
    margin-bottom: 0.75rem;
}

.card-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

.card-features li {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Collections Section */
.collections-section {
    background: rgba(255, 255, 255, 0.97);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.collections-section h2 {
    color: #1b5e20;
    margin-bottom: 0.5rem;
}

.collections-section > p {
    color: #666;
    margin-bottom: 1.5rem;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.collection-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.5rem;
}

.collection-box h3 {
    color: #1b5e20;
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

.collection-box > p {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.collection-games {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.collection-games a {
    background: white;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.collection-games a:hover {
    background: #2e7d32;
    color: white;
    border-color: #2e7d32;
}

/* Browse Sections */
.browse-section {
    background: rgba(255, 255, 255, 0.97);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.browse-section h2 {
    color: #1b5e20;
    margin-bottom: 1.5rem;
}

/* Difficulty Groups */
.difficulty-groups {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.difficulty-group {
    padding: 1.25rem;
    background: #fafafa;
    border-radius: 8px;
    border-left: 4px solid #ccc;
}

.difficulty-label {
    font-size: 1rem;
    margin: 0 0 0.25rem;
}

.difficulty-label.easy-label {
    color: #4caf50;
}

.difficulty-group:has(.easy-label) {
    border-left-color: #4caf50;
}

.difficulty-label.medium-label {
    color: #ff9800;
}

.difficulty-group:has(.medium-label) {
    border-left-color: #ff9800;
}

.difficulty-label.hard-label {
    color: #e65100;
}

.difficulty-group:has(.hard-label) {
    border-left-color: #e65100;
}

.difficulty-label.expert-label {
    color: #c62828;
}

.difficulty-group:has(.expert-label) {
    border-left-color: #c62828;
}

.difficulty-group > p {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
}

.game-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.game-pill {
    background: white;
    border: 1px solid #ddd;
    color: #333;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.game-pill:hover {
    background: #2e7d32;
    color: white;
    border-color: #2e7d32;
}

.footnote {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 1rem;
}

/* Time Groups */
.time-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.time-group {
    text-align: center;
    padding: 1.5rem;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.time-icon {
    display: inline-block;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.time-group h3 {
    color: #1b5e20;
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}

.time-group > p {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

.time-group .game-pills {
    justify-content: center;
}

/* Reference Table */
.reference-section {
    background: rgba(255, 255, 255, 0.97);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.reference-section h2 {
    color: #1b5e20;
    margin-bottom: 1.5rem;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.reference-table th {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.reference-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e8e8e8;
    font-size: 0.9rem;
}

.reference-table tr:hover {
    background: #f5f5f5;
}

.reference-table a {
    color: #1b5e20;
    text-decoration: none;
    font-weight: 600;
}

.reference-table a:hover {
    text-decoration: underline;
}

/* Why Section */
.why-section {
    background: rgba(255, 255, 255, 0.97);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.why-section h2 {
    color: #1b5e20;
    text-align: center;
    margin-bottom: 2rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.benefit-item {
    text-align: center;
    padding: 1rem;
}

.benefit-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.benefit-item h3 {
    color: #1b5e20;
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.benefit-item p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 2rem 0;
}

.cta-section h2 {
    color: white;
    margin-bottom: 0.5rem;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: white;
    color: #1b5e20;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Back Link */
.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 2rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: white;
    text-decoration: underline;
}

.breadcrumb span {
    color: white;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .library-hero {
        padding: 2rem 1.5rem;
    }

    .library-hero h1 {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .quick-nav {
        gap: 0.5rem;
    }

    .quick-nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .picks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .pick-card {
        padding: 1rem;
    }

    .pick-card img {
        width: 40px;
        height: 40px;
    }

    .pick-card h3 {
        font-size: 1rem;
    }

    .pick-card p {
        font-size: 0.8rem;
    }

    .library-grid {
        grid-template-columns: 1fr;
    }

    .library-grid-3 {
        grid-template-columns: 1fr;
    }

    .category-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .collections-grid {
        grid-template-columns: 1fr;
    }

    .time-groups {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .reference-table {
        font-size: 0.8rem;
    }

    .reference-table th,
    .reference-table td {
        padding: 0.5rem;
    }

    .cta-section {
        padding: 2rem 1.5rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .picks-grid {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }
}
