@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-deep: #020203;
    --bg-base: #050506;
    --bg-elevated: #0a0a0c;
    --surface: rgba(255, 255, 255, 0.03);
    --foreground: #ededef;
    --foreground-muted: #8a8f98;
    --accent: #5e6ad2;
    --accent-glow: rgba(94, 106, 210, 0.15);
    --border: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    --card-border: rgba(255, 255, 255, 0.08);
    --radius: 16px;
    --easing: cubic-bezier(0.16, 1, 0.3, 1);
    
    --success: #10b981;
    --error: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-deep) 100%);
    color: var(--foreground);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    pointer-events: none;
    will-change: filter;
    transform: translate3d(0, 0, 0);
}
.sphere-1 {
    top: -15%;
    left: -15%;
    width: 600px;
    height: 600px;
    background: var(--accent);
    opacity: 0.10;
}
.sphere-2 {
    bottom: -15%;
    right: -15%;
    width: 600px;
    height: 600px;
    background: #7c3aed;
    opacity: 0.10;
}
.sphere-3 {
    top: 35%;
    left: 45%;
    width: 500px;
    height: 500px;
    background: #db2777;
    opacity: 0.05;
}

.container {
    width: 100%;
    max-width: 520px;
    padding: 24px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-highlight);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius);
    padding: 44px;
    box-shadow: 
        0 40px 100px rgba(0, 0, 0, 0.8), 
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-align: center;
    position: relative;
    overflow: visible;
    z-index: 10;
    transition: box-shadow 0.3s ease;
}
.card:hover {
    box-shadow: 0 45px 110px rgba(0, 0, 0, 0.85), 0 0 40px rgba(94, 106, 210, 0.05);
}

header {
    margin-top: 20px;
    margin-bottom: 20px;
}

.logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 12px var(--accent));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 8px var(--accent)); }
    50% { filter: drop-shadow(0 0 18px rgba(94, 106, 210, 0.8)); }
}

h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 0;
    background: linear-gradient(135deg, #ffffff 0%, #c4c7f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 14px;
    color: var(--foreground-muted);
    margin-bottom: 20px;
    line-height: 1.5;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

/* Feature pills */
.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
    margin-bottom: 24px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    font-size: 12px;
    font-weight: 500;
    color: var(--foreground-muted);
    white-space: nowrap;
    transition: all 0.2s var(--easing);
    line-height: 1;
}

.pill-icon {
    font-size: 11px;
    opacity: 0.6;
    font-style: normal;
    line-height: 1;
}

.pill:hover {
    background: rgba(94, 106, 210, 0.1);
    border-color: rgba(94, 106, 210, 0.3);
    color: var(--foreground);
}

.pill-free {
    background: rgba(16, 185, 129, 0.07);
    border-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.pill-free .pill-icon {
    opacity: 0.8;
}

.pill-free:hover {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

/* Input with YouTube icon */
.input-wrapper {
    position: relative;
    width: 100%;
}

.input-yt-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff3c3c;
    opacity: 0.75;
    pointer-events: none;
    z-index: 1;
    display: block;
}

.input-wrapper input[type="url"] {
    padding-left: 46px;
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

input[type="url"] {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--foreground);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input[type="url"]:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
button.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #5e6ad2 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s var(--easing);
    box-shadow: 0 4px 14px var(--accent-glow);
}
button.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(94, 106, 210, 0.35);
}
button.btn:active {
    transform: translateY(0) scale(0.98);
}

/* Status States */
.state-view {
    display: none;
    margin-top: 16px;
    padding: 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--card-border);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status-text {
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 8px;
}

.status-detail {
    font-size: 13px;
    color: var(--foreground-muted);
}

/* Promo Banner */
.promo-banner {
    margin-top: 32px;
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(94, 106, 210, 0.06) 0%, rgba(124, 58, 237, 0.06) 100%);
    border: 1px solid rgba(94, 106, 210, 0.15);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.promo-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.promo-desc {
    font-size: 12px;
    color: var(--foreground-muted);
    line-height: 1.5;
}

.promo-link {
    color: #818cf8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    align-self: flex-start;
    transition: color 0.2s ease;
}

.promo-link:hover {
    color: #a5b4fc;
}

/* Success/Download Button */
.btn-success {
    background: var(--success) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25) !important;
}

.btn-success:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* Pipeline Progress Steps styling */
.pipeline-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    position: relative;
}
.pipeline-progress::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    z-index: 1;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    width: 30%;
    transition: opacity 0.4s ease;
}
.step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-deep);
    border: 2px solid var(--border);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}
.step-label {
    font-size: 11px;
    color: var(--foreground-muted);
    text-align: center;
    font-weight: 500;
}
/* Step active pulse animation */
@keyframes activePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(94, 106, 210, 0.4);
    }
    70% {
        transform: scale(1.12);
        box-shadow: 0 0 0 6px rgba(94, 106, 210, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(94, 106, 210, 0);
    }
}

.step.active .step-dot {
    border-color: var(--accent);
    background: var(--accent);
    animation: activePulse 1.8s infinite ease-in-out;
}

.step.finished .step-dot {
    border-color: var(--success);
    background: var(--success);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.step.failed .step-dot {
    border-color: var(--error);
    background: var(--error);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

/* Styled drop downs for quality/mode/lang options */
.styled-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--foreground);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8f98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}
.styled-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background-color: rgba(0, 0, 0, 0.45);
}
.styled-select:hover {
    border-color: rgba(255, 255, 255, 0.15);
}
.styled-select option {
    background-color: var(--bg-deep);
    color: var(--foreground);
}
.control-group label {
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Language selector dropdown positioning & styling */
.lang-selector-container {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 100;
}
.lang-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--foreground);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 8px;
}
.lang-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}
.lang-btn:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(5, 5, 6, 0.95);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px;
    width: 170px;
    max-height: 280px;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 200;
}
.lang-dropdown-menu.show {
    display: flex;
}
.lang-option {
    background: transparent;
    border: none;
    color: var(--foreground-muted);
    font-size: 13px;
    padding: 8px 12px;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-family: inherit;
    transition: all 0.2s ease;
    width: 100%;
}
.lang-option:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--foreground);
}
.lang-option.active {
    background: rgba(94, 106, 210, 0.15);
    color: #818cf8;
    font-weight: 500;
}
.globe-icon, .chevron-icon {
    opacity: 0.7;
    transition: transform 0.3s ease;
}
.lang-dropdown-menu.show ~ .lang-btn .chevron-icon {
    transform: rotate(180deg);
}
.input-group-stacked {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Custom color styling for individual feature pills */
.pill-blue .pill-icon {
    color: #60a5fa;
    opacity: 0.9;
}
.pill-blue:hover {
    background: rgba(96, 165, 250, 0.08);
    border-color: rgba(96, 165, 250, 0.25);
}

.pill-purple .pill-icon {
    color: #c084fc;
    opacity: 0.9;
}
.pill-purple:hover {
    background: rgba(192, 132, 252, 0.08);
    border-color: rgba(192, 132, 252, 0.25);
}

.pill-yellow .pill-icon {
    color: #fbbf24;
    opacity: 0.9;
}
.pill-yellow:hover {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.25);
}


