/* Video Upload & My Videos Styles */

.upload-container, .videos-container {
    padding: 16px 16px calc(76px + env(safe-area-inset-bottom, 0px)) 16px;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #444;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background-color: #1a1a1a;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}

.video-preview-container {
    width: 100%;
    max-width: 270px;
    aspect-ratio: 9 / 16;
    background: radial-gradient(circle at center, #1b212f 0%, #0a0d14 100%);
    border-radius: 18px;
    overflow: hidden;
    margin: 0 auto 12px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1.5px solid rgba(0, 255, 204, 0.3);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 255, 204, 0.12);
    user-select: none;
    cursor: pointer;
}

#video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
    border-radius: 16px;
    display: block;
}

.preview-center-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 64px;
    height: 64px;
    background: rgba(10, 14, 23, 0.82);
    border: 2px solid rgba(0, 255, 204, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00ffcc;
    font-size: 1.8rem;
    pointer-events: none;
    z-index: 12;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.75), 0 0 20px rgba(0, 255, 204, 0.45);
}

.preview-center-play-overlay.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
}

.preview-center-play-overlay.show-permanent {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.preview-top-duration-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(14, 14, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Custom Interactive Bottom Control Bar */
.preview-control-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.65) 55%, transparent 100%);
    padding: 22px 12px 10px 12px;
    z-index: 15;
    display: flex;
    flex-direction: column;
    gap: 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

.preview-scrub-wrap {
    position: relative;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    cursor: pointer;
    transition: height 0.18s ease;
}

.preview-scrub-wrap:hover {
    height: 7px;
}

.preview-scrub-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff0050, #00f2fe);
    border-radius: 10px;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.7);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.preview-scrub-handle {
    width: 11px;
    height: 11px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.9), 0 2px 4px rgba(0,0,0,0.5);
    margin-right: -5.5px;
    transform: scale(0.9);
    transition: transform 0.15s ease;
}

.preview-scrub-wrap:hover .preview-scrub-handle {
    transform: scale(1.25);
}

.preview-scrub-input {
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 26px;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    z-index: 2;
}

.preview-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
}

.preview-ctrl-left, .preview-ctrl-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-ctrl-btn {
    border: none;
    outline: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.preview-ctrl-btn *, .preview-center-play-overlay * {
    pointer-events: none;
}

/* Play/Pause Button - Prominent Glowing Accent */
.preview-play-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.25), rgba(0, 242, 254, 0.15));
    border: 1.5px solid rgba(0, 255, 204, 0.55);
    color: #00ffcc;
    box-shadow: 0 0 14px rgba(0, 255, 204, 0.35), inset 0 0 8px rgba(0, 255, 204, 0.15);
}

.preview-play-btn:hover {
    background: linear-gradient(135deg, #00ffcc, #00d2ff);
    color: #0c0e19;
    border-color: #00ffcc;
    transform: scale(1.1);
    box-shadow: 0 0 18px rgba(0, 255, 204, 0.65);
}

.preview-play-btn:active {
    transform: scale(0.94);
}

/* Rewind & Volume Buttons - Frosted Glass */
.preview-rewind-btn, .preview-vol-btn {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.preview-rewind-btn:hover, .preview-vol-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.45);
    transform: scale(1.08);
}

.preview-rewind-btn:active, .preview-vol-btn:active {
    transform: scale(0.92);
}

.preview-timer-display {
    font-size: 0.74rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(0, 0, 0, 0.45);
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    letter-spacing: 0.3px;
    font-variant-numeric: tabular-nums;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    white-space: nowrap;
}

.preview-volume-slider {
    width: 55px;
    height: 4px;
    accent-color: #00ffcc;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    outline: none;
    transition: opacity 0.15s ease;
}

@media (max-width: 400px) {
    .preview-volume-slider {
        display: none;
    }
    .preview-ctrl-left, .preview-ctrl-right {
        gap: 6px;
    }
}

.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background-color: #333;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #555;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s;
    box-shadow: 0 0 10px var(--primary-color);
}

.visibility-select {
    font-size: 1.1rem;
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid #555;
    background-color: #222;
    color: white;
    appearance: auto;
    cursor: pointer;
}
.visibility-select:focus {
    border-color: var(--primary-color);
}

/* Videos List */
.videos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.video-thumb-card {
    background-color: #222;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 9/16;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumb-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-visibility-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0,0,0,0.6);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
}

.video-fullscreen-container {
    position: relative;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.video-fullscreen-container .single-feed-item {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: var(--max-width, 500px);
    margin: 0 auto;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-fullscreen-container .feed-actions-right,
.single-feed-item .feed-actions-right {
    position: absolute !important;
    right: 10px !important;
    bottom: calc(65px + 2.5rem + env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    z-index: 100 !important;
    pointer-events: auto !important;
}

.video-fullscreen-container .feed-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-video-header {
    pointer-events: auto;
}

/* Rainbow Progress Bar */
.rainbow-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 5px;
    width: 0%;
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 200% 100%;
    animation: rainbowMove 2s linear infinite;
    z-index: 9999;
    transition: width 0.2s ease;
}

@keyframes rainbowMove {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* ============================================================
   Camera Recording Studio (TikTok & Instagram Reels Style)
============================================================ */
.upload-mode-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    gap: 4px;
}

.upload-mode-tab {
    flex: 1;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.upload-mode-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.upload-mode-tab.active {
    background: linear-gradient(135deg, #ff0050, #7928ca);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(255, 0, 80, 0.35);
}

/* Viewfinder Frame */
.camera-studio-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.camera-viewfinder-wrapper {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: min(460px, calc(100vh - 220px));
    max-height: calc(100dvh - 220px);
    background: #000000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

#camera-live-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#camera-live-stream.mirrored {
    transform: scaleX(-1);
}

#camera-recorded-playback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

/* Top Floating Bar */
.camera-controls-top {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    pointer-events: none;
}

.camera-top-left,
.camera-top-right {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.camera-glass-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.camera-glass-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
}

.camera-glass-btn:active {
    transform: scale(0.92);
}

.camera-glass-btn.active-opt {
    background: #ff2b54;
    border-color: #ff2b54;
    box-shadow: 0 0 10px rgba(255, 43, 84, 0.6);
}

/* Progress and Duration */
.camera-record-progress-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 25;
}

.camera-record-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff0050, #ff8000);
    transition: width 0.1s linear;
}

.camera-record-badge {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.rec-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #71717a;
    display: inline-block;
}

.rec-dot.recording {
    background: #ff2b54;
    box-shadow: 0 0 8px #ff2b54;
    animation: recBlink 1s infinite;
}

@keyframes recBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

/* Countdown Overlay */
.camera-countdown-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    z-index: 30;
    font-size: 6rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 0, 80, 0.8);
    pointer-events: none;
    animation: countPop 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes countPop {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Bottom Controls */
.camera-controls-bottom {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 20;
    padding: 0 20px;
    pointer-events: none;
}

.camera-controls-bottom > * {
    pointer-events: auto;
}

.camera-sound-pill-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.camera-record-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.85);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.camera-record-btn:hover {
    transform: scale(1.06);
    border-color: #ffffff;
}

.camera-record-btn:active {
    transform: scale(0.94);
}

.camera-record-inner {
    width: 56px;
    height: 56px;
    background: #ff2b54;
    border-radius: 50%;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.camera-record-btn.recording {
    border-color: rgba(255, 43, 84, 0.9);
}

.camera-record-btn.recording .camera-record-inner {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #ff2b54;
    box-shadow: 0 0 12px rgba(255, 43, 84, 0.8);
}

/* Review Action Controls */
.camera-preview-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 340px;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.camera-preview-actions .btn-retake {
    flex: 1;
    padding: 12px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 12px;
}

.camera-preview-actions .btn-use-video-next {
    flex: 1.5;
    background: linear-gradient(135deg, #ff0050, #7928ca) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(255, 0, 80, 0.5) !important;
    font-weight: 800 !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    font-size: 0.92rem !important;
    border: none !important;
    cursor: pointer !important;
    letter-spacing: 0.3px;
    transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

.camera-preview-actions .btn-use-video-next:active {
    transform: scale(0.95);
}

/* Camera Error / Permission card */
.camera-error-card {
    padding: 30px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    width: 100%;
    max-width: 380px;
}

/* ============================================================
   Sound & Music Selector (TikTok & Instagram Style)
============================================================ */
.camera-top-center {
    pointer-events: auto;
}

.camera-sound-pill {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 6px 14px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    max-width: 170px;
}

.camera-sound-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.camera-sound-pill:active {
    transform: scale(0.95);
}

.sound-pill-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sound-pill-remove {
    background: rgba(255, 255, 255, 0.25);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    margin-left: 2px;
    transition: background 0.15s;
}

.sound-pill-remove:hover {
    background: #ff2b54;
}

/* Sound Attached Card in Step 2 */
.sound-attached-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 5px;
}

.sound-attached-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.sound-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sound-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff0050, #7928ca);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Sound Modal Sheet */
.sound-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9990;
    transition: opacity 0.2s ease;
}

.sound-modal-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    height: 75vh;
    max-height: 560px;
    background: #141416;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: none;
    z-index: 9995;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.8);
    animation: slideUpSound 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUpSound {
    0% { transform: translate(-50%, 100%); }
    100% { transform: translate(-50%, 0); }
}

.sound-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sound-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

.sound-modal-close:hover {
    color: #ffffff;
}

.sound-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Upload Custom Sound Card */
.sound-upload-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.08), rgba(0, 153, 255, 0.08));
    border: 1.5px dashed rgba(0, 255, 204, 0.4);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 12px;
}

.sound-upload-card:hover {
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.15), rgba(0, 153, 255, 0.15));
    border-color: rgba(0, 255, 204, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 255, 204, 0.2);
}

.sound-upload-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.sound-upload-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(0, 255, 204, 0.15);
    border: 1px solid rgba(0, 255, 204, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sound-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 14px;
}

.sound-search-box input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

.sound-list-header {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sound-tracks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sound-track-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 12px;
    transition: all 0.2s ease;
}

.sound-track-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.sound-track-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.sound-play-preview-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.sound-play-preview-btn:hover {
    background: #ff0050;
    transform: scale(1.08);
}

.sound-play-preview-btn.playing {
    background: #ff0050;
    box-shadow: 0 0 10px rgba(255, 0, 80, 0.6);
}

.sound-track-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sound-track-name {
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sound-track-artist {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.sound-use-btn {
    background: linear-gradient(135deg, #ff0050, #7928ca);
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.sound-use-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 2px 8px rgba(255, 0, 80, 0.5);
}

.custom-sound-box {
    margin-top: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

/* ============================================================
   Transparent Glassmorphic Toast Notification
============================================================ */
.viral-glass-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-24px) scale(0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 22px;
    background: rgba(14, 14, 20, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1.5px solid rgba(0, 255, 204, 0.45);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(0, 255, 204, 0.3);
    color: #ffffff;
    max-width: 90%;
    width: auto;
    min-width: 290px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.viral-glass-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
}

.glass-toast-icon {
    font-size: 1.65rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(0, 255, 204, 0.6));
    animation: toastBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-toast-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.glass-toast-title {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: #00ffcc;
    letter-spacing: 0.3px;
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.5);
}

.glass-toast-desc {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.25;
}

.glass-toast-sparkle {
    font-size: 1.15rem;
    margin-left: auto;
    color: #ff0050;
    animation: sparkleSpin 3s linear infinite;
}

@keyframes toastBounce {
    0% { transform: scale(0.3); opacity: 0; }
    60% { transform: scale(1.25); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes sparkleSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Video Preview Fallback Card */
.video-preview-fallback-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 16px;
    background: radial-gradient(circle at center, rgba(30, 35, 55, 0.96), rgba(12, 14, 25, 0.98));
    border: 1.5px solid rgba(0, 255, 204, 0.35);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 255, 204, 0.08);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    z-index: 10;
}

.fallback-icon-glow {
    font-size: 3.5rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 16px rgba(0, 255, 204, 0.65));
    animation: fallbackIconPulse 2s infinite ease-in-out;
}

@keyframes fallbackIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.fallback-file-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    word-break: break-all;
    max-width: 90%;
}

.fallback-file-meta {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 14px;
}

.fallback-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 255, 102, 0.15);
    border: 1px solid rgba(0, 255, 102, 0.5);
    color: #00ff66;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(0, 255, 102, 0.25);
}

/* ========================================================
   CENTER CIRCULAR PROGRESS OVERLAY (COLOR-CHANGING)
   ======================================================== */
.upload-circle-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(4, 6, 15, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.upload-circle-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

.upload-circle-card {
    background: radial-gradient(circle at 50% 0%, rgba(35, 40, 65, 0.95), rgba(15, 18, 30, 0.98));
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 242, 254, 0.25);
    border-radius: 24px;
    padding: 35px 25px 30px;
    width: 100%;
    max-width: 340px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: cardZoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cardZoomIn {
    0% { transform: scale(0.75); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.circle-progress-container {
    position: relative;
    width: 170px;
    height: 170px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playstore-zigzag-svg {
    transform: rotate(0deg);
    overflow: visible;
}

/* Background Zig-Zag Track */
.zigzag-ring-track {
    fill: transparent;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Active Zig-Zag Progress Indicator */
.zigzag-ring-indicator {
    fill: transparent;
    stroke: url(#circleProgressGrad);
    stroke-width: 9;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke-dashoffset 0.25s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
    animation: playStoreZigzagSpin 12s linear infinite;
    transform-origin: 85px 85px;
}

@keyframes playStoreZigzagSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.circle-center-stats {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.circle-icon-anim {
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 2px;
    filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.8));
    animation: rocketFloat 1.8s infinite ease-in-out;
}

@keyframes rocketFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.12); }
}

.circle-percentage-text {
    font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 1.85rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-shadow: 0 0 12px rgba(0, 255, 204, 0.7);
    line-height: 1;
}

.circle-status-header {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px 0;
    letter-spacing: 0.2px;
}

.circle-status-subtitle {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 18px 0;
    line-height: 1.35;
}

.circle-linear-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.circle-linear-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00f2fe, #ff007f, #00ff66);
    border-radius: 10px;
    transition: width 0.2s ease;
    box-shadow: 0 0 10px #00ff66;
}

/* -------------------------------------------------------------------------- */
/* Interactive Thumbnail Studio & Area Cropper Styles                         */
/* -------------------------------------------------------------------------- */
.thumb-chooser-box {
    margin-top: 6px;
    margin-bottom: 12px;
}

.thumb-chooser-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 480px) {
    .thumb-chooser-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
}

.thumb-action-card-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px 14px;
    color: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.thumb-action-card-btn:hover {
    background: rgba(0, 255, 204, 0.1);
    border-color: rgba(0, 255, 204, 0.4);
    transform: translateY(-2px);
}

.thumb-btn-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.thumb-btn-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 2px;
}

.thumb-btn-sub {
    font-size: 0.75rem;
    color: var(--text-muted, #a0a0a0);
    line-height: 1.25;
}

.thumbnail-result-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(20, 20, 24, 0.85);
    border: 1px solid rgba(0, 255, 204, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 255, 204, 0.1);
    border-radius: 12px;
    padding: 12px;
    margin-top: 6px;
    margin-bottom: 12px;
}

.thumbnail-result-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.thumbnail-crop-preview-wrapper {
    position: relative;
    width: 54px;
    height: 96px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.thumbnail-result-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-ready-badge {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.85);
    color: #00ffcc;
    font-size: 0.55rem;
    font-weight: 800;
    text-align: center;
    padding: 1px 0;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.thumbnail-result-meta {
    min-width: 0;
}

.thumbnail-meta-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #ffffff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thumbnail-meta-sub {
    font-size: 0.78rem;
    color: var(--text-muted, #a0a0a0);
}

.thumbnail-result-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

/* Thumbnail Cropper Full Modal */
.thumb-cropper-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.thumb-cropper-modal-overlay.hidden,
.thumb-cropper-modal-sheet.hidden {
    display: none;
}

.thumb-cropper-modal-sheet {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 94%;
    max-width: 480px;
    max-height: 92vh;
    background: #141418;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 255, 204, 0.15);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 500px) {
    .thumb-cropper-modal-sheet {
        top: auto;
        bottom: 0;
        left: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
    }
}

@keyframes modalScaleIn {
    from { transform: translate(-50%, -46%) scale(0.95); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.crop-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.crop-modal-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.crop-modal-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    opacity: 0.75;
}

.crop-modal-close-btn:hover {
    opacity: 1;
}

.crop-modal-body {
    padding: 14px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Crop Viewport & Frame */
.crop-viewport-container {
    position: relative;
    width: 100%;
    height: 310px;
    background: #08080a;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    touch-action: none;
}

.crop-frame-box {
    position: relative;
    width: 174px;
    height: 300px;
    border: 2px solid #00ffcc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 255, 204, 0.4);
    cursor: grab;
    transition: width 0.2s, height 0.2s;
}

.crop-frame-box:active {
    cursor: grabbing;
}

.crop-frame-box.ratio-1-1 {
    width: 240px;
    height: 240px;
}

.crop-frame-box.ratio-4-5 {
    width: 200px;
    height: 250px;
}

.crop-frame-box.ratio-16-9 {
    width: 280px;
    height: 157.5px;
}

.crop-image-element {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    pointer-events: none;
    max-width: none;
}

.crop-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    opacity: 0.35;
}

.crop-grid-overlay div {
    border: 0.5px dashed rgba(255, 255, 255, 0.5);
}

.crop-drag-hint {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    pointer-events: none;
    backdrop-filter: blur(4px);
    z-index: 10;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Aspect Ratio Selector Chips */
.crop-aspect-selector {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.crop-aspect-chip {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 5px 12px;
    color: var(--text-muted, #a0a0a0);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.crop-aspect-chip.active {
    background: rgba(0, 255, 204, 0.15);
    border-color: #00ffcc;
    color: #00ffcc;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.2);
}

/* Zoom & Rotate Controls */
.crop-controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 12px;
    border-radius: 10px;
}

.crop-slider-label {
    font-size: 0.82rem;
    color: var(--text-muted, #a0a0a0);
    flex-shrink: 0;
}

.crop-zoom-slider {
    flex: 1;
    accent-color: #00ffcc;
    cursor: pointer;
}

.crop-icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 8px;
    padding: 4px 9px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}

.crop-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Video Timeline Scrubber Box */
.crop-video-scrubber-box {
    background: rgba(0, 255, 204, 0.05);
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 12px;
    padding: 10px 12px;
}

.crop-scrubber-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.crop-scrubber-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #00ffcc;
}

.crop-scrubber-time {
    font-size: 0.78rem;
    color: #ffffff;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
}

.crop-timeline-range {
    width: 100%;
    accent-color: #ff0050;
    cursor: pointer;
}

.crop-modal-footer {
    display: flex;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 10, 12, 0.6);
}

.crop-btn-cancel {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.crop-btn-save {
    flex: 2;
    background: linear-gradient(135deg, #00ffcc, #0099ff);
    border: none;
    color: #000000;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 255, 204, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.crop-btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 255, 204, 0.5);
}

/* Upload 2-Column Row for Caption & Location */
.upload-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

/* ============================================================
   Upload Page Mobile Compact Optimizations
   ============================================================ */
@media (max-width: 600px) {
    .upload-container {
        padding: 10px 12px 20px;
    }

    .upload-mode-switcher {
        margin-bottom: 12px;
        padding: 3px;
        border-radius: 10px;
    }

    .upload-mode-tab {
        padding: 7px 10px;
        font-size: 0.82rem;
        gap: 5px;
    }

    /* Step 1 Dropzone Spacious */
    .upload-placeholder {
        padding: 35px 20px;
        border-radius: 16px;
    }

    .upload-icon {
        font-size: 3.5rem;
        margin-bottom: 8px;
    }

    .upload-placeholder h3 {
        font-size: 1.25rem;
        margin-bottom: 4px;
    }

    .upload-placeholder p {
        font-size: 0.88rem !important;
        margin-top: 6px !important;
    }

    /* Step 2 Video Preview Player Strictly Portrait 9:16 */
    .video-preview-container {
        width: 100%;
        max-width: 260px;
        aspect-ratio: 9 / 16;
        min-height: 420px;
        max-height: 470px;
        margin: 0 auto 12px auto;
        border-radius: 18px;
        background: #000000;
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.16);
        position: relative;
    }

    #video-preview {
        width: 100%;
        height: 100%;
        aspect-ratio: 9 / 16;
        object-fit: cover;
        background: #000000;
        border-radius: 16px;
        display: block;
    }

    .video-preview-fallback-card {
        padding: 24px 16px;
        margin: 0;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        box-sizing: border-box;
        border-radius: 18px;
    }

    .fallback-icon-glow {
        font-size: 3rem;
        margin-bottom: 10px;
    }

    .fallback-file-title {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }

    .fallback-file-meta {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    #capture-thumb-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        margin-top: 8px;
    }

    #preview-duration-badge {
        top: 12px;
        right: 12px;
        padding: 4px 10px;
        font-size: 0.78rem;
    }

    /* Form Inputs Spacious & Clear */
    #video-details-form {
        margin-top: 16px !important;
    }

    #video-details-form .upload-field-group,
    #video-details-form .form-group {
        margin-bottom: 18px;
    }

    #video-details-form .form-group label {
        font-size: 0.92rem;
        font-weight: 700;
        margin-bottom: 6px;
    }

    #video-details-form .form-input {
        padding: 12px 14px;
        font-size: 0.95rem;
        border-radius: 10px;
        background-color: #12121a;
        border: 1px solid rgba(255, 255, 255, 0.16);
    }

    .video-caption-textarea {
        padding: 12px 14px !important;
        font-size: 0.95rem !important;
        min-height: 80px;
        line-height: 1.5;
        resize: vertical;
    }

    .video-desc-textarea,
    #video-description {
        padding: 12px 14px !important;
        font-size: 0.95rem !important;
        min-height: 110px;
        line-height: 1.5;
        resize: vertical;
    }

    /* Soundtrack Attached Card Spacious */
    .sound-attached-card {
        padding: 12px 14px;
        border-radius: 12px;
        margin-top: 6px;
    }

    .sound-card-left {
        gap: 10px;
    }

    .sound-icon-badge {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    #step2-sound-title {
        font-size: 0.92rem !important;
    }

    #step2-sound-sub {
        font-size: 0.78rem !important;
    }

    .sound-attached-card .btn-small {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Thumbnail Chooser Cards Spacious */
    .thumb-chooser-box {
        margin-top: 6px;
        margin-bottom: 12px;
    }

    .thumb-action-card-btn {
        padding: 12px 14px;
        gap: 10px;
        border-radius: 12px;
    }

    .thumb-btn-icon {
        font-size: 1.5rem;
    }

    .thumb-btn-title {
        font-size: 0.88rem;
        margin-bottom: 2px;
    }

    .thumb-btn-sub {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    .thumbnail-result-card {
        padding: 12px 14px;
        border-radius: 12px;
        margin-top: 6px;
        margin-bottom: 12px;
    }

    .thumbnail-crop-preview-wrapper {
        width: 44px;
        height: 78px;
        border-radius: 8px;
    }

    .thumbnail-meta-title {
        font-size: 0.88rem;
    }

    .thumbnail-meta-sub {
        font-size: 0.75rem;
    }

    .thumbnail-result-actions .btn-small {
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    .char-count {
        font-size: 0.76rem;
        margin-top: 4px;
    }

    /* Visibility Dropdown Spacious */
    .visibility-select {
        font-size: 0.95rem !important;
        padding: 12px 14px !important;
        border-radius: 10px;
    }

    /* Camera Viewfinder Mobile Height */
    .camera-viewfinder-wrapper {
        height: 480px;
        max-height: calc(100vh - 180px);
        border-radius: 16px;
    }
}

/* ==========================================================================
   Prominent Video POST Action Buttons (Mobile & Desktop Responsive)
   ========================================================================== */
.upload-header {
    background: rgba(10, 10, 12, 0.88) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.upload-header .header-actions {
    display: flex;
    align-items: center;
}

#post-video-btn,
.btn-header-post {
    background: linear-gradient(135deg, #ff0050 0%, #7928ca 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.85rem !important;
    padding: 7px 18px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(255, 0, 80, 0.45) !important;
    transition: all 0.2s ease !important;
    letter-spacing: 0.8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-transform: uppercase;
}

#post-video-btn:not(:disabled):hover,
.btn-header-post:not(:disabled):hover {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(255, 0, 80, 0.65) !important;
}

#post-video-btn:not(:disabled):active,
.btn-header-post:not(:disabled):active {
    transform: scale(0.95);
}

#post-video-btn:disabled,
.btn-header-post:disabled {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    transform: none !important;
}

/* Step 2 Bottom Post Action Wrapper */
.upload-post-action-wrap {
    width: 100%;
    margin-top: 24px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 4px;
}

.btn-post-video-primary {
    width: 100%;
    max-width: 440px;
    padding: 15px 22px;
    background: linear-gradient(135deg, #ff0050 0%, #7928ca 50%, #00f2fe 100%);
    background-size: 200% 200%;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(255, 0, 80, 0.45), 0 0 16px rgba(121, 40, 202, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    letter-spacing: 0.3px;
    animation: postBtnGradient 4s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes postBtnGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-post-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-post-icon {
    font-size: 1.25rem;
    display: inline-block;
    transition: transform 0.2s ease;
}

.btn-post-text {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.btn-post-sparkle {
    font-size: 1.1rem;
    animation: sparkleSpin 2s infinite linear;
}

@keyframes sparkleSpin {
    0% { transform: scale(0.9) rotate(0deg); opacity: 0.7; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
    100% { transform: scale(0.9) rotate(360deg); opacity: 0.7; }
}

.btn-post-video-primary:not(:disabled):hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 32px rgba(255, 0, 80, 0.6), 0 0 24px rgba(0, 242, 254, 0.4);
}

.btn-post-video-primary:not(:disabled):hover .btn-post-icon {
    transform: translateY(-2px) rotate(12deg);
}

.btn-post-video-primary:not(:disabled):active {
    transform: scale(0.97);
}

.btn-post-video-primary:disabled {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    animation: none !important;
    transform: none !important;
}

.btn-post-video-primary:disabled .btn-post-sparkle {
    animation: none;
    opacity: 0.3;
}

.post-video-terms-hint {
    font-size: 0.74rem;
    color: var(--text-muted, #888888);
    text-align: center;
    max-width: 360px;
    line-height: 1.35;
    margin: 0;
}/* ==========================================================================
   PREMIUM REDESIGN: Glassmorphism & Aesthetics for Upload Page
   ========================================================================== */

/* Main Container Glassmorphism */
.upload-container {
    background: rgba(20, 20, 25, 0.45);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    margin-top: 10px;
    transition: all 0.3s ease;
}

/* Upload Mode Switcher (Sleek Pills) */
.upload-mode-switcher {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    padding: 6px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.upload-mode-tab {
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: rgba(255,255,255,0.6);
}

.upload-mode-tab.active {
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.15), rgba(121, 40, 202, 0.15));
    border: 1px solid rgba(255, 0, 80, 0.3);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 0, 80, 0.2);
}

/* Dropzone Hover Effects */
.upload-placeholder {
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.upload-placeholder:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 255, 204, 0.4);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.1);
}

.upload-logo-icon-wrap img {
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.upload-placeholder:hover .upload-logo-icon-wrap img {
    transform: scale(1.1) translateY(-4px) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.8), 0 0 30px rgba(255, 215, 0, 0.4) !important;
}

/* Form Inputs Neon Focus */
#video-details-form .form-input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
    color: #fff;
}

#video-details-form .form-input:focus {
    background: rgba(0, 0, 0, 0.4) !important;
    border-color: #00ffcc !important;
    box-shadow: 0 0 0 4px rgba(0, 255, 204, 0.15), inset 0 0 10px rgba(0, 255, 204, 0.05) !important;
    outline: none !important;
}

/* Custom Thumbnail & Sound Cards */
.thumb-action-card-btn, .sound-attached-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
}

.thumb-action-card-btn:hover, .sound-attached-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* ==========================================================================
   INSTAGRAM-STYLE UPLOAD LAYOUT
   ========================================================================== */
.insta-upload-container {
    padding: 0 !important;
    background: #000;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.insta-step-1 {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.insta-preview-area {
    width: 100%;
    height: 50vh;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.insta-preview-placeholder {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.insta-tab-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.insta-tabs-left {
    display: flex;
    gap: 16px;
}

.insta-tab {
    background: none;
    border: none;
    color: var(--text-muted, #888);
    font-size: 1.05rem;
    font-weight: 600;
    padding: 4px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.insta-tab.active {
    color: #fff;
}

.insta-tabs-right {
    display: flex;
    gap: 10px;
}

.insta-action-btn {
    border: none;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.insta-content-area {
    flex: 1;
    background: #000;
    overflow-y: auto;
    position: relative;
}

.insta-gallery-section {
    padding: 0;
}

.insta-drafts-section {
    padding: 2px;
}

.insta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.insta-grid-item {
    aspect-ratio: 1;
    background: #222;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.insta-grid-item img, .insta-grid-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.insta-grid-item .draft-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 4px;
    border-radius: 4px;
}

.insta-grid-item .draft-type-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    color: #fff;
    font-size: 1.2rem;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

/* Mobile Edge Padding & Layout Spacing Fixes */
.upload-header {
    padding: 0 16px !important;
    box-sizing: border-box;
}

#upload-step-2 {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 16px 16px 80px 16px !important;
    box-sizing: border-box;
}

#camera-studio-section {
    padding: 12px 16px;
    box-sizing: border-box;
    width: 100%;
}

.camera-permission-error {
    margin-left: 16px;
    margin-right: 16px;
}

.upload-field-group,
.preview-meta-bar,
.preview-adjacent-actions-row,
.upload-post-action-wrap,
.sound-attached-section,
.thumbnail-upload-group {
    width: 100%;
    box-sizing: border-box;
}

.video-caption-textarea,
.video-desc-textarea,
.visibility-select,
#video-location,
#video-caption,
#video-description {
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 768px) {
    .insta-tab-bar {
        padding: 12px 14px !important;
    }
    
    #upload-step-2 {
        padding: 14px 14px 85px 14px !important;
    }

    .preview-adjacent-actions-row {
        padding: 0 4px;
    }

    .sound-attached-card, 
    .thumb-chooser-box, 
    .thumbnail-result-card {
        box-sizing: border-box;
        width: 100%;
    }
}


