/* TeraBox Player Stylesheet - Mobile-First Responsive Jost UI */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700&display=swap');

.tb-player-container {
    font-family: 'Jost', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    color: #f1f5f9;
    width: 100%;
    max-width: 980px;
    margin: 16px auto;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.tb-player-container *,
.tb-player-container *::before,
.tb-player-container *::after {
    box-sizing: border-box;
    font-family: inherit;
}

.tb-hidden {
    display: none !important;
}

/* Input Form */
.tb-input-box {
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.tb-input-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 10px;
}

.tb-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 640px) {
    .tb-input-wrapper {
        flex-direction: row;
        align-items: center;
    }
}

.tb-input-field-wrapper {
    position: relative !important;
    flex: 1;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.tb-player-container .tb-input-icon,
.tb-input-icon {
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 18px !important;
    height: 18px !important;
    fill: none !important;
    stroke: #64748b !important;
    pointer-events: none !important;
    z-index: 5 !important;
}

.tb-player-container input.tb-url-input,
.tb-player-container .tb-url-input,
.tb-url-input {
    width: 100% !important;
    background: rgba(11, 15, 25, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding-left: 46px !important;
    padding-right: 44px !important;
    padding-top: 13px !important;
    padding-bottom: 13px !important;
    color: #f8fafc !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    box-sizing: border-box !important;
    min-height: 48px !important;
}

.tb-url-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.tb-player-container .tb-clear-btn,
.tb-clear-btn {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    color: #94a3b8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.15s, color 0.15s, transform 0.1s !important;
    padding: 0 !important;
    z-index: 5 !important;
}

.tb-clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #f8fafc;
}

.tb-clear-btn:active {
    transform: scale(0.92);
}

.tb-clear-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
}

.tb-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

@media (min-width: 640px) {
    .tb-btn-group {
        width: auto;
    }
}

.tb-paste-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    box-sizing: border-box;
    flex: 1;
}

@media (min-width: 640px) {
    .tb-paste-btn {
        flex: initial;
    }
}

.tb-paste-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.tb-paste-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.tb-load-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    box-sizing: border-box;
    flex: 2;
}

@media (min-width: 640px) {
    .tb-load-btn {
        flex: initial;
    }
}

.tb-load-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.tb-load-btn:active {
    transform: scale(0.98);
}

.tb-btn-play-icon {
    width: 15px;
    height: 15px;
    fill: #ffffff;
}

.tb-paste-notice {
    margin-top: 8px;
    font-size: 12px;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.85);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-block;
    animation: tb-fade-in 0.2s ease;
}

@keyframes tb-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Error Notice */
.tb-error-notice {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 14px;
}

/* Player Box */
.tb-player-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.tb-video-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    min-width: 0;
}

.tb-video-title {
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
}

.tb-video-meta {
    color: #94a3b8;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Viewport Frame with Intelligent Dynamic Sizing */
.tb-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 220px;
    max-height: 75vh;
    background: #000000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: aspect-ratio 0.3s ease, max-width 0.3s ease, max-height 0.3s ease;
}

@media (min-width: 640px) {
    .tb-viewport {
        min-height: 320px;
    }
}

.tb-video-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    background: #000000;
    position: relative;
    z-index: 1;
}

/* Watchdog Banner */
.tb-watchdog-banner {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(245, 158, 11, 0.95);
    color: #0f172a;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 12;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    animation: tb-pulse 1.5s infinite;
    white-space: nowrap;
    max-width: 90%;
    pointer-events: none;
}

/* Center Play Button Overlay */
.tb-center-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.28);
    cursor: pointer;
    z-index: 15;
    pointer-events: auto;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tb-center-play.tb-fade-out {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.tb-center-play.tb-fade-in {
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

.tb-play-circle {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, box-shadow 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 639px) {
    .tb-play-circle {
        width: 58px;
        height: 58px;
    }
}

.tb-play-circle:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

.tb-play-circle:active {
    transform: scale(0.94);
}

.tb-play-circle svg {
    width: 28px;
    height: 28px;
    fill: #0f172a;
    margin-left: 3px;
}



.tb-spinner, .tb-watchdog-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: tb-spin 0.8s linear infinite;
    display: inline-block;
}

.tb-watchdog-spinner {
    border-color: rgba(15, 23, 42, 0.3);
    border-top-color: #0f172a;
}

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

@keyframes tb-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

/* Native HTML5 Controls & Media Styling */
.tb-video-element::-webkit-media-controls-enclosure {
    border-radius: 0 0 16px 16px;
}




/* Archive Detection Box */
.tb-archive-box {
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
    animation: tb-fade-in 0.25s ease;
}

.tb-archive-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.tb-archive-icon {
    font-size: 28px;
    line-height: 1;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 10px;
    flex-shrink: 0;
}

.tb-archive-details {
    flex: 1;
    min-width: 0;
}

.tb-archive-title {
    font-size: 15px;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 4px;
}

.tb-archive-name {
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    word-break: break-all;
    margin-bottom: 6px;
}

.tb-archive-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

/* Playlist / Multi-Video Drawer */
.tb-playlist-container {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    margin-top: 14px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    animation: tb-fade-in 0.25s ease;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.tb-playlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 0;
    max-width: 100%;
}

.tb-playlist-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.tb-playlist-icon {
    width: 18px;
    height: 18px;
    stroke: #60a5fa;
    fill: none;
    flex-shrink: 0;
}

.tb-playlist-title {
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.tb-playlist-count {
    font-size: 11px;
    font-weight: 600;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 2px 8px;
    border-radius: 8px;
    flex-shrink: 0;
}

.tb-playlist-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

@media (min-width: 640px) {
    .tb-playlist-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.tb-playlist-item {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.tb-playlist-item:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateY(-1px);
}

.tb-playlist-item.tb-playlist-active {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

.tb-playlist-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.tb-playlist-num {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tb-playlist-item.tb-playlist-active .tb-playlist-num {
    background: #2563eb;
    color: #ffffff;
}

.tb-playlist-info {
    min-width: 0;
    flex: 1;
}

.tb-playlist-name {
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.tb-playlist-item.tb-playlist-active .tb-playlist-name {
    color: #93c5fd;
}

.tb-playlist-meta {
    font-size: 11px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.tb-playlist-right {
    flex-shrink: 0;
}

.tb-playlist-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    transition: all 0.15s ease;
}

.tb-playlist-item:hover .tb-playlist-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.tb-playlist-item.tb-playlist-active .tb-playlist-badge {
    background: #2563eb;
    color: #ffffff;
}

/* ==========================================================================
   Preparing / Loading State (Reference Screenshot 1)
   ========================================================================== */
.tb-minimal-loader {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.25s ease, transform 0.25s ease;
    border-radius: inherit;
}

.tb-minimal-loader.tb-hidden {
    display: none !important;
}

.tb-minimal-loader.tb-loader-dismiss {
    opacity: 0;
    transform: scale(0.97);
    pointer-events: none;
}

.tb-loader-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.tb-spinner-ring {
    width: 36px;
    height: 36px;
    border: 3.5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: tbSpin 0.75s linear infinite;
    flex-shrink: 0;
    margin-bottom: 14px;
}

.tb-loader-title {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
    line-height: 1.3;
}

.tb-loader-text {
    font-size: 13px;
    font-weight: 400;
    color: #94a3b8;
    line-height: 1.4;
}

/* ==========================================================================
   Poster / Thumbnail Container (Ready State Preview)
   ========================================================================== */
.tb-poster-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 14;
    overflow: hidden;
    cursor: pointer;
    background: #0b0f19;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.tb-poster-container.tb-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.tb-poster-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 40%, #1e293b 0%, #0f172a 60%, #020617 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tb-poster-fallback-icon {
    width: 64px;
    height: 64px;
    color: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tb-poster-fallback-icon svg {
    width: 100%;
    height: 100%;
}

.tb-poster-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    transition: transform 0.4s ease;
}

.tb-poster-container:hover .tb-poster-img {
    transform: scale(1.02);
}

.tb-poster-badges {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
    pointer-events: none;
}

@media (max-width: 639px) {
    .tb-poster-badges {
        bottom: 12px;
        left: 12px;
    }
}

.tb-poster-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    background: rgba(0, 0, 0, 0.22);
    transition: background 0.2s ease;
}

.tb-poster-container:hover .tb-poster-play-btn {
    background: rgba(0, 0, 0, 0.12);
}

.tb-poster-container:hover .tb-poster-play-btn .tb-play-circle {
    transform: scale(1.08);
    background: linear-gradient(135deg, rgba(59, 130, 246, 1), rgba(37, 99, 235, 1));
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 32px rgba(59, 130, 246, 0.6);
}

/* ==========================================================================
   Overlaid Badges on Video (Reference Screenshot 2)
   ========================================================================== */
.tb-video-overlay-badges {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tb-viewport:hover .tb-video-overlay-badges,
.tb-player-box:not(.tb-paused) .tb-video-overlay-badges {
    opacity: 0.85;
}

.tb-overlay-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.tb-overlay-badge svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* ==========================================================================
   Video Details Container (Skeleton & Ready States)
   ========================================================================== */
.tb-details-container {
    margin-top: 14px;
    padding: 0 4px;
}

/* Skeleton Loading (Reference Screenshot 1) */
.tb-skeleton-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tb-skeleton-line {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: tbShimmer 1.5s infinite;
    border-radius: 8px;
}

.tb-skeleton-title {
    height: 24px;
    width: 65%;
    margin-bottom: 2px;
}

.tb-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tb-skeleton-card {
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: tbShimmer 1.5s infinite;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.tb-skeleton-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
}

.tb-skeleton-btn {
    height: 48px;
    border-radius: 12px;
    flex: 1;
}

/* Populated Ready State (Reference Screenshot 2) */
.tb-ready-details {
    display: flex;
    flex-direction: column;
}

.tb-video-title-main {
    font-size: 19px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 14px 0;
    line-height: 1.35;
    word-break: break-word;
    letter-spacing: -0.01em;
}

@media (min-width: 640px) {
    .tb-video-title-main {
        font-size: 22px;
    }
}

/* 4 Metadata Cards in 2x2 Grid */
.tb-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.tb-meta-card {
    background: rgba(30, 41, 59, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 4px 15px -4px rgba(0, 0, 0, 0.3);
    transition: border-color 0.2s, background 0.2s;
}

.tb-meta-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(30, 41, 59, 0.85);
}

.tb-meta-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tb-meta-label svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.tb-meta-val {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

/* ==========================================================================
   Action Buttons (Watch Now, Process Another Link, Copy, Share)
   ========================================================================== */

/* Main Action Row: Watch Now + Process another link side by side */
.tb-main-action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 12px;
}

/* Primary Watch Now / Play Action Button */
.tb-watch-now-btn {
    flex: 1.1;
    min-height: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 8px 24px -4px rgba(99, 102, 241, 0.45);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    white-space: nowrap;
    padding: 0 16px;
    box-sizing: border-box;
}

.tb-watch-now-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -4px rgba(99, 102, 241, 0.6);
}

.tb-watch-now-btn:active {
    transform: scale(0.98);
}

.tb-watch-now-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Process Another Link Button */
.tb-reset-btn {
    flex: 1;
    min-height: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.tb-reset-btn:hover {
    background: rgba(30, 41, 59, 1);
    border-color: rgba(129, 140, 248, 0.7);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.tb-reset-btn:active {
    transform: scale(0.98);
}

.tb-reset-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #818cf8;
    transition: transform 0.35s ease;
}

.tb-reset-btn:hover svg {
    transform: rotate(180deg);
}

/* Secondary Actions (Copy Link & Share) */
.tb-share-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 14px;
}

.tb-copy-link-btn,
.tb-share-link-btn {
    flex: 1;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    min-height: 42px;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.tb-copy-link-btn:hover,
.tb-share-link-btn:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.26);
    color: #ffffff;
    transform: translateY(-1px);
}

.tb-copy-link-btn:active,
.tb-share-link-btn:active {
    transform: scale(0.98);
}

.tb-copy-link-btn svg,
.tb-share-link-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

@media (max-width: 420px) {
    .tb-main-action-row {
        gap: 8px;
    }
    .tb-watch-now-btn,
    .tb-reset-btn {
        font-size: 12.5px;
        padding: 0 10px;
        gap: 6px;
    }
    .tb-watch-now-btn svg,
    .tb-reset-btn svg {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 330px) {
    .tb-main-action-row {
        flex-direction: column;
    }
    .tb-watch-now-btn,
    .tb-reset-btn {
        width: 100%;
    }
}

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

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


