/* ---------- RESET ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    background: #000;
    font-family: Arial, sans-serif;
    overflow: hidden; /* 🔥 required for swipe engine */
}

/* ---------- CONTAINER ---------- */
#clips-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* ---------- CLIP ---------- */
.clip {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    background: #000;
}

/* ---------- VIDEO ---------- */
video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* keeps full video visible */
    background: #000;
}

/* ---------- ACTION BUTTONS ---------- */
.actions {
    position: absolute;
    right: 12px;
    bottom: 100px;

    display: flex;
    flex-direction: column;
    gap: 22px;

    z-index: 10;
}

.action-btn {
    color: #fff;
    font-size: 28px;
    text-align: center;
    cursor: pointer;
    user-select: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;

    transition: transform 0.15s ease;
}

.action-btn:active {
    transform: scale(1.15);
}

/* like/dislike count */
.counter {
    font-size: 14px;
    color: #fff;
}

/* ---------- VIDEO INFO ---------- */
.info {
    position: absolute;
    left: 12px;
    bottom: 90px;
    color: #fff;
    z-index: 10;
    max-width: 75%;
}

/* channel name */
.channel {
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
}

.channel:hover {
    text-decoration: underline;
}

/* title */
.title {
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
}

/* ---------- COMMENTS OVERLAY ---------- */
.comments-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
}

/* panel */
.comments-panel {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 65%;

    background: rgba(0,0,0,0.95);
    color: #fff;

    border-top-left-radius: 16px;
    border-top-right-radius: 16px;

    padding: 15px;
    overflow-y: auto;

    z-index: 1000;

    transform: translateY(100%);
    transition: transform 0.25s ease;
}

/* open state */
.comments-panel.open {
    transform: translateY(0);
}

/* comment item */
.comments-panel div {
    margin-bottom: 12px;
    border-bottom: 1px solid #222;
    padding-bottom: 6px;
}

/* username */
.comments-panel b {
    color: #fff;
}

/* timestamp */
.comments-panel span {
    color: #aaa;
    font-size: 12px;
}

/* ---------- SCROLLBAR (OPTIONAL CLEANUP) ---------- */
.comments-panel::-webkit-scrollbar {
    width: 6px;
}

.comments-panel::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

/* ---------- MOBILE OPTIMISATIONS ---------- */
@media (max-width: 700px) {

    .actions {
        right: 8px;
        bottom: 90px;
    }

    .action-btn {
        font-size: 26px;
    }

    .title {
        font-size: 16px;
    }
}

/* ---------- SMALL POLISH ---------- */

/* prevent blue tap highlight on mobile */
* {
    -webkit-tap-highlight-color: transparent;
}

/* smoother transforms */
.clip {
    will-change: transform;
}
