* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", sans-serif;
    background: #ffffff;
    color: #0e0e1a;
}

a {
    text-decoration: none;
    color: inherit;
}

.topbar {
    height: 86px;
    padding: 12px 24px;
    border-bottom: 1px solid #eee;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    min-width: 1px;
}

.logo-link {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-link img {
    height: 62px;
    width: auto;
    display: block;
}

.topbar-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.upload-btn,
.login-btn {
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}

.upload-btn {
    background: #f7f7f7;
    color: #0e0e1a;
    border: 1px solid #e6e6e6;
}

.login-btn {
    background: #ff4d6d;
    color: #fff;
}

.page {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 24px 80px;
}

.category-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    padding-bottom: 24px;
    margin-bottom: 8px;
}

.category-row button {
    white-space: nowrap;
    background: #f7f7f7;
    border: 1px solid #eee;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

.category-row button:hover {
    border-color: #ff4d6d;
}

.video-feed {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 20px;
}

.video-card {
    cursor: pointer;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail span {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.82);
    color: white;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 8px;
    border-radius: 6px;
}

.video-card h3 {
    font-size: 16px;
    line-height: 1.3;
    margin: 12px 0 6px;
}

.video-card p {
    color: #777;
    font-size: 13px;
    font-weight: 700;
}

.modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999;
}

.modal {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 28px;
    border-radius: 18px;
    text-align: center;
}

.modal h2 {
    margin-bottom: 8px;
}

.modal p {
    color: #555;
    margin-bottom: 18px;
}

.modal input {
    width: 100%;
    padding: 13px;
    border: 1px solid #ccc;
    border-radius: 9px;
    margin-bottom: 12px;
    font-size: 15px;
}

.modal button {
    width: 100%;
    background: #ff4d6d;
    color: white;
    border: none;
    padding: 13px;
    border-radius: 9px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 8px;
}

.modal .close-btn {
    background: transparent;
    color: #777;
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .video-feed {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .topbar {
        grid-template-columns: auto 1fr auto;
        padding: 10px 16px;
    }

    .logo-link {
        justify-content: flex-start;
        padding-left: 8px;
    }

    .logo-link img {
        height: 50px;
    }

    .page {
        padding: 20px 16px 60px;
    }

    .video-feed {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 14px;
    }

    .upload-btn,
    .login-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .topbar {
        grid-template-columns: 1fr;
        gap: 12px;
        height: auto;
        padding: 12px 16px;
    }

    .topbar-left {
        display: none;
    }

    .logo-link {
        justify-content: center;
        padding-left: 0;
    }

    .topbar-right {
        justify-content: center;
    }

    .logo-link img {
        height: 46px;
    }

    .video-feed {
        grid-template-columns: 1fr;
    }

    .category-row {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
}