.icon { display: inline-flex; align-items: center; justify-content: center; }
.icon svg { display: block; }

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

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

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

.video-track {
    position: relative;
    width: 100%;
    height: 100%;
    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%;
    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-item.locked .video-element {
    filter: blur(25px) brightness(0.6);
}

.video-item.countdown-background .video-element {
    filter: blur(14px) brightness(0.55);
    transform: scale(1.04);
}

.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 20px 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);
    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);
    transition: all 0.2s;
}

.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: 80px;
    right: 16px;
    z-index: 200;
    background: rgba(0,0,0,0.6);
    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 .icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.progress-container {
    position: absolute;
    bottom: 8px;
    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;
    position: relative;
}

.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);
}

.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #000000;
    padding: 12px 16px;
    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;
}

#loadingOverlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.38);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    transition: opacity 0.6s ease;
    padding: 18px;
    pointer-events: none;
}

#loadingOverlay.active {
    display: flex;
}

#loadingOverlay.fade-out {
    opacity: 0;
}

.loading-card {
    position: relative;
    width: min(400px, 90vw);
    padding: clamp(36px, 7vh, 50px) clamp(20px, 6vw, 38px) 40px;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 32px;
    overflow: hidden;
    text-align: center;
    background: linear-gradient(145deg, rgba(15, 14, 24, 0.62), rgba(7, 7, 12, 0.52));
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    backdrop-filter: blur(18px) saturate(135%);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.58),
        inset 0 1px 1px rgba(255, 255, 255, 0.075);
}

.loading-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(39, 225, 255, 0.025), transparent 35%, transparent 65%, rgba(254, 44, 85, 0.035));
}

.loading-logo {
    font-size: clamp(25px, 7vw, 40px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 3px;
    white-space: nowrap;
}

.loading-logo span {
    background: linear-gradient(90deg, #fff, #7c5cff, #27e1ff, #fe2c55, #fff);
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: loadingShine 6s linear infinite;
}

@keyframes loadingShine {
    to { background-position: 300% center; }
}

.loading-tag {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    letter-spacing: 1px;
}

.loading-circle {
    position: relative;
    width: 124px;
    height: 124px;
    margin: 34px auto 28px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.025);
}

.loading-circle::before,
.loading-circle::after {
    content: "";
    position: absolute;
    border-radius: inherit;
    pointer-events: none;
}

.loading-circle::before {
    inset: -3px;
    border: 2px solid transparent;
    border-top-color: #fe2c55;
    border-right-color: #27e1ff;
    filter: drop-shadow(0 0 7px rgba(39, 225, 255, 0.58));
    animation: loadingSpin 1.15s cubic-bezier(0.55, 0.055, 0.675, 0.19) infinite;
}

.loading-circle::after {
    inset: 12px;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.08), transparent 70%);
    filter: blur(2px);
}

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

#loadNum {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    font-size: 39px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1.5px;
    color: #fff;
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.28);
}

.loading-bar {
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.065);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.55);
}

.loading-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c5cff, #27e1ff, #fe2c55);
    background-size: 200% auto;
    box-shadow: 0 0 9px rgba(39, 225, 255, 0.55);
    transition: width 90ms linear;
    animation: loadingFlow 1.8s linear infinite;
}

@keyframes loadingFlow {
    to { background-position: 200% center; }
}

@media (max-height: 610px) {
    .loading-card { padding-block: 27px 25px; }
    .loading-circle { width: 108px; height: 108px; margin-block: 22px 19px; }
    #loadNum { font-size: 34px; }
}

.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);
    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: 70px; right: 12px; padding: 8px; }
    .sound-control .icon svg { width: 20px; height: 20px; }
}
