* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: #111;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    background:
        radial-gradient(circle at 50% -10%, #292722 0, #111 42%);

    color: #fff;
    min-height: 100vh;
}

/* =========================
   HEADER
   ========================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;

    height: 68px;

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

    padding: 0 max(18px, calc((100vw - 1180px) / 2));

    background: rgba(17, 17, 17, .88);
    backdrop-filter: blur(18px);

    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #fff;
    text-decoration: none;

    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.6px;

    white-space: nowrap;
}

.brand-paw {
    font-size: 25px;
}

.filters {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filters::-webkit-scrollbar {
    display: none;
}

.filter {
    border: 0;

    color: #aaa;
    background: transparent;

    padding: 8px 13px;
    border-radius: 22px;

    cursor: pointer;
    font-size: 13px;
    font-weight: 600;

    white-space: nowrap;

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}

.filter:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.filter.active {
    color: #111;
    background: #fff;
}

.filter:active {
    transform: scale(.95);
}

/* =========================
   INTRO
   ========================= */

main {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 16px 80px;
}

.intro {
    text-align: center;
    padding: 62px 10px 42px;
}

.intro-badge {
    display: inline-flex;
    align-items: center;

    padding: 7px 13px;
    margin-bottom: 18px;

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

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

    color: #aaa;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.intro h1 {
    margin: 0;

    font-size: clamp(43px, 8vw, 72px);
    line-height: .95;
    letter-spacing: -4px;
}

.intro h1 span {
    color: #8f8f8f;
}

.intro p {
    max-width: 500px;

    margin: 22px auto 0;

    color: #999;
    font-size: 16px;
    line-height: 1.55;
}

/* =========================
   FEED
   ========================= */

.feed {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.feed-card {
    position: relative;

    overflow: hidden;

    background: #1b1b1b;

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

    box-shadow:
        0 20px 60px rgba(0,0,0,.35);

    animation: cardIn .45s ease both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   VIDEO
   ========================= */

.video-wrap {
    position: relative;

    width: 100%;
    aspect-ratio: 9 / 16;

    max-height: min(82vh, 820px);

    background: #080808;

    overflow: hidden;
}

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

    display: block;

    object-fit: cover;

    background: #080808;

    cursor: pointer;
}

.video-wrap::after {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            to bottom,
            rgba(0,0,0,.08),
            transparent 28%,
            transparent 55%,
            rgba(0,0,0,.7)
        );
}

/* =========================
   VIDEO TOP
   ========================= */

.video-top {
    position: absolute;

    top: 16px;
    left: 16px;
    right: 16px;

    z-index: 4;

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

    pointer-events: none;
}

.category-badge {
    padding: 7px 11px;

    border-radius: 999px;

    background: rgba(0,0,0,.45);
    backdrop-filter: blur(10px);

    color: #fff;

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

.sound-button {
    width: 38px;
    height: 38px;

    border: 0;
    border-radius: 50%;

    background: rgba(0,0,0,.45);
    backdrop-filter: blur(10px);

    color: #fff;
    font-size: 17px;

    cursor: pointer;

    pointer-events: auto;
}

/* =========================
   PLAY INDICATOR
   ========================= */

.play-indicator {
    position: absolute;

    left: 50%;
    top: 50%;

    z-index: 5;

    transform: translate(-50%, -50%) scale(.8);

    width: 72px;
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(0,0,0,.48);
    backdrop-filter: blur(10px);

    font-size: 28px;

    opacity: 0;
    pointer-events: none;

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

.play-indicator.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* =========================
   ACTIONS
   ========================= */

.actions {
    position: absolute;

    right: 13px;
    bottom: 112px;

    z-index: 6;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action {
    width: 48px;
    min-height: 48px;

    padding: 5px;

    border: 0;
    border-radius: 18px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 2px;

    background: rgba(0,0,0,.46);
    backdrop-filter: blur(12px);

    color: #fff;

    cursor: pointer;

    transition:
        transform .18s ease,
        background .18s ease;
}

.action:hover {
    background: rgba(0,0,0,.68);
}

.action:active {
    transform: scale(.88);
}

.action-icon {
    font-size: 22px;
    line-height: 1;
}

.action-count {
    font-size: 9px;
    font-weight: 700;
    opacity: .9;
}

.action.liked .action-icon {
    color: #ff6680;
    animation: heartPop .3s ease;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.45); }
    100% { transform: scale(1); }
}

/* =========================
   VIDEO INFO
   ========================= */

.video-info {
    position: absolute;

    left: 18px;
    right: 80px;
    bottom: 18px;

    z-index: 6;
}

.author {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 8px;

    font-size: 14px;
    font-weight: 750;
}

.author-avatar {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

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

    font-size: 15px;
}

.caption {
    margin: 0;

    font-size: 15px;
    line-height: 1.4;

    text-shadow: 0 1px 5px rgba(0,0,0,.5);
}

.meta {
    margin-top: 6px;

    color: rgba(255,255,255,.65);

    font-size: 11px;
}

/* =========================
   PROGRESS
   ========================= */

.progress {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 8;

    height: 3px;

    background: rgba(255,255,255,.18);
}

.progress-bar {
    width: 0;
    height: 100%;

    background: #fff;
}

/* =========================
   COMMENTS
   ========================= */

.comments {
    display: none;

    padding: 16px 18px;

    background: #171717;

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

.comments.open {
    display: block;
}

.comments-title {
    margin-bottom: 12px;

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

.comment {
    padding: 8px 0;

    color: #ccc;
    font-size: 13px;
}

.comment strong {
    color: #fff;
}

.comment-form {
    display: flex;
    gap: 8px;

    margin-top: 10px;
}

.comment-input {
    flex: 1;

    min-width: 0;

    padding: 10px 12px;

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

    outline: none;

    background: #222;
    color: #fff;

    font-size: 13px;
}

.comment-input:focus {
    border-color: rgba(255,255,255,.3);
}

.comment-submit {
    border: 0;
    border-radius: 12px;

    padding: 0 14px;

    background: #fff;
    color: #111;

    font-weight: 700;

    cursor: pointer;
}

/* =========================
   LOADER
   ========================= */

.loader {
    display: flex;
    justify-content: center;
    gap: 6px;

    padding: 32px;
}

.loader span {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #666;

    animation: loading 1s infinite ease-in-out;
}

.loader span:nth-child(2) {
    animation-delay: .15s;
}

.loader span:nth-child(3) {
    animation-delay: .3s;
}

@keyframes loading {
    0%, 80%, 100% {
        opacity: .25;
        transform: scale(.8);
    }

    40% {
        opacity: 1;
        transform: scale(1.15);
    }
}

/* =========================
   FOOTER
   ========================= */

footer {
    max-width: 760px;
    margin: 0 auto;

    padding: 28px 20px 40px;

    display: flex;
    justify-content: space-between;
    gap: 20px;

    color: #666;

    font-size: 12px;

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

/* =========================
   MOBILE
   ========================= */

@media (max-width: 650px) {

    .topbar {
        height: 60px;
        padding: 0 12px;
    }

    .brand {
        font-size: 18px;
    }

    .brand-paw {
        font-size: 21px;
    }

    .filters {
        max-width: 68%;
    }

    .filter {
        padding: 7px 9px;
        font-size: 11px;
    }

    main {
        padding: 0 0 60px;
    }

    .intro {
        padding: 44px 20px 30px;
    }

    .intro h1 {
        letter-spacing: -3px;
    }

    .intro p {
        font-size: 14px;
    }

    .feed {
        gap: 18px;
    }

    .feed-card {
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .video-wrap {
        max-height: none;
        height: calc(100vh - 60px);
        aspect-ratio: auto;
    }

    .actions {
        right: 10px;
        bottom: 105px;
    }

    .video-info {
        left: 14px;
        bottom: 17px;
        right: 72px;
    }

    footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* =========================
   REDUCED MOTION
   ========================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}
