/* 
 * Video Downloader - Premium UI v2
 * Deep Space / Glassmorphism Theme
 */

:root {
    --bg-primary: #050511;
    --bg-secondary: #0f1020;
    --glass-surface: rgba(20, 20, 35, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);

    --primary-gradient: linear-gradient(135deg, #FF3CAC 0%, #784BA0 50%, #2B86C5 100%);
    --secondary-gradient: linear-gradient(135deg, #00DBDE 0%, #FC00FF 100%);

    --accent-glow: rgba(120, 75, 160, 0.5);
    --success: #00f2ea;
    --error: #ff0055;

    --font-main: 'Manrope', sans-serif;
    --font-display: 'Sora', sans-serif;

    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --radius-full: 9999px;
}

/* Base Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #040610;
    background-image:
        radial-gradient(circle at 22% -8%, rgba(12, 214, 206, 0.16), transparent 38%),
        radial-gradient(circle at 82% -12%, rgba(255, 67, 158, 0.15), transparent 42%),
        linear-gradient(165deg, #050816 0%, #070d21 45%, #040610 100%);
    font-family: var(--font-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    isolation: isolate;
}

/* Custom Scrollbar Global */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(4, 6, 16, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    border: 2px solid rgba(4, 6, 16, 0.8);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 234, 0.4);
}

/* Animated Ambient Layers */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(8, 219, 210, 0.2), transparent 38%),
        radial-gradient(circle at 84% 10%, rgba(255, 67, 158, 0.22), transparent 44%),
        radial-gradient(circle at 58% 84%, rgba(77, 110, 247, 0.14), transparent 48%);
    animation: bgPulse 18s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -3;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 18%, transparent 0%, rgba(2, 4, 10, 0.72) 70%);
    pointer-events: none;
    z-index: -2;
}

.bg-scene {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.bg-scene::before {
    content: '';
    position: absolute;
    width: min(1200px, 88vw);
    aspect-ratio: 1;
    left: 50%;
    top: -58%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: conic-gradient(from 0deg, rgba(12, 214, 206, 0.26), rgba(255, 67, 158, 0.28), rgba(82, 105, 255, 0.22), rgba(12, 214, 206, 0.26));
    filter: blur(44px);
    opacity: 0.5;
    animation: auroraRotate 34s linear infinite;
}

.bg-scene::after {
    content: '';
    position: absolute;
    inset: 20% -24% -32%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 67, 158, 0.14), transparent 35%),
        radial-gradient(circle at 80% 26%, rgba(12, 214, 206, 0.13), transparent 36%),
        radial-gradient(circle at 50% 78%, rgba(82, 105, 255, 0.12), transparent 40%);
    filter: blur(40px);
    opacity: 0.5;
    animation: fogDrift 22s ease-in-out infinite alternate;
}

.bg-grid {
    position: absolute;
    inset: -22%;
    opacity: 0.14;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 56px 56px;
    transform: perspective(900px) rotateX(62deg) translateY(45px) scale(1.2);
    transform-origin: center top;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 78%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 78%);
    animation: gridDrift 28s linear infinite;
}

.bg-noise {
    position: absolute;
    inset: -30%;
    opacity: 0.1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Ccircle cx='12' cy='18' r='1'/%3E%3Ccircle cx='65' cy='42' r='1.2'/%3E%3Ccircle cx='122' cy='16' r='1'/%3E%3Ccircle cx='159' cy='73' r='1.1'/%3E%3Ccircle cx='32' cy='112' r='1'/%3E%3Ccircle cx='90' cy='94' r='1.2'/%3E%3Ccircle cx='136' cy='131' r='1'/%3E%3Ccircle cx='170' cy='155' r='1.1'/%3E%3C/g%3E%3C/svg%3E");
    animation: noiseShift 10s steps(6) infinite;
}

.bg-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(50px);
    opacity: 0.34;
    mix-blend-mode: screen;
}

.orb-a {
    width: 420px;
    height: 420px;
    left: -110px;
    top: -70px;
    background: radial-gradient(circle, rgba(255, 67, 158, 0.75), rgba(255, 67, 158, 0));
    animation: orbFloatA 20s ease-in-out infinite;
}

.orb-b {
    width: 500px;
    height: 500px;
    right: -130px;
    top: 18%;
    background: radial-gradient(circle, rgba(12, 214, 206, 0.7), rgba(12, 214, 206, 0));
    animation: orbFloatB 24s ease-in-out infinite;
}

.orb-c {
    width: 380px;
    height: 380px;
    left: 24%;
    bottom: -160px;
    background: radial-gradient(circle, rgba(82, 105, 255, 0.62), rgba(82, 105, 255, 0));
    animation: orbFloatC 22s ease-in-out infinite;
}

.orb-d {
    width: 260px;
    height: 260px;
    right: 20%;
    bottom: 3%;
    background: radial-gradient(circle, rgba(255, 188, 71, 0.35), rgba(255, 188, 71, 0));
    animation: orbFloatD 16s ease-in-out infinite;
}

.bg-particles {
    position: absolute;
    inset: 0;
}

.bg-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.32);
    animation: particleFloat 10s linear infinite;
}

.bg-particles span:nth-child(1) {
    left: 12%;
    top: 16%;
    animation-duration: 8s;
}

.bg-particles span:nth-child(2) {
    left: 28%;
    top: 7%;
    width: 3px;
    height: 3px;
    animation-duration: 11s;
}

.bg-particles span:nth-child(3) {
    left: 49%;
    top: 24%;
    animation-duration: 9s;
}

.bg-particles span:nth-child(4) {
    left: 64%;
    top: 12%;
    width: 5px;
    height: 5px;
    animation-duration: 13s;
}

.bg-particles span:nth-child(5) {
    left: 78%;
    top: 34%;
    animation-duration: 10s;
}

.bg-particles span:nth-child(6) {
    left: 22%;
    top: 58%;
    width: 3px;
    height: 3px;
    animation-duration: 12s;
}

.bg-particles span:nth-child(7) {
    left: 54%;
    top: 70%;
    animation-duration: 9s;
}

.bg-particles span:nth-child(8) {
    left: 86%;
    top: 74%;
    width: 3px;
    height: 3px;
    animation-duration: 14s;
}

@keyframes bgPulse {
    from {
        opacity: 0.9;
    }

    to {
        opacity: 1;
        transform: scale(1.04);
    }
}

@keyframes gridDrift {
    from {
        transform: perspective(900px) rotateX(62deg) translateY(45px) translateX(0) scale(1.2);
    }

    to {
        transform: perspective(900px) rotateX(62deg) translateY(32px) translateX(-38px) scale(1.24);
    }
}

@keyframes noiseShift {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-2%, 1%);
    }

    50% {
        transform: translate(1%, -1%);
    }

    75% {
        transform: translate(2%, 1%);
    }

    100% {
        transform: translate(0, 0);
    }
}

@keyframes orbFloatA {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(52px, 34px);
    }

    100% {
        transform: translate(-12px, -8px);
    }
}

@keyframes orbFloatB {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-48px, 42px);
    }

    100% {
        transform: translate(10px, -20px);
    }
}

@keyframes orbFloatC {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(44px, -38px);
    }

    100% {
        transform: translate(-8px, 14px);
    }
}

@keyframes orbFloatD {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-30px, -24px);
    }

    100% {
        transform: translate(14px, 10px);
    }
}

@keyframes particleFloat {
    0% {
        opacity: 0.25;
        transform: translateY(0) scale(0.7);
    }

    40% {
        opacity: 0.8;
        transform: translateY(-14px) scale(1);
    }

    100% {
        opacity: 0.18;
        transform: translateY(-34px) scale(0.7);
    }
}

@keyframes auroraRotate {
    from {
        transform: translateX(-50%) rotate(0deg);
    }

    to {
        transform: translateX(-50%) rotate(360deg);
    }
}

@keyframes fogDrift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-2%, -3%) scale(1.04);
    }

    100% {
        transform: translate(3%, 2%) scale(0.98);
    }
}

@media (max-width: 920px) {
    .bg-scene::before {
        width: min(980px, 108vw);
        top: -52%;
        opacity: 0.42;
    }

    .bg-grid {
        opacity: 0.1;
        transform: perspective(820px) rotateX(64deg) translateY(52px) scale(1.26);
    }

    .orb-b {
        width: 420px;
        height: 420px;
    }

    .orb-c {
        left: 10%;
    }
}

@media (max-width: 640px) {

    .bg-grid,
    .bg-noise,
    .bg-scene::before {
        display: none;
    }

    .bg-scene::after {
        inset: 24% -40% -36%;
        opacity: 0.38;
    }

    .bg-orb {
        filter: blur(40px);
        opacity: 0.3;
    }

    .orb-a {
        width: 300px;
        height: 300px;
        left: -120px;
        top: -80px;
    }

    .orb-b {
        width: 320px;
        height: 320px;
        right: -120px;
        top: 25%;
    }

    .orb-c,
    .orb-d {
        display: none;
    }

    .bg-particles span:nth-child(n + 5) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    body::before,
    .bg-scene::before,
    .bg-scene::after,
    .bg-grid,
    .bg-noise,
    .bg-orb,
    .bg-particles span,
    .input-section::before,
    .header::after,
    .logo-icon {
        animation: none !important;
    }

    .header,
    .input-section,
    .feature-card,
    .platform-badge,
    .fetch-btn {
        transition: none !important;
    }

    .header:hover,
    .input-section:hover,
    .feature-card:hover,
    .platform-badge:hover {
        transform: none !important;
    }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Header & Typography */
.header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 0.8s ease-out;
    position: relative;
    width: 100%;
    padding: 28px 24px 24px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(140deg, rgba(12, 18, 38, 0.7), rgba(8, 12, 28, 0.52)),
        radial-gradient(circle at 20% 8%, rgba(0, 242, 234, 0.18), transparent 38%);
    box-shadow:
        0 14px 40px rgba(2, 5, 16, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.header:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 20px 48px rgba(2, 5, 16, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 35%, rgba(255, 255, 255, 0.03));
    pointer-events: none;
}

.header::after {
    content: '';
    position: absolute;
    inset: -140% -20% 58% -35%;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
    transform: rotate(9deg);
    opacity: 0.7;
    animation: headerSweep 10.5s ease-in-out infinite;
    pointer-events: none;
}

.logo {
    font-size: clamp(2.8rem, 7vw, 4.2rem);
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
    background: linear-gradient(to right, #00f2ea, #7b2cbf, #ff0055, #00f2ea);
    background-size: 300% auto;
    animation: shine 6s linear infinite;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(123, 44, 191, 0.4));
    display: inline-flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

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

.logo-icon {
    font-size: 3.2rem;
    background: linear-gradient(135deg, #ff0055, #7b2cbf);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(255, 0, 85, 0.3));
    animation: float 3s ease-in-out infinite;
}

.tagline {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.74);
    font-weight: 600;
    font-family: var(--font-display);
    letter-spacing: 2.2px;
    text-transform: uppercase;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.tagline span {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: default;
}

.badge-yt {
    color: rgba(255, 255, 255, 0.8);
}

.badge-yt i {
    color: #ff0000;
    font-size: 1.15rem;
}

.badge-yt:hover {
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.4);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.2);
    transform: translateY(-2px);
    color: #fff;
}

.badge-ig {
    color: rgba(255, 255, 255, 0.8);
}

.badge-ig i {
    color: #e1306c;
    font-size: 1.15rem;
}

.badge-ig:hover {
    background: rgba(225, 48, 108, 0.1);
    border-color: rgba(225, 48, 108, 0.4);
    box-shadow: 0 6px 20px rgba(225, 48, 108, 0.2);
    transform: translateY(-2px);
    color: #fff;
}

.badge-tt {
    color: rgba(255, 255, 255, 0.8);
}

.badge-tt i {
    color: #00f2ea;
    font-size: 1.15rem;
}

.badge-tt:hover {
    background: rgba(0, 242, 234, 0.1);
    border-color: rgba(0, 242, 234, 0.4);
    box-shadow: 0 6px 20px rgba(0, 242, 234, 0.2);
    transform: translateY(-2px);
    color: #fff;
}

.slogan {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    animation: fadeIn 1s ease-out 0.2s both;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes panelSweep {
    0% {
        transform: translateX(-110%);
    }

    45%,
    100% {
        transform: translateX(110%);
    }
}

@keyframes headerSweep {
    0% {
        transform: translateX(-12%) rotate(9deg);
        opacity: 0.1;
    }

    35% {
        opacity: 0.8;
    }

    70%,
    100% {
        transform: translateX(12%) rotate(9deg);
        opacity: 0;
    }
}

/* Main Input Area */
.main {
    width: 100%;
    max-width: 680px;
    z-index: 10;
}

/* Unified Interactive Card Style */
.feature-card,
.frame-extractor-card,
.convert-studio-card,
.tool-card,
.live-record-card,
.playlist-card {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-card:hover,
.frame-extractor-card:hover,
.convert-studio-card:hover,
.tool-card:hover,
.live-record-card:hover,
.playlist-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 242, 234, 0.3);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 242, 234, 0.1);
}

.input-section {
    position: relative;
    margin-bottom: 40px;
    padding: 16px 16px 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(145deg, rgba(8, 14, 32, 0.62), rgba(8, 12, 27, 0.42)),
        radial-gradient(circle at 14% 14%, rgba(0, 242, 234, 0.1), transparent 45%);
    box-shadow:
        0 16px 34px rgba(3, 6, 18, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.input-section:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow:
        0 22px 42px rgba(3, 6, 18, 0.44),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.input-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.07), transparent);
    transform: translateX(-110%);
    animation: panelSweep 8s ease-in-out infinite;
    pointer-events: none;
}

.input-section::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(130deg, rgba(12, 214, 206, 0.45), rgba(255, 67, 158, 0.32), rgba(255, 255, 255, 0.08));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.7;
    pointer-events: none;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(140deg, rgba(17, 19, 38, 0.78), rgba(11, 14, 30, 0.72));
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    padding: 2px;
}

.input-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
    pointer-events: none;
}

.input-wrapper:hover::before {
    transform: translateX(100%);
}

.input-wrapper:focus-within {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 50px -10px var(--accent-glow), 0 0 0 2px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.platform-icon {
    width: 60px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.url-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.15rem;
    padding: 20px 16px;
    font-family: var(--font-main);
    width: 100%;
    outline: none;
    transition: all 0.3s ease;
}

.url-input::placeholder {
    color: var(--text-muted);
    transition: opacity 0.3s;
    font-weight: 400;
}

.url-input:focus::placeholder {
    opacity: 0.5;
}

.fetch-btn {
    position: relative;
    padding: 0 32px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 56px;
    margin: 4px;
    box-shadow: 0 6px 20px rgba(255, 60, 172, 0.25);
    overflow: hidden;
    isolation: isolate;
}

.fetch-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: translateX(-150%) skewX(-15deg);
    transition: transform 0.6s;
    z-index: -1;
}

.fetch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 60, 172, 0.4);
    filter: brightness(1.1);
}

.fetch-btn:hover::before {
    transform: translateX(150%) skewX(-15deg);
}

.fetch-btn:active {
    transform: translateY(1px);
}

.fetch-btn.loading {
    background: linear-gradient(135deg, #FF3CAC 0%, #784BA0 50%, #2B86C5 100%);
    background-size: 200% 200%;
    animation: gradientMove 2s ease infinite;
    pointer-events: none;
}

.fetch-btn.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg) translateX(-150%);
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

/* Supported Badges */
.supported-platforms {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    opacity: 0.92;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.input-section:hover .supported-platforms {
    opacity: 1;
    transform: translateY(-1px);
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    height: 37px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
    cursor: default;
    color: var(--text-secondary);
}

.platform-badge i {
    font-size: 1rem;
}

.platform-badge.youtube:hover {
    transform: translateY(-2px);
    color: #ff0000;
    border-color: rgba(255, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
}

.platform-badge.instagram:hover {
    transform: translateY(-2px);
    color: #e1306c;
    border-color: rgba(225, 48, 108, 0.4);
    box-shadow: 0 0 15px rgba(225, 48, 108, 0.2);
}

.platform-badge.tiktok:hover {
    transform: translateY(-2px);
    color: #00f2ea;
    border-color: rgba(0, 242, 234, 0.4);
    box-shadow: 0 0 15px rgba(0, 242, 234, 0.2);
}

.platform-badge.twitter:hover {
    transform: translateY(-2px);
    color: #1da1f2;
    border-color: rgba(29, 161, 242, 0.4);
    box-shadow: 0 0 15px rgba(29, 161, 242, 0.2);
}

.platform-badge.facebook:hover {
    transform: translateY(-2px);
    color: #1877f2;
    border-color: rgba(24, 119, 242, 0.4);
    box-shadow: 0 0 15px rgba(24, 119, 242, 0.2);
}

.platform-badge.twitch:hover {
    transform: translateY(-2px);
    color: #9146ff;
    border-color: rgba(145, 70, 255, 0.4);
    box-shadow: 0 0 15px rgba(145, 70, 255, 0.2);
}

.platform-badge.pinterest:hover {
    transform: translateY(-2px);
    color: #E60023;
    border-color: rgba(230, 0, 35, 0.4);
    box-shadow: 0 0 15px rgba(230, 0, 35, 0.2);
}

/* Workspace Navigation */
.workspace-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0 8px;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(145deg, rgba(10, 16, 36, 0.74), rgba(10, 14, 31, 0.64)),
        radial-gradient(circle at 12% 12%, rgba(0, 242, 234, 0.08), transparent 38%);
    box-shadow:
        0 14px 34px rgba(2, 6, 18, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.workspace-btn {
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(229, 236, 255, 0.82);
    font-size: 0.84rem;
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: 0.25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.workspace-btn i {
    font-size: 0.96rem;
}

.workspace-btn:hover {
    transform: translateY(-1px);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
}

.workspace-btn.active {
    color: #fefeff;
    border-color: rgba(128, 225, 255, 0.44);
    background: linear-gradient(135deg, rgba(255, 67, 158, 0.34), rgba(66, 148, 245, 0.34));
    box-shadow:
        0 8px 20px rgba(19, 96, 180, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}


/* Video Card */
.video-card {
    position: relative;
    background:
        radial-gradient(circle at 92% 8%, rgba(0, 242, 234, 0.14), transparent 42%),
        radial-gradient(circle at 10% 88%, rgba(252, 0, 255, 0.12), transparent 38%),
        linear-gradient(140deg, rgba(9, 15, 34, 0.96), rgba(28, 17, 48, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-radius: 24px;
    overflow: hidden;
    margin-top: 36px;
    animation: cardEntry 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: grid;
    grid-template-columns: minmax(290px, 38%) minmax(0, 1fr);
    box-shadow:
        0 22px 56px rgba(1, 3, 11, 0.58),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.video-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 36%, rgba(255, 255, 255, 0.02));
    pointer-events: none;
    z-index: 1;
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.video-thumbnail {
    position: relative;
    padding: 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 10, 24, 0.45);
    z-index: 2;
}

.video-thumbnail-shell {
    position: relative;
    height: 100%;
    min-height: 330px;
    border-radius: 18px;
    overflow: hidden;
    background: #02050e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.video-media-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 4, 10, 0.1) 28%, rgba(2, 4, 10, 0.76) 100%),
        radial-gradient(circle at 85% 20%, rgba(0, 242, 234, 0.25), rgba(0, 242, 234, 0));
    pointer-events: none;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.06);
}

.video-corner-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(4, 9, 22, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.35px;
    z-index: 3;
}

.video-corner-tag i {
    color: #00f2ea;
    font-size: 0.92rem;
}

.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(4, 10, 25, 0.86);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 11px;
    border-radius: 9px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    z-index: 3;
}

.video-info {
    padding: 24px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.video-meta {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.video-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    font-size: 0.69rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: rgba(255, 255, 255, 0.68);
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(4, 8, 20, 0.46);
}

.video-kicker i {
    color: #00f2ea;
    font-size: 0.88rem;
}

.video-title {
    font-size: 1.38rem;
    font-weight: 800;
    line-height: 1.28;
    margin: 0;
    background: linear-gradient(90deg, #ffffff 0%, #d7ecff 46%, #bce7ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.video-uploader {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.88rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

/* Controls */
.download-options {
    margin-top: auto;
    background: linear-gradient(140deg, rgba(5, 11, 28, 0.66), rgba(6, 10, 24, 0.5));
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-group {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.option-group label {
    min-width: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.option-group label i {
    font-size: 1rem;
    color: #00f2ea;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex: 1;
}

.format-btn {
    flex: 1;
    padding: 11px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.11);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.84rem;
    transition: all 0.26s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.format-btn i {
    font-size: 1.02rem;
    opacity: 0.9;
}

.format-btn.active {
    background: linear-gradient(135deg, rgba(0, 242, 234, 0.2), rgba(0, 242, 234, 0.08));
    color: #ebffff;
    border-color: rgba(0, 242, 234, 0.45);
    box-shadow: 0 8px 18px rgba(0, 242, 234, 0.2);
}

.format-btn.active i {
    color: #98fffb;
}

.format-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
}

.quality-select {
    flex: 1;
    width: 100%;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.11);
    color: white;
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.84rem;
    transition: all 0.26s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ffffff' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80a8,8,0,0,1,11.32-11.32L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.quality-select:hover {
    background-color: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
}

.quality-select:focus {
    border-color: rgba(0, 242, 234, 0.48);
    box-shadow: 0 0 0 3px rgba(0, 242, 234, 0.12);
}

.quality-select option {
    background: #161a2e;
    color: white;
    padding: 10px;
}

.action-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 10px;
    margin-top: 2px;
}

.download-btn {
    padding: 14px 14px;
    background: linear-gradient(135deg, #00c9c5, #00f2ea);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: white;
    font-size: 0.97rem;
    font-weight: 700;
    border-radius: 13px;
    cursor: pointer;
    transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 10px 24px rgba(0, 242, 234, 0.34);
}

.download-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 242, 234, 0.44);
    filter: brightness(1.06);
}

.download-btn:active:not(:disabled) {
    transform: translateY(0);
}

.thumb-btn {
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    border-radius: 13px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.24s ease;
}

.thumb-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
    transform: translateY(-2px);
}

.thumb-btn i {
    font-size: 1rem;
    color: #00f2ea;
}

/* Progress Bar */
.progress-container {
    margin-top: 4px;
    padding: 14px;
    background: rgba(4, 9, 21, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 13px;
}

.progress-container.hidden {
    display: none;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-label {
    font-size: 0.73rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.progress-label i {
    font-size: 0.95rem;
    color: #00f2ea;
    animation: pulse 1.5s ease-in-out infinite;
}

.progress-percent {
    font-size: 0.88rem;
    font-weight: 800;
    color: #00f2ea;
    font-variant-numeric: tabular-nums;
}

.progress-bar {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00dbde, #00f2ea, #fc00ff, #00f2ea);
    background-size: 300% 100%;
    border-radius: 20px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: progressGradient 3s linear infinite;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShimmer 2s ease-in-out infinite;
}

.progress-glow {
    position: absolute;
    top: -4px;
    right: 0;
    width: 30px;
    height: 16px;
    background: rgba(0, 242, 234, 0.5);
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s;
}

.progress-container:not(.hidden) .progress-glow {
    opacity: 1;
}

.progress-text {
    margin-top: 9px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
    font-weight: 600;
}

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

    100% {
        background-position: 300% 50%;
    }
}

@keyframes progressShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmer {
    0% {
        transform: skewX(-20deg) translateX(-150%);
    }

    100% {
        transform: skewX(-20deg) translateX(150%);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-card {
        grid-template-columns: 1fr;
    }

    .video-thumbnail {
        padding: 14px 14px 10px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .video-thumbnail-shell {
        min-height: 260px;
    }

    .video-info {
        padding: 16px 16px 18px;
    }

    .option-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .option-group label {
        font-size: 0.7rem;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .header {
        margin-bottom: 30px;
        padding: 20px 14px 18px;
        border-radius: 18px;
    }

    .logo {
        font-size: 2.35rem;
    }

    .logo-icon {
        font-size: 2.35rem;
    }

    .tagline {
        gap: 8px;
        font-size: 0.7rem;
        letter-spacing: 1.3px;
    }

    .tagline span {
        padding: 5px 8px;
    }

    .slogan {
        font-size: 1rem;
    }

    .input-section {
        padding: 12px;
        border-radius: 18px;
    }

    .input-wrapper {
        flex-wrap: wrap;
        padding: 5px;
    }

    .url-input {
        width: 100%;
        text-align: center;
        order: 2;
        padding: 10px;
    }

    .fetch-btn {
        width: 100%;
        order: 3;
        margin: 6px 0 0;
        height: 44px;
        border-radius: 14px;
    }

    .platform-icon {
        display: none;
    }

    .supported-platforms {
        gap: 8px;
        margin-top: 14px;
    }

    .platform-badge {
        font-size: 0.78rem;
        height: 34px;
        padding: 7px 12px;
    }

    .workspace-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 7px;
    }

    .workspace-btn {
        min-height: 42px;
        font-size: 0.8rem;
        gap: 6px;
    }
}

@media (max-width: 460px) {
    .workspace-nav {
        grid-template-columns: 1fr;
    }
}

/* Paste Button */
.paste-btn {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    margin-right: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    color: var(--text-primary);
}

.paste-btn:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.24);
    transform: scale(1.1);
}

.paste-btn:active {
    transform: scale(0.95);
}

/* Features / How-to Section */
.features-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 50px;
    animation: fadeInUp 1s ease-out;
    width: 100%;
    perspective: 1000px;
}

.feature-card {
    background:
        radial-gradient(circle at 18% 12%, rgba(12, 214, 206, 0.14), transparent 42%),
        linear-gradient(150deg, rgba(9, 14, 33, 0.9), rgba(17, 14, 32, 0.84));
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 25px;
    border-radius: var(--radius-md);
    text-align: center;
    backdrop-filter: blur(15px);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 14px 34px rgba(1, 4, 14, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.08), transparent 40%, rgba(255, 255, 255, 0.03));
    pointer-events: none;
}

.feature-card::after {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    right: -58px;
    top: -58px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 67, 158, 0.3), rgba(255, 67, 158, 0));
    opacity: 0.7;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-8px) rotateX(2deg);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow:
        0 20px 40px rgba(2, 6, 17, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.feature-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(255, 60, 172, 0.13), rgba(43, 134, 197, 0.14));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.feature-card h3 {
    font-size: 1.18rem;
    margin-bottom: 10px;
    font-family: var(--font-display);
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.92rem;
    color: rgba(232, 240, 255, 0.74);
    line-height: 1.5;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Features */
@media (max-width: 768px) {
    .features-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .paste-btn {
        margin-right: 0;
        margin-bottom: 10px;
        width: 100%;
        border-radius: var(--radius-sm);
    }

    .input-wrapper {
        flex-wrap: wrap;
    }
}

/* Icon Styles */
i.ph,
i.ph-fill,
i.ph-bold {
    vertical-align: middle;
    display: inline-block;
}

.platform-icon {
    font-size: 1.8rem;
    padding: 0 15px;
    opacity: 0.8;
    color: var(--text-primary);
}

.paste-btn i {
    font-size: 1.4rem;
}

.feature-icon i {
    font-size: 2.15rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(120, 75, 160, 0.45));
}

/* Brand Colors for Icons */
.ph-youtube-logo {
    color: #ff0000;
}

.ph-instagram-logo {
    color: #e1306c;
}

.ph-tiktok-logo {
    color: #00f2ea;
}

.platform-badge i {
    font-size: 1rem;
    margin-right: 0;
    vertical-align: middle;
}

.download-btn i {
    font-size: 1.3rem;
}

.format-btn i {
    margin-right: 0;
    font-size: 1rem;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: rgba(10, 15, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: right center;
}

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.toast.hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateX(120%) scale(0.9);
    }
}

.toast.success {
    border-left: 4px solid var(--success);
    box-shadow: 0 10px 30px rgba(0, 242, 234, 0.15);
}

.toast.success::before {
    content: '✨';
    font-size: 1.2rem;
}

.toast.error {
    border-left: 4px solid var(--error);
    box-shadow: 0 10px 30px rgba(255, 0, 85, 0.15);
}

.toast.error::before {
    content: '⚠️';
    font-size: 1.2rem;
}

.toast.info {
    border-left: 4px solid #3b82f6;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

.toast.info::before {
    content: 'ℹ️';
    font-size: 1.2rem;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading Spinner */
.loader,
.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

.hidden {
    display: none !important;
}

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

/* Base class for smooth entry animations */
.feature-card,
.frame-extractor-card,
.convert-studio-card,
.tool-card,
.live-record-card,
.playlist-card,
.input-section,
.history-section,
#studioContent {
    animation: slideFadeIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skeleton Loaders */
.skeleton-loader {
    width: 100%;
}

.skeleton-line {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.03) 0%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.03) 100%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s infinite linear;
}

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

    100% {
        background-position: -200% 0;
    }
}

/* Button Loading States */
.btn-loader {
    display: none;
    /* Hidden by default */
}

.fetch-btn.loading .btn-text,
.download-btn.loading .btn-text {
    display: none;
}

.fetch-btn.loading .btn-loader,
.download-btn.loading .btn-loader {
    display: inline-block;
}

.fetch-btn.loading,
.download-btn.loading {
    cursor: not-allowed;
    opacity: 0.8;
}

/* History Section */
.history-section {
    width: 100%;
    margin-top: 40px;
    animation: fadeInUp 1s ease-out;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
}

.section-header h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.clear-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.clear-btn:hover {
    color: var(--error);
    background: rgba(255, 0, 85, 0.05);
}

.history-list {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px 25px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
}

.history-list::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.history-item {
    flex: 0 0 160px;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.history-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.history-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}

.history-details {
    padding: 12px;
}

.history-details h4 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.history-details p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Action buttons use the Video Card styles above */

/* Playlist Card */
.playlist-card {
    width: 100%;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out;
}

.playlist-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.playlist-list::-webkit-scrollbar {
    width: 6px;
}

.playlist-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.playlist-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.playlist-item {
    display: grid;
    grid-template-columns: 120px 1fr 50px;
    align-items: center;
    gap: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--glass-border);
    transform: translateX(5px);
}

.playlist-thumb {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 16/9;
}

.playlist-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-thumb .duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.playlist-details h4 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-details p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.select-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.playlist-item:hover .select-btn {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: scale(1.1);
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

@media (max-width: 600px) {
    .playlist-item {
        grid-template-columns: 80px 1fr 40px;
        gap: 12px;
    }
}

/* Footer */
.footer {
    margin-top: 3rem;
    padding: 30px 20px 20px;
    text-align: center;
}

.footer-divider {
    width: 120px;
    height: 2px;
    margin: 0 auto 20px;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 234, 0.4), rgba(252, 0, 255, 0.4), transparent);
    border-radius: 2px;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.footer-text strong {
    color: var(--text-primary);
}

.footer-heart {
    color: #ff4757;
    font-size: 1rem;
    animation: heartbeat 1.5s ease-in-out infinite;
    margin: 0 2px;
}

.footer-sub {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.15);
    }
}

/* ===== TikTok Live Recording Panel ===== */
.live-record-card {
    position: relative;
    background:
        radial-gradient(circle at 88% 10%, rgba(255, 66, 144, 0.22), transparent 44%),
        radial-gradient(circle at 8% 88%, rgba(0, 242, 234, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(9, 12, 30, 0.96), rgba(20, 14, 37, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    padding: 0;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
    box-shadow:
        0 20px 55px rgba(4, 6, 20, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    animation: fadeSlideUp 0.55s ease;
}

.live-record-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 77, 106, 0.08), transparent 42%, rgba(0, 242, 234, 0.08));
    pointer-events: none;
}

.live-record-glow {
    position: absolute;
    width: 260px;
    height: 260px;
    right: -80px;
    top: -100px;
    background: radial-gradient(circle, rgba(255, 77, 106, 0.4), rgba(255, 77, 106, 0));
    filter: blur(22px);
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.live-record-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    position: relative;
    z-index: 2;
}

.live-header-left,
.live-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-header-left {
    min-width: 0;
}

.live-header-right {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-dot {
    width: 11px;
    height: 11px;
    background: #ff2d2d;
    border-radius: 50%;
    animation: livePulse 1.2s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(255, 45, 45, 0.7);
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 45, 45, 0.75);
    }

    50% {
        opacity: 0.42;
        transform: scale(0.8);
        box-shadow: 0 0 2px rgba(255, 45, 45, 0.28);
    }
}

.live-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    color: #ff607d;
    text-transform: uppercase;
}

.live-channel-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.live-channel-label {
    font-size: 0.66rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.live-channel-value {
    font-size: 1.06rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.live-status-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 7px 13px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.88);
    transition: all 0.25s ease;
}

.live-status-badge.recording {
    background: rgba(255, 45, 85, 0.2);
    border-color: rgba(255, 45, 85, 0.42);
    color: #ff8aa3;
    animation: statusGlow 2s ease-in-out infinite;
}

.live-status-badge.finished {
    background: rgba(46, 213, 115, 0.2);
    border-color: rgba(46, 213, 115, 0.38);
    color: #71f0a6;
}

.live-status-badge.failed {
    background: rgba(255, 59, 48, 0.2);
    border-color: rgba(255, 59, 48, 0.45);
    color: #ff9a90;
}

@keyframes statusGlow {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(255, 45, 45, 0);
    }

    50% {
        box-shadow: 0 0 14px rgba(255, 45, 85, 0.28);
    }
}

.live-watch-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(255, 45, 106, 0.18), rgba(255, 45, 106, 0.08));
    border: 1px solid rgba(255, 45, 106, 0.3);
    border-radius: 999px;
    color: #ff9fb5;
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.live-watch-link:hover {
    background: linear-gradient(135deg, rgba(255, 45, 106, 0.28), rgba(255, 45, 106, 0.13));
    border-color: rgba(255, 45, 106, 0.48);
    color: #ffc4d1;
    transform: translateY(-1px) scale(1.01);
}

.format-badge.video {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.05));
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.format-badge.audio {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.05));
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.format-badge.image {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.05));
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.stat-val.highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.live-record-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
    gap: 20px;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* Live Stream Viewer */
.live-stream-viewer {
    padding: 0;
    border-bottom: none;
}

.live-stream-frame {
    padding: 10px;
    border-radius: 20px;
    background: rgba(5, 7, 18, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.live-stream-embed {
    background:
        radial-gradient(circle at 65% 0%, rgba(255, 77, 106, 0.22), rgba(255, 77, 106, 0)),
        rgba(0, 0, 0, 0.52);
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    min-height: 360px;
    max-height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-stream-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.66);
    padding: 36px;
    text-align: center;
}

.live-stream-placeholder>i {
    font-size: 3.1rem;
    color: #ff4d6a;
    opacity: 0.75;
}

.live-stream-placeholder>span {
    font-size: 1.08rem;
    font-weight: 700;
    color: #ffffff;
}

.live-stream-placeholder>p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.62);
    margin: 0;
    line-height: 1.55;
    max-width: 280px;
}

.live-stream-placeholder small,
.live-inline-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 77, 106, 0.34);
    background: rgba(255, 77, 106, 0.12);
    color: #ffafbf;
    font-size: 0.74rem;
    margin-top: 5px;
}

.live-stream-embed iframe,
.live-stream-embed video,
.live-preview-video {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
    background: #030407;
}

.live-stream-note {
    margin: 12px 4px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.77rem;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.45;
}

.live-stream-note>i {
    color: rgba(0, 242, 234, 0.86);
    font-size: 1rem;
    margin-top: 1px;
    flex-shrink: 0;
}

.live-record-body {
    padding: 16px;
    border-radius: 20px;
    background: rgba(8, 10, 24, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.live-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
}

.live-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 13px;
    transition: all 0.25s ease;
}

.live-stat:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.live-stat>i {
    font-size: 1.3rem;
    color: rgba(0, 242, 234, 0.9);
    opacity: 0.95;
}

.live-stat-label {
    display: block;
    font-size: 0.66rem;
    color: rgba(255, 255, 255, 0.56);
    text-transform: uppercase;
    letter-spacing: 1.1px;
    margin-bottom: 2px;
}

.live-stat-value {
    display: block;
    font-size: 1.12rem;
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.live-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 2px;
    margin-bottom: 0;
}

.live-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s ease;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.live-start-btn {
    background: linear-gradient(135deg, #ff2d55, #ff6f8d);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
    box-shadow: 0 8px 22px rgba(255, 45, 85, 0.34);
}

.live-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 45, 85, 0.42);
}

.live-start-btn:active {
    transform: translateY(0);
}

.live-stop-btn {
    background: linear-gradient(135deg, #ff3b30, #de5d39);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
    box-shadow: 0 8px 22px rgba(255, 59, 48, 0.34);
    animation: stopPulse 2s ease-in-out infinite;
}

@keyframes stopPulse {

    0%,
    100% {
        box-shadow: 0 8px 22px rgba(255, 59, 48, 0.35);
    }

    50% {
        box-shadow: 0 8px 28px rgba(255, 59, 48, 0.56);
    }
}

.live-stop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 59, 48, 0.5);
}

.live-download-btn {
    background: linear-gradient(135deg, #00d6d1, #00f2ea);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 242, 234, 0.3);
}

.live-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 242, 234, 0.42);
}

.live-info-text {
    font-size: 0.77rem;
    color: rgba(255, 255, 255, 0.74);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 13px;
    background: rgba(0, 242, 234, 0.08);
    border: 1px solid rgba(0, 242, 234, 0.15);
    border-radius: 12px;
    line-height: 1.55;
    margin: 0;
}

.live-info-text>i {
    font-size: 1rem;
    margin-top: 1px;
    flex-shrink: 0;
    color: rgba(0, 242, 234, 0.92);
}

.live-guide-list {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.live-guide-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.45;
}

.live-guide-list li i {
    color: rgba(0, 242, 234, 0.9);
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Recording active state */
.live-record-card.recording {
    border-color: rgba(255, 45, 85, 0.36);
    box-shadow:
        0 0 0 1px rgba(255, 45, 85, 0.24),
        0 24px 60px rgba(3, 6, 19, 0.62);
}

.live-record-card.recording .live-record-glow {
    opacity: 0.75;
}

.live-record-card.recording .live-record-header {
    background: linear-gradient(180deg, rgba(255, 45, 106, 0.16), rgba(255, 45, 106, 0.04));
}

.live-record-card.recording .live-stream-frame {
    border-color: rgba(255, 45, 85, 0.3);
}

/* Responsive */
@media (max-width: 1080px) {
    .live-record-layout {
        grid-template-columns: 1fr;
    }

    .live-stream-embed {
        max-height: 560px;
        min-height: 340px;
    }
}

@media (max-width: 768px) {
    .live-record-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 18px 18px 14px;
    }

    .live-header-right {
        justify-content: space-between;
    }

    .live-record-layout {
        padding: 14px;
        gap: 14px;
    }

    .live-record-body {
        padding: 12px;
    }
}

@media (max-width: 560px) {
    .live-stats {
        grid-template-columns: 1fr;
    }

    .live-stream-embed {
        min-height: 290px;
    }

    .live-channel-value {
        max-width: 190px;
    }

    .live-btn {
        padding: 12px 14px;
    }

    .live-watch-link {
        font-size: 0.74rem;
        padding: 7px 12px;
    }
}

/* Frame Extractor */
.frame-extractor-card {
    margin-top: 34px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(circle at 8% 10%, rgba(0, 242, 234, 0.12), transparent 40%),
        radial-gradient(circle at 92% 0%, rgba(255, 60, 172, 0.13), transparent 42%),
        linear-gradient(140deg, rgba(8, 13, 30, 0.92), rgba(12, 17, 35, 0.9));
    box-shadow:
        0 20px 56px rgba(2, 5, 15, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    padding: 22px;
    overflow: hidden;
    position: relative;
}

.frame-extractor-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 42%, rgba(255, 255, 255, 0.02));
    pointer-events: none;
}

.frame-extractor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.frame-extractor-header h3 {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 1.05rem;
    font-family: var(--font-display);
    letter-spacing: 0.2px;
}

.frame-extractor-header h3 i {
    color: rgba(0, 242, 234, 0.95);
    font-size: 1.2rem;
}

.frame-extractor-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.frame-extractor-subtitle {
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.55;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.frame-source-switch {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.frame-source-btn {
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.74);
    padding: 9px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.frame-source-btn.active {
    background: linear-gradient(135deg, rgba(255, 60, 172, 0.45), rgba(59, 132, 247, 0.38));
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(16, 41, 79, 0.3);
}

.frame-source-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.frame-source-panel label {
    font-size: 0.73rem;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.58);
    font-weight: 700;
}

.frame-input,
.frame-option-input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 12, 28, 0.74);
    color: #fff;
    padding: 12px 13px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.frame-input:focus,
.frame-option-input:focus {
    border-color: rgba(0, 242, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 242, 234, 0.14);
}

.frame-upload-dropzone {
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.frame-upload-dropzone.dragover {
    border-color: rgba(0, 242, 234, 0.6);
    background: rgba(0, 242, 234, 0.09);
}

.frame-pick-btn {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 10px;
    padding: 9px 13px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.frame-pick-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.frame-file-name {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
    word-break: break-all;
}

.frame-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.frame-option {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.frame-option label {
    font-size: 0.72rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.58);
    font-weight: 700;
}

.frame-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    position: relative;
    z-index: 1;
}

.frame-extract-btn,
.frame-zip-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.86rem;
    font-weight: 800;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.frame-extract-btn {
    flex: 1 1 auto;
    background: linear-gradient(135deg, #ff3cac, #3b84f7);
    box-shadow: 0 12px 24px rgba(24, 56, 115, 0.35);
    position: relative;
}

.frame-extract-btn .btn-loader {
    display: none;
}

.frame-extract-btn.loading .btn-text {
    opacity: 0.6;
}

.frame-extract-btn.loading .btn-loader {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 999px;
    animation: spin 0.8s linear infinite;
}

.frame-zip-btn {
    background: linear-gradient(135deg, #00d6d1, #17b8ff);
    box-shadow: 0 12px 24px rgba(7, 94, 133, 0.34);
}

.frame-extract-btn:hover,
.frame-zip-btn:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
}

.frame-extract-btn:disabled {
    cursor: default;
    opacity: 0.7;
}

.frame-status-text {
    margin-top: 12px;
    padding: 11px 12px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.8rem;
    line-height: 1.45;
    position: relative;
    z-index: 1;
}

.frame-status-text.is-success {
    border-color: rgba(0, 242, 234, 0.36);
    background: rgba(0, 242, 234, 0.1);
    color: rgba(232, 255, 255, 0.95);
}

.frame-status-text.is-error {
    border-color: rgba(255, 77, 122, 0.42);
    background: rgba(255, 77, 122, 0.1);
    color: rgba(255, 216, 225, 0.95);
}

.frame-results {
    margin-top: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(7, 11, 24, 0.72);
    padding: 12px;
    position: relative;
    z-index: 1;
}

.frame-results-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
}

.frame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.frame-item {
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.frame-item:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 242, 234, 0.42);
}

.frame-preview-trigger {
    width: 100%;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: zoom-in;
    display: block;
}

.frame-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: rgba(0, 0, 0, 0.2);
}

.frame-item-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 9px;
}

.frame-item span {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.77);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.frame-download-link {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.frame-download-link:hover {
    color: #fff;
    border-color: rgba(0, 242, 234, 0.5);
    background: rgba(0, 242, 234, 0.14);
}

.frame-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.frame-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 5, 15, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.frame-preview-dialog {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    max-height: calc(100vh - 60px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(8, 12, 30, 0.94);
    padding: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.frame-preview-dialog img {
    width: 100%;
    max-height: calc(100vh - 170px);
    object-fit: contain;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
}

.frame-preview-close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(7, 10, 24, 0.75);
    color: #fff;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.frame-preview-caption {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.78);
    text-align: center;
    margin: 0;
}

@media (max-width: 720px) {
    .frame-extractor-card {
        padding: 16px;
    }

    .frame-options-grid {
        grid-template-columns: 1fr;
    }

    .frame-actions {
        flex-direction: column;
    }

    .frame-zip-btn,
    .frame-extract-btn {
        width: 100%;
    }

    .frame-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .frame-preview-dialog {
        padding: 10px;
    }

    .frame-preview-dialog img {
        max-height: calc(100vh - 140px);
    }
}

/* Convert Studio */
.convert-studio-card {
    margin-top: 34px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(circle at 14% 0%, rgba(255, 146, 84, 0.12), transparent 42%),
        radial-gradient(circle at 96% 12%, rgba(64, 186, 255, 0.14), transparent 44%),
        linear-gradient(145deg, rgba(9, 15, 32, 0.95), rgba(14, 18, 38, 0.92));
    box-shadow:
        0 20px 56px rgba(2, 5, 15, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    padding: 22px;
    position: relative;
    overflow: hidden;
}

.convert-studio-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 42%, rgba(255, 255, 255, 0.02));
    pointer-events: none;
}

.convert-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.convert-header h3 {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 1.05rem;
    font-family: var(--font-display);
}

.convert-header h3 i {
    color: rgba(255, 168, 96, 0.95);
}

.convert-badge {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.84);
}

.convert-subtitle {
    position: relative;
    z-index: 1;
    margin-top: 10px;
    margin-bottom: 14px;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.55;
}

.convert-switch-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.convert-switch {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.04);
}

.convert-switch[data-kind="media"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.convert-switch[data-kind="source"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.convert-switch-btn {
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.74);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.convert-switch-btn.active {
    background: linear-gradient(135deg, rgba(255, 146, 84, 0.42), rgba(69, 157, 255, 0.38));
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.convert-source-group {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.convert-source-group label,
.convert-option label {
    font-size: 0.72rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.58);
    font-weight: 700;
}

.convert-input,
.convert-select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 12, 28, 0.74);
    color: #fff;
    padding: 11px 12px;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.convert-input:focus,
.convert-select:focus {
    border-color: rgba(255, 166, 92, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 166, 92, 0.14);
}

.convert-upload-dropzone {
    border: 1px dashed rgba(255, 255, 255, 0.24);
    border-radius: 13px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
}

.convert-upload-dropzone.dragover {
    border-color: rgba(255, 166, 92, 0.62);
    background: rgba(255, 166, 92, 0.09);
}

.convert-pick-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.convert-file-name {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
    word-break: break-all;
}

.convert-options-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.convert-option {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.convert-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.convert-run-btn,
.convert-download-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.convert-run-btn {
    flex: 1 1 auto;
    background: linear-gradient(135deg, #ff9254, #468dff);
    box-shadow: 0 12px 24px rgba(35, 56, 96, 0.36);
}

.convert-run-btn .btn-loader {
    display: none;
}

.convert-run-btn.loading .btn-loader {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 999px;
    animation: spin 0.8s linear infinite;
}

.convert-run-btn.loading .btn-text {
    opacity: 0.65;
}

.convert-download-btn {
    background: linear-gradient(135deg, #00d6d1, #2db2ff);
    box-shadow: 0 12px 24px rgba(16, 84, 120, 0.34);
}

.convert-run-btn:hover,
.convert-download-btn:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
}

.convert-run-btn:disabled {
    cursor: default;
    opacity: 0.72;
}

.convert-status-text {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    padding: 11px 12px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.8rem;
    line-height: 1.45;
}

.convert-status-text.is-success {
    border-color: rgba(0, 242, 234, 0.36);
    background: rgba(0, 242, 234, 0.1);
    color: rgba(232, 255, 255, 0.95);
}

.convert-status-text.is-error {
    border-color: rgba(255, 77, 122, 0.42);
    background: rgba(255, 77, 122, 0.1);
    color: rgba(255, 216, 225, 0.95);
}

.convert-result-box {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(6, 11, 24, 0.74);
    padding: 12px;
}

.convert-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.75);
}

.convert-preview-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    margin-top: 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
}

.convert-preview-video {
    width: 100%;
    max-height: 340px;
    margin-top: 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.45);
}

.convert-preview-audio {
    width: 100%;
    margin-top: 10px;
    border-radius: 10px;
}

.preset-bar {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr auto auto;
    gap: 10px;
    margin-bottom: 12px;
}

.preset-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.preset-btn.alt {
    background: rgba(255, 160, 82, 0.16);
    border-color: rgba(255, 160, 82, 0.4);
}

.tool-card {
    margin-top: 24px;
    border-radius: 22px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(circle at 8% 0%, rgba(255, 168, 96, 0.1), transparent 38%),
        radial-gradient(circle at 88% 12%, rgba(62, 193, 255, 0.1), transparent 40%),
        linear-gradient(145deg, rgba(8, 14, 30, 0.92), rgba(13, 20, 38, 0.92));
    box-shadow:
        0 16px 42px rgba(3, 7, 20, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

.tool-card-header h3 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 1rem;
}

.tool-badge {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.86);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.tool-card-subtitle {
    margin: 10px 0 12px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.84rem;
}

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

.tool-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tool-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.tool-field label {
    font-size: 0.72rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.58);
    font-weight: 700;
}

.tool-help {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.74rem;
}

.tool-textarea {
    min-height: 96px;
    resize: vertical;
}

.tool-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.tool-result-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.tool-result-item {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    padding: 9px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tool-result-item .left {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-result-item .right a {
    color: #7fd6ff;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
}

.metric-box {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.62);
}

.metric-box strong {
    font-size: 0.92rem;
    color: #fff;
}

.favorite-list,
.health-list {
    min-height: 60px;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    padding: 8px;
    display: grid;
    gap: 6px;
}

.favorite-chip,
.health-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
}

.health-chip.ok {
    border: 1px solid rgba(74, 236, 194, 0.45);
}

.health-chip.bad {
    border: 1px solid rgba(255, 97, 127, 0.5);
}

.live-segment-settings {
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: end;
}

.live-segment-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.82rem;
}

.live-segment-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.live-segment-input-wrap label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.live-segment-input-wrap input {
    width: 120px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 8px 9px;
}

@media (max-width: 920px) {
    .convert-switch-row {
        grid-template-columns: 1fr;
    }

    .convert-options-grid {
        grid-template-columns: 1fr;
    }

    .preset-bar,
    .tool-grid-2,
    .tool-grid-3 {
        grid-template-columns: 1fr;
    }

    .live-segment-settings {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .convert-studio-card {
        padding: 16px;
    }

    .convert-actions {
        flex-direction: column;
    }

    .convert-run-btn,
    .convert-download-btn {
        width: 100%;
    }

    .tool-actions {
        flex-direction: column;
    }
}

/* Studio Navigation v2 */
.studio-nav-bar {
    display: flex;
    gap: 10px;
    background: var(--bg-secondary);
    padding: 10px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.studio-nav-btn {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-main);
}

.studio-nav-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.studio-nav-btn.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Jobs Filter Bar v2 */
.jobs-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: var(--bg-secondary);
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.filter-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.filter-chip {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-chip.active {
    background: rgba(0, 242, 234, 0.15);
    border-color: var(--success);
    color: var(--success);
}

.studio-content {
    animation: fadeIn 0.4s ease-out;
}

/* Responsiveness for Studio Nav */
@media (max-width: 600px) {
    .studio-nav-bar {
        flex-wrap: wrap;
    }

    .studio-nav-btn {
        flex: 1 1 calc(50% - 10px);
        font-size: 0.85rem;
    }
}

/* Advanced Frame Extractor UI */
.frame-settings-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.frame-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.frame-group {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.frame-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.frame-input,
.frame-select {
    width: 100%;
    padding: 12px 36px 12px 14px;
    /* Space for custom arrow */
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: all 0.3s;
    outline: none;
    cursor: pointer;
    appearance: none;
    /* Hide default arrow */
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ffffff' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

.frame-select:focus,
.frame-select:hover {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 242, 234, 0.15);
    background-color: rgba(0, 242, 234, 0.05);
}

.frame-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px;
}

.frame-input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    outline: none;
}

.frame-zip-actions {
    display: flex;
    gap: 0.8rem;
}

.frame-zip-btn.alt {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
}

.frame-grid-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
}

.text-btn:hover {
    text-decoration: underline;
}

/* Grid Logic */
.frame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--grid-size, 200px), 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.frame-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: #000;
}

.frame-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: all 0.2s;
}

/* Base selected state */
.frame-item.selected {
    border-color: var(--primary);
    /* Glowing cyan instead of green */
    box-shadow: 0 0 15px rgba(0, 242, 234, 0.4);
}

/* Dim the image slightly when selected for contrast */
.frame-item.selected img {
    opacity: 0.7;
    transform: scale(0.98);
}

.frame-item .check-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    /* Always visible to show it is selectable */
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.frame-item:hover .check-overlay {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.8);
}

.frame-item.selected .check-overlay {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 242, 234, 0.5);
    transform: scale(1.1);
}

.frame-item .check-overlay i {
    color: #000;
    font-size: 16px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s;
}

.frame-item.selected .check-overlay i {
    opacity: 1;
    transform: scale(1);
}