* {
    box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --text: #07051f;
    --muted: #706d86;
    --line: #eeeeF4;
    --soft: #f7f7fb;
    --pink: #ea4c89;
    --pink-dark: #d93673;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(7, 5, 31, .10);
}

body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 22px 46px;
    background: rgba(255, 255, 255, .90);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(230, 230, 240, .70);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 24px;
    letter-spacing: -1px;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: white;
    background: linear-gradient(135deg, #07051f, var(--pink));
    border-radius: 14px;
    box-shadow: 0 12px 25px rgba(234, 76, 137, .35);
}

.search {
    display: flex;
    flex: 1;
    max-width: 680px;
    background: var(--soft);
    border-radius: 999px;
    padding: 8px;
    margin-left: 10px;
}

.search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 18px;
    font-size: 15px;
}

.search button,
.btn {
    border: 0;
    background: var(--pink);
    color: #fff;
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

.search button:hover,
.btn:hover {
    background: var(--pink-dark);
    transform: translateY(-1px);
}

.nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    font-weight: 800;
}

.nav a:hover,
.link-btn:hover {
    color: var(--pink);
}

.hero {
    text-align: center;
    padding: 78px 20px 48px;
}

.hero-badge {
    display: inline-flex;
    padding: 9px 15px;
    border-radius: 999px;
    background: #fff1f7;
    color: var(--pink-dark);
    font-weight: 900;
    font-size: 13px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(42px, 6vw, 72px);
    line-height: .95;
    letter-spacing: -3px;
    margin: 0 0 18px;
}

.hero p {
    margin: 0 auto;
    max-width: 760px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.65;
}

.container {
    width: min(1680px, calc(100% - 80px));
    margin: 0 auto 60px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-head h2 {
    margin: 0 0 5px;
    font-size: 28px;
    letter-spacing: -1px;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.clear {
    color: var(--pink);
    font-weight: 900;
}

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

.card {
    border-radius: 20px;
}

.cover-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 4 / 3;
    background: var(--soft);
    box-shadow: 0 0 0 1px var(--line);
}

.cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: .35s ease;
}

.play {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translate(-50%, 16px);
    opacity: 0;
    background: rgba(7, 5, 31, .86);
    color: white;
    padding: 11px 16px;
    border-radius: 999px;
    font-weight: 900;
    backdrop-filter: blur(10px);
    transition: .25s ease;
}

.cover-wrap:hover .cover {
    transform: scale(1.06);
    filter: brightness(.75);
}

.cover-wrap:hover .play {
    transform: translate(-50%, 0);
    opacity: 1;
}

.card-body {
    padding: 14px 2px 0;
}

.meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff1f7;
    color: var(--pink);
    font-weight: 900;
    flex: 0 0 auto;
}

.meta h3 {
    margin: 0;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.desc {
    color: var(--muted);
    margin: 10px 0 0 44px;
    line-height: 1.5;
    font-size: 14px;
}

.empty {
    border: 1px dashed #dedbea;
    background: var(--soft);
    border-radius: 24px;
    padding: 45px;
    text-align: center;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    width: min(1680px, calc(100% - 80px));
    margin: 0 auto;
    padding: 34px 0 50px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

/* Admin */
.admin-page {
    background: #fafafb;
}

.admin-container {
    width: min(1300px, calc(100% - 40px));
    margin: 36px auto 70px;
}

.login-box,
.panel {
    background: white;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 26px;
    padding: 28px;
}

.login-box {
    max-width: 480px;
    margin: 90px auto;
}

.login-box h1,
.panel h1,
.panel h2 {
    margin-top: 0;
    letter-spacing: -1px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 26px;
    align-items: start;
}

label {
    display: block;
    margin: 15px 0 7px;
    font-weight: 900;
    font-size: 14px;
}

input,
textarea {
    width: 100%;
    border: 1px solid #deddea;
    border-radius: 15px;
    padding: 14px 14px;
    font: inherit;
    outline: 0;
    background: #fff;
}

input:focus,
textarea:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 4px rgba(234, 76, 137, .10);
}

textarea {
    min-height: 92px;
    resize: vertical;
}

.full {
    width: 100%;
    margin-top: 18px;
}

.alert {
    padding: 13px 15px;
    border-radius: 15px;
    margin: 15px 0;
    font-weight: 800;
}

.success {
    background: #eafff3;
    color: #0a7a42;
}

.error {
    background: #fff0f0;
    color: #b41126;
}

.inline-form {
    margin: 0;
}

.link-btn {
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.admin-list {
    display: grid;
    gap: 14px;
}

.admin-item {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.admin-item summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px;
    font-weight: 900;
}

.admin-item summary img {
    width: 72px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--soft);
}

.edit-form,
.admin-item form:not(.edit-form) {
    padding: 0 16px 16px;
}

.danger {
    border: 0;
    background: #171426;
    color: #fff;
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 900;
    cursor: pointer;
}

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

    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .topbar {
        padding: 16px;
        flex-wrap: wrap;
    }

    .search {
        order: 3;
        max-width: none;
        flex-basis: 100%;
        margin-left: 0;
    }

    .nav {
        gap: 12px;
    }

    .container,
    .footer {
        width: min(100% - 28px, 1680px);
    }

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

    .hero {
        padding: 48px 18px 36px;
    }
}

@media (max-width: 560px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-direction: column;
    }
}