@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
}

/* APP */

.app {
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* TOPBAR */

.topbar {
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: #000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ccc;
    margin-left: 10px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* LAYOUT */

.layout {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ÁREA DOS SHORTS */

.shorts-area {
    flex: 1;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

.shorts-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* CARD DO SHORT */

.short-card {
    width: 100%;
    height: calc(100dvh - 58px);
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* CASCA DO VIDEO */

.video-shell {
    position: relative;
    width: 100%;
    height: 100%;
    background: black;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* VIDEO */

.short-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: black;
}

/* OVERLAY */

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.4) 20%,
            rgba(0, 0, 0, 0.1) 40%,
            transparent 60%);
    pointer-events: none;
}

/* GRADIENTE SUPERIOR */

.video-top-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent);
}

/* CONTEÚDO DO VÍDEO */

.video-bottom-content {
    position: absolute;
    left: 16px;
    right: 80px;
    bottom: 20px;
    z-index: 3;
}

/* CREATOR */

.creator-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.creator-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: orange;
}

.creator-meta {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}

.follow-btn {
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

/* CAPTION */

.caption h2 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.2;
}

.caption p {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.4;
}

/* ACTIONS */

.actions-rail {
    position: absolute;
    right: 10px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 5;
}

.action-item {
    border: none;
    background: transparent;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.action-item span {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    backdrop-filter: blur(6px);
}

.action-item small {
    font-size: 11px;
    opacity: 0.9;
}

/* DESKTOP INFO */

.short-info-desktop {
    display: none;
}

/* DESKTOP */

@media (min-width:900px) {

    html,
    body {
        background: #f6f6f6;
        color: #111;
    }

    .shorts-area {
        display: flex;
        justify-content: center;
    }

    .short-card {
        max-width: 480px;
    }

    .video-shell {
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    }

    .short-video {
        object-fit: contain;
        background: black;
    }

    .actions-rail {
        right: -70px;
        color: #111;
    }

    .action-item span {
        background: #eee;
        color: #111;
    }

    .video-bottom-content {
        color: white;
    }

}

.sound-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 8;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.38);
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.video-feedback {
    position: absolute;
    inset: 0;
    z-index: 7;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.video-feedback-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.34);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.video-feedback.show .video-feedback-icon {
    opacity: 1;
    transform: scale(1);
}

/* =========================
DESKTOP FIX (SHORTS STYLE)
=========================*/

@media (min-width: 900px) {

    body {
        background: #f5f5f5;
        overflow: hidden;
    }

    /* centraliza área dos shorts */

    .shorts-area {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        overflow-y: auto;
        padding: 30px 0;
    }

    /* stage central */

    .shorts-stage {
        width: 420px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* cada short */

    .short-card {
        width: 420px;
        height: 740px;
        margin-bottom: 40px;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* container do video */

    .video-shell {
        width: 100%;
        height: 100%;
        border-radius: 18px;
        overflow: hidden;
        background: black;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    }

    /* video */

    .short-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* botões laterais */

    .actions-rail {
        position: absolute;
        right: -75px;
        bottom: 110px;
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .action-item span {
        background: #eeeeee;
        color: #111;
    }

    /* texto */

    .video-bottom-content {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }

    /* topo */

    .topbar {
        background: white;
        color: #111;
        border-bottom: 1px solid #e5e5e5;
    }

    .brand-text {
        color: #111;
    }

    /* botão criar */

    .ghost-btn {
        background: #000;
        color: white;
    }

}