* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    background-color: #000;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

body {
    height: 100vh;
    height: 100dvh;
    width: 100vw;
}

.swipe-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

.video-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    will-change: transform;
}

.video-item {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 0 0 100%;
    background: #000;
    overflow: hidden;
}

.video-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    transition: filter 0.4s ease;
}

.video-fallback {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 80% at 50% 20%, rgba(255, 90, 130, 0.35), transparent 55%),
        linear-gradient(180deg, #1a0a12 0%, #000 100%);
}

.video-item.locked .video-element,
.video-item.locked .video-fallback {
    filter: blur(25px) brightness(0.6);
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%);
    padding: 0 16px calc(20px + env(safe-area-inset-bottom)) 16px;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s;
}

.video-item.locked .video-overlay {
    opacity: 0.3;
}

.action-sidebar {
    position: absolute;
    right: 12px;
    bottom: 22%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    z-index: 20;
    pointer-events: auto;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.action-item:active {
    transform: scale(0.92);
}

.action-icon {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 100px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.action-count {
    font-size: 13px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.sound-control {
    position: fixed;
    top: calc(80px + env(safe-area-inset-top));
    right: 16px;
    z-index: 200;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 40px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.1s;
    pointer-events: auto;
    border: 0.5px solid rgba(255, 255, 255, 0.2);
}

.sound-control:active {
    transform: scale(0.92);
}

.sound-control .material-icons {
    font-size: 24px;
    color: white;
}

.mute-hint-box {
    position: fixed;
    top: calc(135px + env(safe-area-inset-top));
    right: 16px;
    z-index: 210;
    background: #ff3b6f;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 59, 111, 0.4);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mute-hint-box::after {
    content: "";
    position: absolute;
    top: -6px;
    right: 16px;
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent #ff3b6f transparent;
}

.progress-container {
    position: absolute;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 16px;
    right: 16px;
    z-index: 30;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    height: 4px;
    cursor: pointer;
    pointer-events: auto;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #ff3b6f;
    border-radius: 4px;
}

.video-info {
    pointer-events: auto;
    margin-bottom: 12px;
}

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

.avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #ff8a5c, #ff4d6d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.author-name {
    font-weight: 700;
    font-size: 16px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.follow-btn {
    background: #ff3b6f;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    margin-left: auto;
    cursor: pointer;
    border: none;
}

.caption {
    font-size: 15px;
    font-weight: 500;
    color: white;
    margin-bottom: 6px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

.music {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: 40px;
    width: fit-content;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.music .material-icons {
    font-size: 16px;
}

.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #000;
    padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.banner-title {
    font-weight: 700;
    font-size: 16px;
    color: white;
    letter-spacing: 0.5px;
}

.banner-download-btn {
    background: #ff3b6f;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.custom-modal.show {
    display: flex;
}

.custom-modal-content {
    width: 85%;
    max-width: 320px;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    animation: fadeInScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeInScale {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-icon-container {
    margin-bottom: 16px;
}

.modal-icon-container .material-icons {
    font-size: 48px;
    color: #ff3b6f;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.modal-title {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-bottom: 24px;
    line-height: 1.4;
}

.countdown-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    height: 6px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

.countdown-loader {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff3b6f, #ff7a00);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 59, 111, 0.5);
}

.swipe-hint {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 12px;
    color: white;
    z-index: 15;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.9;
    transition: opacity 0.5s ease;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
    .action-icon {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .action-sidebar {
        gap: 22px;
        right: 10px;
        bottom: 25%;
    }

    .sound-control {
        top: calc(70px + env(safe-area-inset-top));
        right: 12px;
        padding: 8px;
    }

    .sound-control .material-icons {
        font-size: 20px;
    }

    .mute-hint-box {
        top: calc(120px + env(safe-area-inset-top));
        right: 12px;
    }
}
