html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: "TikTok Sans", sans-serif;
    background: black;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -ms-user-select: none;
    touch-action: pan-x pan-y;
}

header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9;
    margin: 0 auto;
}

header > div {
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 30px;
    box-sizing: border-box;
    background: linear-gradient(to bottom, rgba(0,0,0,1), transparent);
}

header > div > img {
    display: block;
    height: 30px;
}

header > div > button {
    background: none;
    border: none;
    color: white;
    font-size: 1.4em;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 !important;
}

input, select {
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: rgba(68,68,68,0.5);
    color: white;
    font-size: 1em;
    cursor: pointer;
    outline: none;
    user-select: none;
    appearance: none;
    box-sizing: border-box;
}

p {
    margin: 0;
    padding: 0;
}

p > i {
    opacity: 0.5;
    margin-right: 6px;
}

.menu-content {
    padding: 20px;
}

.menu-content h3 {
    margin-top: 0;
}

.btn-guardar {
    width: 100%;
    margin: 20px 0 0 0;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #444;
    color: white;
    font-size: 1em;
    cursor: pointer;
    outline: none;
    user-select: none;
}

.fichas {
    height: 100%;
    overflow: hidden;
    scrollbar-width: none;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    overscroll-behavior-y: contain;
    position: relative;
}

.fichas::-webkit-scrollbar {
    display: none;
}

.ficha {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    will-change: transform, opacity;
    background: black;
}

.ficha.onboarding-swipe {
    animation: onboardingSwipeHint 1.05s ease-in-out;
}

@keyframes onboardingSwipeHint {
    0% { transform: translate3d(0, 0, 0); }
    22% { transform: translate3d(0, -24px, 0); }
    48% { transform: translate3d(0, -24px, 0); }
    72% { transform: translate3d(0, 10px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

.media-container {
    display: flex;
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.media-slider {
    position: relative;
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
}

.media-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(18,18,18,0.22) 0%, rgba(0,0,0,0.58) 100%);
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.media-loading.visible {
    opacity: 1;
}

.media-loading-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255,255,255,0.25);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.media-container::-webkit-scrollbar {
    display: none;
}

.media-container img {
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
    object-fit: cover;
    scroll-snap-align: start;
    flex-shrink: 0;
    filter: contrast(1.2) saturate(1.3) brightness(0.95);
    pointer-events: none;
    position: relative;
}

.info {
    position: absolute;
    bottom: 0;
    width: 100%;
    color: white;
    padding: 40px 30px;
    box-sizing: border-box;
    z-index: 3;
    pointer-events: none;
}

.info {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.info.hidden {
    opacity: 0;
    pointer-events: none;
}

.info h2, .info p {
    margin: 4px 0;
    line-height: 1.2;
}

.info h2 {
    display: flex;
    justify-content: left;
    align-items: center;
}

.info button {
    pointer-events: auto;
}

.foto-u {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: left;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.btn-whatsapp {
    flex: 1;
    padding: 14px;
    margin-top: 10px;
    background: #25d366;
    border: none;
    color: black !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1em;
    border-radius: 10px;
    cursor: pointer;
    outline: none;
    user-select: none;
}

.btn-whatsapp:focus {
    outline: none;
}

.btn-call {
    text-align: center;
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: orange;
    border: none;
    color: black !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 1em;
    border-radius: 10px;
    cursor: pointer;
    outline: none;
    user-select: none;
}

.btn {
    width: 100% !important;
}

.btn-favorito {
    width: auto;
    min-width: 0;
    height: auto;
    margin-top: 10px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    padding: 0 4px;
}

.btn-favorito.is-active {
    color: #ff4458;
}

.btn-more {
    width: 54px;
    min-width: 54px;
    padding: 14px;
    margin-top: 10px;
    background: #444;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 1em;
    border-radius: 10px;
    cursor: pointer;
    outline: none;
    user-select: none;
}

.btn-more.is-active {
    background: rgba(255,255,255,0.18);
}

.btn-menu.has-items {
    color: #ff4458;
}

#verFavoritosBtn:disabled {
    opacity: 0.45;
    cursor: default;
}

.favoritos-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    background: black;
    padding: 30px;
    box-sizing: border-box;
}

.favoritos-empty-box {
    width: 100%;
    max-width: 320px;
    background: rgba(20,20,20,0.92);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 26px 22px;
    text-align: center;
    color: white;
}

.favoritos-empty-box > i {
    font-size: 2.2em;
    color: #ff4458;
    margin-bottom: 12px;
}

.favoritos-empty-box > p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.favoritos-empty-box .btn-guardar {
    margin-top: 18px;
}

.feed-toast {
    position: fixed;
    left: 50%;
    top: 118px;
    width: calc(100% - 60px);
    max-width: 440px;
    text-align: center;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(18,18,18,0.52);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    color: white;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.2;
    z-index: 10010;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.feed-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.feed-swipe-hint {
    position: fixed;
    top: 118px;
    left: 50%;
    width: calc(100% - 60px);
    max-width: 440px;
    box-sizing: border-box;
    justify-content: center;
    transform: translateX(-50%) translateY(-10px);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(18,18,18,0.52);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    color: white;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    z-index: 10010;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.feed-swipe-hint.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.mode-transition {
    position: fixed;
    top: 118px;
    left: 50%;
    width: calc(100% - 60px);
    max-width: 440px;
    box-sizing: border-box;
    text-align: center;
    transform: translateX(-50%) translateY(-10px) scale(0.98);
    background: rgba(18,18,18,0.52);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    color: white;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    z-index: 10010;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.mode-transition.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.overlay-bottom {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 400px;
    background: linear-gradient(to top, rgba(0,0,0,1), transparent);
    pointer-events: none;
    z-index: 2;
    transition: height 0.4s ease;
}

.overlay-bottom.expand {
    height: 700px;
}

.fotos {
    font-size: 14px;
    line-height: 14px;
    width: 68px;
    background-color: rgba(0,0,0,0.5);
    border-radius: 8px;
    padding: 4px 8px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fotos > i {
    opacity: 0.5;
}

.foto-user {
    border-radius: 50%;
    width: 30px;
    height: 30px;
    object-fit: cover;
    padding: 2px;
    border: 2px solid rgba(255,255,255,0.5);
    margin-right: 6px;
}

.acciones {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.nombre {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.info-ciudad {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
    margin-right: 10px;
}

#globalLoader {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    background-color: transparent;
}

.extra-info {
    max-height: 0;
    overflow-y: hidden;
    transition: max-height 0.4s ease;
    display: flex;
    flex-direction: column; 
    justify-content: flex-start;
    white-space: pre-line;
    margin: 10px 0;
    color: #fff;
    font-size: 14px !important;
    word-wrap: break-word;
}

.extra-info.open {
    max-height: 200px;
    overflow-y: scroll;
    scrollbar-width: none;
    pointer-events: auto !important;
}

.extra-info.open::-webkit-scrollbar {
    display: none;
}

iframe {
    width: 100% !important;
    height: 200px !important;
    display: none;
}

.info-ubi {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-media {
    display: flex;
    justify-content: end;
    align-items: center;
}

.fecha-publicacion {
    width: 100% !important;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    margin-bottom: 10px !important;
    display: flex;
    justify-content: start;
    align-items: center;
}

.fecha-publicacion > span {
    margin-right: 6px;
}

.ne {
    font-weight: 700;
    margin: 20px 0;
}

.filtro-hint {
    position: fixed;
    top: 36px;
    right: 50px;
    background: linear-gradient(to right, rgba(255,99,71,0.4) 0%, rgba(255,99,71,0) 100%);
    color: #fff;
    padding: 10px 15px 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 9999;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-weight: 700;
}

.filtro-hint.visible {
    opacity: 1;
    pointer-events: auto;
}

.filtro-hint > i {
    opacity: 0.5;
    margin-right: 6px;
}

.encabezado {
    width: 100%;
    position: absolute;
    bottom: 20px;
    left: 0;
    font-size: 10px;
    color: rgba(200,200,200,1);
    text-align: center;
}

.reciente {
    font-size: 12px;
    font-weight: 700;
    color: white;
    background-color: tomato;
    border-radius: 8px;
    padding: 4px 8px;
    margin-left: 10px;
}

.tipo {
    font-size: 9px;
    font-weight: 300;
    color: white;
    background-color: transparent;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 2px 8px;
    margin-left: 10px;
    box-sizing: border-box;
}

.videos {
    margin-right: 10px;
    font-size: 26px;
    line-height: 26px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto !important;
}

.videos > a > i {
    color: white !important;
    text-decoration: none !important;
}

button, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-appearance: none;
    appearance: none;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: none;
}

button {
    background-color: transparent;
    -webkit-appearance: none;
}

a, button {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

button, select, input, textarea, label {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

dialog#menuDialog {
    border: none;
    padding: 0;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    height: 400px;
    text-align: center;
    user-select: none;
    overflow: hidden;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.menu-layout {
    display: flex;
    width: 100%;
    height: 100%; /* igual al height de dialog */
}

.menu-lateral {
    width: 20%;
    background: #111;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    height: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    overflow: hidden;
    position: relative;
}

.menu-lateral .btn-menu {
    background: none;
    border: none;
    color: rgba(255,255,255,0.72);
    padding: 1rem 0;
    text-align: center;
    cursor: pointer;
    font-size: clamp(24px, 4vw, 34px);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.menu-lateral .btn-menu[data-view="favoritos"].has-items {
    color: rgba(255,255,255,0.92);
}

.menu-lateral .btn-menu[data-view="favoritos"].active.has-items {
    color: white;
    background: transparent;
}

.menu-contenido {
    width: 80%;
    padding: 2rem;
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
}

.tit {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.favoritos-copy {
    text-align: left;
    line-height: 1.4;
    color: rgba(255,255,255,0.82);
    margin-bottom: 20px;
}
