:root {
    color-scheme: dark;

    --bg: #09090d;
    --surface: #121219;
    --surface-2: #191921;
    --surface-3: #20202a;

    --text: #f7f4f6;
    --muted: #9c98a3;
    --muted-2: #716d78;

    --accent: #ff4778;
    --accent-soft: rgba(255, 71, 120, .14);

    --gold: #ffd66b;

    --radius: 22px;
}


* {
    box-sizing: border-box;
}


html {
    background: var(--bg);
}


body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 80% -10%,
            rgba(255, 71, 120, .12),
            transparent 35%
        ),
        var(--bg);

    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    -webkit-font-smoothing: antialiased;
}


button {
    font: inherit;
}


.app {
    width: 100%;
    max-width: 620px;

    min-height: 100vh;

    margin: 0 auto;

    padding:
        max(18px, env(safe-area-inset-top))
        18px
        calc(110px + env(safe-area-inset-bottom));
}


.header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 22px;
}


.eyebrow,
.section-kicker {
    color: var(--accent);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .18em;
}


.header h1 {
    margin: 4px 0 0;

    font-size: 27px;
    letter-spacing: -.04em;
}


.header h1 span {
    color: var(--accent);
}


.avatar-pair {
    display: flex;
    align-items: center;

    padding-left: 10px;
}


.avatar {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border: 3px solid var(--bg);
    border-radius: 50%;

    font-size: 13px;
    font-weight: 800;
}


.avatar + .avatar {
    margin-left: -10px;
}


.avatar-m {
    background:
        linear-gradient(
            135deg,
            #41415d,
            #232330
        );
}


.avatar-a {
    background:
        linear-gradient(
            135deg,
            #a94768,
            #58263a
        );
}


.hero {
    position: relative;

    min-height: 235px;

    overflow: hidden;

    padding: 28px;

    border: 1px solid rgba(255,255,255,.06);
    border-radius: 30px;

    background:
        radial-gradient(
            circle at 80% 30%,
            rgba(255, 90, 130, .24),
            transparent 30%
        ),
        radial-gradient(
            circle at 70% 100%,
            rgba(105, 75, 165, .28),
            transparent 40%
        ),
        linear-gradient(
            145deg,
            #1b1722,
            #111118 62%,
            #17131c
        );

    box-shadow:
        0 25px 80px rgba(0,0,0,.35);
}


.hero-copy {
    position: relative;
    z-index: 2;

    width: 76%;
}


.hero-badge {
    display: inline-flex;

    padding: 7px 11px;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;

    background: rgba(255,255,255,.04);

    color: #d7d2d7;

    font-size: 11px;
    font-weight: 650;
}


.hero h2 {
    margin: 18px 0 12px;

    font-size: clamp(29px, 8vw, 40px);
    line-height: .98;

    letter-spacing: -.055em;
}


.hero p {
    max-width: 310px;

    margin: 0;

    color: #aaa4ae;

    font-size: 13px;
    line-height: 1.55;
}


.heart {
    position: absolute;
    right: -6px;
    bottom: -45px;

    color: rgba(255, 71, 120, .12);

    font-size: 190px;
    line-height: 1;

    transform: rotate(-9deg);
}


.section {
    margin-top: 32px;
}


.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;

    margin-bottom: 15px;
}


.section h3 {
    margin: 4px 0 0;

    font-size: 22px;
    letter-spacing: -.035em;
}


.count-pill {
    min-width: 34px;

    padding: 7px 10px;

    border-radius: 999px;

    background: var(--surface-2);

    color: var(--muted);

    text-align: center;

    font-size: 12px;
    font-weight: 800;
}


.media-card {
    position: relative;

    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 17px;

    padding: 12px;

    border: 1px solid rgba(255,255,255,.06);
    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.035),
            rgba(255,255,255,.01)
        ),
        var(--surface);

    box-shadow:
        0 16px 40px rgba(0,0,0,.22);
}


.poster-wrap {
    position: relative;

    aspect-ratio: 2 / 3;

    overflow: hidden;

    border-radius: 16px;

    background: var(--surface-3);
}


.poster {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


.poster-badge {
    position: absolute;
    left: 7px;
    bottom: 7px;

    padding: 5px 7px;

    border-radius: 8px;

    background: rgba(5,5,8,.82);

    backdrop-filter: blur(10px);

    color: white;

    font-size: 10px;
    font-weight: 800;
}


.media-content {
    min-width: 0;

    display: flex;
    flex-direction: column;

    padding: 5px 4px 3px 0;
}


.media-type {
    color: var(--accent);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .13em;
    text-transform: uppercase;
}


.media-title {
    margin: 5px 0 2px;

    font-size: 21px;
    line-height: 1.08;

    letter-spacing: -.04em;
}


.media-original {
    overflow: hidden;

    color: var(--muted);

    font-size: 11px;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.together {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    width: max-content;

    margin-top: 12px;
    padding: 6px 9px;

    border-radius: 9px;

    background: var(--accent-soft);

    color: #ff8aaa;

    font-size: 10px;
    font-weight: 800;
}


.ratings {
    display: grid;
    gap: 7px;

    margin-top: auto;
    padding-top: 12px;
}


.rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;

    color: #c5c0c7;

    font-size: 12px;
}


.rating-person {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.rating-value {
    flex: 0 0 auto;

    padding: 5px 8px;

    border-radius: 8px;

    background: rgba(255, 214, 107, .1);

    color: var(--gold);

    font-weight: 800;
}


.media-average {
    margin-top: 10px;

    color: var(--muted-2);

    font-size: 10px;
}


.loading-card,
.empty-card {
    padding: 28px 20px;

    border: 1px dashed rgba(255,255,255,.08);
    border-radius: 22px;

    background: var(--surface);

    color: var(--muted);

    text-align: center;

    font-size: 13px;
}


.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;

    margin-top: 14px;
}


.stat {
    padding: 16px 10px;

    border: 1px solid rgba(255,255,255,.05);
    border-radius: 18px;

    background: var(--surface);

    text-align: center;
}


.stat-number {
    font-size: 21px;
    font-weight: 850;

    letter-spacing: -.04em;
}


.stat-label {
    margin-top: 4px;

    color: var(--muted);

    font-size: 9px;
    line-height: 1.3;
}


.plan-list {
    display: grid;
    gap: 8px;
}


.plan-item {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 11px;

    border: 1px solid rgba(255,255,255,.05);
    border-radius: 16px;

    background: var(--surface);
}


.plan-poster {
    width: 42px;
    height: 58px;

    flex: 0 0 auto;

    overflow: hidden;

    border-radius: 9px;

    background: var(--surface-3);
}


.plan-poster img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


.plan-info {
    min-width: 0;
    flex: 1;
}


.plan-title {
    overflow: hidden;

    font-size: 13px;
    font-weight: 750;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.plan-who {
    margin-top: 3px;

    color: var(--muted);

    font-size: 10px;
}


.bottom-nav {
    position: fixed;

    z-index: 50;

    left: 50%;
    bottom: 0;

    width: min(620px, 100%);

    display: grid;
    grid-template-columns: repeat(5, 1fr);

    padding:
        9px 10px
        calc(9px + env(safe-area-inset-bottom));

    border-top: 1px solid rgba(255,255,255,.06);

    background: rgba(10,10,14,.91);

    backdrop-filter: blur(22px);

    transform: translateX(-50%);
}


.nav-item {
    appearance: none;

    display: grid;
    place-items: center;
    gap: 4px;

    padding: 4px 2px;

    border: 0;

    background: transparent;

    color: #716d77;

    font-size: 9px;

    cursor: pointer;
}


.nav-icon {
    font-size: 21px;
    line-height: 1;
}


.nav-item.active {
    color: var(--accent);
}


.toast {
    position: fixed;

    z-index: 100;

    left: 50%;
    bottom: calc(88px + env(safe-area-inset-bottom));

    max-width: calc(100% - 40px);

    padding: 11px 15px;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;

    background: rgba(28,28,36,.96);

    color: #eee;

    font-size: 12px;

    opacity: 0;
    pointer-events: none;

    transform: translate(-50%, 10px);

    transition:
        opacity .2s ease,
        transform .2s ease;
}


.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}


@media (min-width: 520px) {

    .app {
        padding-left: 24px;
        padding-right: 24px;
    }

    .media-card {
        grid-template-columns: 135px 1fr;
    }

}
