main {
    flex: 1;
}

.home-page,
.home-page * {
    box-sizing: border-box;
}

.home-page {
    width: min(1400px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0 70px;
}

.home-heading {
    margin-bottom: 28px;
}

.home-heading h1 {
    margin: 0;
    font-size: 2rem;
}

.home-heading p {
    margin: 6px 0 0;
    color: #7c8a99;
}

.home-section {
    margin-top: 22px;
    padding: 22px;
    border: 1px solid #1f2a36;
    border-radius: 12px;
    background: #0f141a;
}

.yearly-section {
    margin-top: 0;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.15rem;
}

.section-heading p {
    margin: 5px 0 0;
    color: #778594;
    font-size: 0.84rem;
}

.objective-counter {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.objective-counter strong {
    font-size: 1.5rem;
}

.objective-counter span {
    color: #7f8c99;
    font-size: 0.85rem;
}

.progress-bar {
    width: 100%;
    height: 7px;
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 999px;
    background: #19212a;
}

.progress-value {
    height: 100%;
    border-radius: inherit;
    background: #3b82f6;
}

.yearly-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.yearly-stat {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
    padding: 16px;
    border: 1px solid #202b36;
    border-radius: 9px;
    background: #0b0f14;
}

.yearly-stat-icon {
    width: 39px;
    height: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    background: #151d26;
    color: #6fa8ef;
}

.yearly-stat > div:last-child {
    min-width: 0;
}

.yearly-stat strong {
    display: block;
    color: #f2f5f8;
    font-size: 1.05rem;
}

.yearly-stat strong span {
    color: #758393;
    font-size: 0.75rem;
    font-weight: 500;
}

.yearly-stat p {
    margin: 3px 0 0;
    color: #748291;
    font-size: 0.75rem;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.recent-card,
.watchlist-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #202b36;
    border-radius: 9px;
    background: #0b0f14;
    color: #ffffff;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.recent-card:hover,
.watchlist-card:hover {
    transform: translateY(-4px);
    border-color: #3c4b5c;
    background: #10161d;
}

.recent-poster,
.watchlist-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #121820;
}

.recent-poster img,
.watchlist-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.recent-card:hover img,
.watchlist-card:hover img {
    transform: scale(1.025);
}

.poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f5b68;
    font-size: 2rem;
}

.watch-type,
.priority-badge {
    position: absolute;
    left: 9px;
    bottom: 9px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: rgba(8, 12, 17, 0.88);
    backdrop-filter: blur(5px);
    color: #dce5ee;
    font-size: 0.7rem;
    font-weight: 600;
}

.watch-type.cinema {
    color: #b8d8ff;
}

.watch-type.streaming {
    color: #c4ccd5;
}

.recent-content,
.watchlist-content {
    padding: 11px;
}

.recent-content h3,
.watchlist-content h3 {
    margin: 0;
    overflow: hidden;
    color: #edf1f5;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-date {
    margin: 6px 0 0;
    color: #7e8a97;
    font-size: 0.72rem;
}

.recent-location {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 6px 0 0;
    overflow: hidden;
    color: #657484;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.all-time-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.all-time-card {
    position: relative;
    padding: 20px;
    border: 1px solid #202b36;
    border-radius: 10px;
    background: #0b0f14;
}

.all-time-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 9px;
    background: #151d26;
    color: #6fa8ef;
}

.all-time-heading h3 {
    margin: 0;
    font-size: 1rem;
}

.all-time-heading p {
    margin: 4px 0 0;
    color: #697887;
    font-size: 0.78rem;
}

.all-time-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.all-time-values div {
    padding: 13px;
    border: 1px solid #1c2630;
    border-radius: 8px;
    background: #0f141a;
}

.all-time-values strong {
    display: block;
    font-size: 1.15rem;
}

.all-time-values span {
    display: block;
    margin-top: 3px;
    color: #71808f;
    font-size: 0.72rem;
}

.stats-link,
.section-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #72aaf0;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
}

.stats-link {
    margin-top: 17px;
}

.stats-link:hover,
.section-link:hover {
    color: #9bc5fa;
}

.stats-link i,
.section-link i {
    font-size: 0.72rem;
    transition: transform 0.2s ease;
}

.stats-link:hover i,
.section-link:hover i {
    transform: translateX(3px);
}

.watchlist-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.priority-badge {
    top: 9px;
    bottom: auto;
}

.priority-importante {
    color: #ff9c9c;
}

.priority-elevee {
    color: #ffc97a;
}

.priority-moyenne {
    color: #b8d8ff;
}

.priority-faible {
    color: #a4afb9;
}

.watchlist-content p {
    margin: 5px 0 0;
    color: #707d8a;
    font-size: 0.72rem;
}

.empty-block {
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
    border: 1px dashed #24313d;
    border-radius: 9px;
    color: #627181;
}

.empty-block i {
    font-size: 1.3rem;
}

.empty-block p {
    margin: 0;
    font-size: 0.82rem;
}

@media (max-width: 1050px) {
    .yearly-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recent-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .watchlist-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .home-page {
        width: calc(100% - 24px);
        padding: 24px 0 50px;
    }

    .home-heading h1 {
        font-size: 1.7rem;
    }

    .home-section {
        padding: 16px;
    }

    .section-heading {
        align-items: flex-start;
    }

    .yearly-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .yearly-stat {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
        padding: 13px;
    }

    .recent-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .recent-grid .recent-card:last-child {
        display: none;
    }

    .all-time-grid {
        grid-template-columns: 1fr;
    }

    .watchlist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }
}

@media (max-width: 420px) {
    .yearly-stats {
        grid-template-columns: 1fr;
    }

    .section-heading {
        flex-direction: column;
        gap: 10px;
    }

    .objective-counter {
        align-self: flex-start;
    }

    .all-time-values {
        grid-template-columns: 1fr 1fr;
    }
}