body {
    background: #020617;
}

.shorts-page {
    width: 100%;
    min-height: 100dvh;
    background:
        radial-gradient(circle at 15% 10%, rgba(220, 38, 38, 0.18), transparent 32%),
        radial-gradient(circle at 85% 90%, rgba(37, 99, 235, 0.16), transparent 35%),
        #020617;
    display: grid;
    grid-template-columns: minmax(360px, 450px) 300px;
    justify-content: center;
    align-items: start;
    gap: 24px;
    padding: 24px;
}

.shorts-device {
    width: 100%;
    height: calc(100dvh - 48px);
    min-height: 680px;
    background: #020617;
    border-radius: 36px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
    position: relative;
}

.shorts-content {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000000;
}

.shorts-topbar {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.shorts-topbar h1 {
    margin: 0;
    color: #ffffff;
    font-size: 26px;
    font-weight: 950;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.shorts-top-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.36);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    pointer-events: auto;
}

.shorts-top-btn ion-icon {
    font-size: 23px;
}

.shorts-list {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    background: #000000;
}

.shorts-list::-webkit-scrollbar {
    display: none;
}

.short-reel {
    width: 100%;
    height: 100%;
    min-height: 100%;
    position: relative;
    background: #000000;
    overflow: hidden;
    scroll-snap-align: start;
}

.short-video-layer {
    position: absolute;
    inset: 0;
    background: #000000;
}

.short-video-layer video,
.short-video-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000000;
}

.short-video-letterbox {
    position: absolute;
    inset: 0;
    background: #000000;
}

.short-video-letterbox video,
.short-video-letterbox img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000000;
}

.short-top-dark {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 190px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent);
    pointer-events: none;
    z-index: 3;
}

.short-bottom-dark {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 260px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), transparent);
    pointer-events: none;
    z-index: 3;
}

.short-logo-watermark {
    position: absolute;
    right: 16px;
    top: 92px;
    z-index: 12;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 4px;
    object-fit: cover;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.short-headline-block {
    position: absolute;
    left: 18px;
    right: 82px;
    bottom: 270px;
    z-index: 18;
    display: grid;
    gap: 5px;
    align-items: start;
    justify-items: start;
}

.headline-fixed {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #0f172a;
    padding: 5px 9px;
    font-size: 24px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.headline-fixed .headline-emoji {
    font-size: 24px;
}

.headline-line {
    display: inline;
    width: fit-content;
    max-width: 100%;
    padding: 4px 8px;
    font-size: 22px;
    line-height: 1.24;
    font-weight: 950;
    letter-spacing: -0.25px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    text-shadow: none;
}

.headline-line.red {
    background: #b91c1c;
    color: #ffffff;
}

.headline-line.white {
    background: #ffffff;
    color: #111827;
}

.short-right-rail {
    position: absolute;
    right: 13px;
    bottom: 152px;
    z-index: 20;
    display: grid;
    gap: 17px;
    justify-items: center;
}

.rail-action {
    border: 0;
    background: transparent;
    color: #ffffff;
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 0;
    min-width: 52px;
    text-shadow: 0 2px 9px rgba(0, 0, 0, 0.75);
}

.rail-action ion-icon {
    font-size: 34px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.72));
}

.rail-action span {
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.rail-action.active ion-icon {
    color: #ef4444;
}

.short-bottom-info {
    position: absolute;
    left: 18px;
    right: 78px;
    bottom: 78px;
    z-index: 18;
    color: #ffffff;
}

.short-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.short-author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.55);
    flex: 0 0 auto;
}

.short-author-fallback {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.short-author-name {
    color: #ffffff;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 9px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.short-verified {
    color: #38bdf8;
    font-size: 17px;
    flex: 0 0 auto;
}

.short-follow-pill {
    border: 1px solid rgba(255, 255, 255, 0.72);
    color: #ffffff;
    background: rgba(0, 0, 0, 0.20);
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 950;
}

.short-caption {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 700;
    text-shadow: 0 2px 9px rgba(0, 0, 0, 0.82);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.short-comment-input-trigger {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    z-index: 21;
    min-height: 54px;
    border: 0;
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.92);
    color: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
    font-size: 17px;
    font-weight: 650;
    backdrop-filter: blur(14px);
}

.short-sound-toggle {
    position: absolute;
    right: 16px;
    top: 160px;
    z-index: 15;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.short-sound-toggle ion-icon {
    font-size: 22px;
}

.shorts-state-box {
    width: 100%;
    height: 100%;
    min-height: 680px;
    background: #020617;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 24px;
}

.shorts-state-box ion-icon {
    font-size: 58px;
}

.shorts-state-box h2 {
    margin: 0;
    font-size: 23px;
}

.shorts-state-box p {
    margin: 0;
    color: #cbd5e1;
    font-weight: 700;
}

.shorts-state-box button,
.shorts-state-box a {
    border: 0;
    background: #dc2626;
    color: #ffffff;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 950;
    margin-top: 10px;
}

.light-loader {
    border-color: rgba(255, 255, 255, 0.28);
    border-top-color: #ffffff;
}

.shorts-desktop-panel {
    position: sticky;
    top: 24px;
}

.shorts-side-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 30px;
    padding: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.shorts-side-card img {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.shorts-side-card h2 {
    margin: 16px 0 8px;
    color: #0f172a;
    font-size: 22px;
    line-height: 1.22;
}

.shorts-side-card p {
    margin: 0 0 16px;
    color: #64748b;
    line-height: 1.55;
    font-size: 14px;
    font-weight: 700;
}

.shorts-side-link {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 16px;
    background: #f8fafc;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    margin-top: 9px;
    font-size: 14px;
    font-weight: 900;
}

.shorts-side-link:hover {
    background: #fee2e2;
    color: #dc2626;
}

.short-comment-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    opacity: 0;
    pointer-events: none;
    transition: 0.22s ease;
}

.short-comment-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.short-comment-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.62);
}

.short-comment-sheet {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(100%, 450px);
    max-height: 78dvh;
    transform: translate(-50%, 100%);
    background: #ffffff;
    border-radius: 28px 28px 0 0;
    padding: 10px 16px 16px;
    display: flex;
    flex-direction: column;
    transition: 0.24s ease;
}

.short-comment-modal.visible .short-comment-sheet {
    transform: translate(-50%, 0);
}

.short-sheet-handle {
    width: 46px;
    height: 5px;
    border-radius: 99px;
    background: #cbd5e1;
    margin: 0 auto 12px;
}

.short-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.short-comment-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 19px;
    font-weight: 950;
}

.short-comment-header p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
    max-width: 310px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.short-comment-header button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.short-comment-header button ion-icon {
    font-size: 22px;
}

.short-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 14px 0;
}

.short-comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 13px;
}

.short-comment-avatar {
    width: 39px;
    height: 39px;
    border-radius: 999px;
    object-fit: cover;
    background: #e5e7eb;
    flex: 0 0 auto;
}

.short-comment-avatar.fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #dc2626;
}

.short-comment-bubble {
    flex: 1;
    background: #f1f5f9;
    border-radius: 18px;
    padding: 10px 12px;
}

.short-comment-bubble strong {
    display: block;
    color: #0f172a;
    font-size: 13.5px;
    font-weight: 950;
    margin-bottom: 4px;
}

.short-comment-bubble p {
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 650;
}

.short-comment-bubble span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
    margin-top: 5px;
}

.short-comment-empty {
    text-align: center;
    color: #64748b;
    padding: 28px 14px;
    font-weight: 750;
}

.short-comment-empty ion-icon {
    display: block;
    margin: 0 auto 8px;
    color: #dc2626;
    font-size: 36px;
}

.short-comment-form {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.short-comment-form textarea {
    flex: 1;
    resize: none;
    min-height: 46px;
    max-height: 110px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
    color: #0f172a;
    outline: 0;
    padding: 12px 14px;
    font-weight: 750;
}

.short-comment-form button {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.short-comment-form button ion-icon {
    font-size: 21px;
}

@media (max-width: 900px) {
    .shorts-page {
        display: block;
        padding: 0;
        background: #000000;
    }

    .shorts-device {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .shorts-desktop-panel {
        display: none;
    }

    .shorts-state-box {
        min-height: 100dvh;
    }

    .shorts-topbar {
        top: calc(env(safe-area-inset-top, 0px) + 14px);
    }
}

@media (max-width: 520px) {
    .short-logo-watermark {
        top: 88px;
        right: 14px;
        width: 54px;
        height: 54px;
    }

    .short-sound-toggle {
        top: 150px;
        right: 14px;
    }

    .short-headline-block {
        left: 18px;
        right: 78px;
        bottom: 265px;
    }

    .headline-fixed {
        font-size: 22px;
        padding: 5px 9px;
    }

    .headline-line {
        font-size: 19px;
        line-height: 1.28;
        padding: 4px 8px;
    }

    .short-right-rail {
        right: 10px;
        bottom: 150px;
        gap: 15px;
    }

    .rail-action ion-icon {
        font-size: 33px;
    }

    .rail-action span {
        font-size: 11.5px;
    }

    .short-bottom-info {
        left: 18px;
        right: 75px;
        bottom: 79px;
    }

    .short-author-name {
        font-size: 17px;
    }

    .short-caption {
        font-size: 15.5px;
    }

    .short-comment-input-trigger {
        min-height: 52px;
        font-size: 16px;
    }
}

@media (max-height: 740px) {
    .short-headline-block {
        bottom: 235px;
    }

    .short-right-rail {
        bottom: 128px;
        gap: 12px;
    }

    .rail-action ion-icon {
        font-size: 30px;
    }

    .short-bottom-info {
        bottom: 70px;
    }

    .short-comment-input-trigger {
        min-height: 48px;
        bottom: 12px;
    }

    .headline-fixed {
        font-size: 20px;
    }

    .headline-line {
        font-size: 17px;
    }
}
