/* ============================
   Design System Tokens
   ============================ */

/* Custom Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(76, 125, 255, 0.35) rgba(11, 18, 32, 0.5);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(11, 18, 32, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(76, 125, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 125, 255, 0.5);
}

::-webkit-scrollbar-thumb:active {
    background: rgba(76, 125, 255, 0.7);
}

:root {
    --c-bg: #0B1220;
    --c-surface: #111A2E;
    --c-surface-2: #16213A;
    --c-text: #EAF0FF;
    --c-muted: #A9B4D0;
    --c-border: rgba(255, 255, 255, .08);
    --c-border-active: rgba(76, 125, 255, .45);

    --c-primary: #4C7DFF;
    --c-primary-2: #34D3C6;
    --c-danger: #FF4D4D;
    --c-warning: #FFB020;
    --c-success: #39D98A;
    --c-focus: #9BB6FF;

    --gradient-1: linear-gradient(135deg, #4C7DFF 0%, #34D3C6 100%);
    --gradient-glow: rgba(76, 125, 255, .25);
    --gradient-success: linear-gradient(135deg, #39D98A 0%, #34D3C6 100%);

    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --shadow-1: 0 8px 30px rgba(0, 0, 0, .35);
    --shadow-glow: 0 6px 24px rgba(76, 125, 255, .2);

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;

    --container: 720px;
}

/* ============================
   Reset & Base
   ============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    line-height: 1.5;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 700px 500px at 15% 25%, rgba(76, 125, 255, .07) 0%, transparent 70%),
        radial-gradient(ellipse 600px 500px at 85% 75%, rgba(52, 211, 198, .05) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--c-focus);
    outline-offset: 2px;
}

/* ============================
   Layout
   ============================ */
.main-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-5);
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--container);
    padding: var(--space-5);
    margin: var(--space-5) 0;
}

/* ============================
   Particles (subtle background)
   ============================ */
.particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--c-primary);
    opacity: 0;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }

    10% {
        opacity: 0.4;
    }

    90% {
        opacity: 0.15;
    }

    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(1);
    }
}

/* ============================
   Header
   ============================ */
.header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    text-decoration: none;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-1);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.logo-icon::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, .9);
    border-radius: 4px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.logo-icon::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 7px solid rgba(255, 255, 255, .9);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    top: 50%;
    left: 53%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.header h1 {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.header p,
.header-subtitle {
    color: var(--c-muted);
    font-size: 14px;
    margin-top: var(--space-1);
}

.header-formats {
    color: var(--c-muted);
    font-size: 12px;
    margin-top: var(--space-2);
    opacity: 0.5;
    letter-spacing: 0.5px;
}

/* ============================
   Action Buttons (Home Hub)
   ============================ */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.action-card {
    display: block;
    padding: var(--space-6) var(--space-5);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    text-decoration: none;
    color: var(--c-text);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.action-card:hover {
    border-color: var(--c-primary);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(76, 125, 255, 0.15);
}

.action-card:hover::before {
    opacity: 0.06;
}

.action-card-title {
    font-size: 18px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    margin-bottom: var(--space-2);
}

.action-card-desc {
    font-size: 13px;
    color: var(--c-muted);
    position: relative;
    z-index: 1;
}

.action-card:hover .action-card-title {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================
   Language Picker
   ============================ */
.lang-picker {
    display: flex;
    gap: var(--space-1);
    background: rgba(255, 255, 255, 0.04);
    padding: 3px;
    border-radius: var(--r-sm);
    border: 1px solid var(--c-border);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--c-muted);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}

.lang-btn:hover {
    color: var(--c-text);
    background: rgba(255, 255, 255, 0.05);
}

.lang-btn.active {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 2px 8px var(--gradient-glow);
}

/* ============================
   Trust Badges
   ============================ */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    font-size: 12px;
    color: var(--c-muted);
    transition: all 0.25s ease;
}

.trust-badge:hover {
    border-color: var(--c-primary);
    color: var(--c-text);
    background: rgba(76, 125, 255, 0.06);
    transform: translateY(-1px);
}

.trust-badge-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
}

.trust-badge-icon::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gradient-1);
    opacity: 0.7;
}

.trust-badge-text {
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* ============================
   Scenario Tabs
   ============================ */
.scenario-tabs {
    display: flex;
    gap: var(--space-1);
    margin-bottom: var(--space-5);
    padding: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--r-md);
    border: 1px solid var(--c-border);
}

.scenario-tab {
    flex: 1;
    padding: var(--space-3) var(--space-2);
    background: transparent;
    border: none;
    border-radius: var(--r-sm);
    color: var(--c-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.scenario-tab:hover {
    color: var(--c-text);
    background: rgba(255, 255, 255, 0.05);
}

.scenario-tab.active {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 2px 10px var(--gradient-glow);
}

.tab-content {
    display: none;
    animation: slideUp 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* ============================
   Section Titles
   ============================ */
.section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--c-muted);
    margin: var(--space-5) 0 var(--space-3);
    padding-left: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title:first-child {
    margin-top: 0;
}

/* ============================
   Picker Grid & Cards
   ============================ */
.picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: var(--space-3);
}

.url-picker-grid {
    width: 100%;
    margin-top: var(--space-3);
}

.url-picker-grid .picker-card {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    padding: var(--space-5);
    text-align: left;
}

.picker-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-3);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    color: var(--c-text);
}

.picker-card:hover {
    border-color: var(--c-primary);
    background: rgba(76, 125, 255, 0.06);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(76, 125, 255, 0.12);
}

.picker-card-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.picker-card-desc {
    font-size: 11px;
    color: var(--c-muted);
    text-align: center;
}

/* ============================
   Step 2: Picker ↔ Converter Toggle
   ============================ */
#pickerSection {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#pickerSection.hidden {
    display: none;
}

.step2 {
    display: none;
}

.step2.visible {
    display: block;
    animation: slideUp 0.3s ease;
}

/* ============================
   Back Button
   ============================ */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px var(--space-4);
    margin-bottom: var(--space-3);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    color: var(--c-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
    background: rgba(76, 125, 255, 0.06);
}

/* ============================
   Convert Top Bar
   ============================ */
.convert-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.type-toggle {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
}

.type-toggle-btn {
    padding: 6px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--c-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-toggle-btn.active {
    background: var(--c-primary);
    color: #fff;
}

.type-toggle-btn:hover:not(.active) {
    color: var(--c-text);
}

/* ============================
   Convert Info Section
   ============================ */
.convert-info-section {
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid var(--c-border);
}

.info-steps {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.info-step {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.info-step-num {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(76, 125, 255, 0.1);
    border: 1px solid rgba(76, 125, 255, 0.3);
    color: var(--c-primary);
    font-size: 13px;
    font-weight: 700;
}

.info-step-text {
    font-size: 13px;
    color: var(--c-muted);
    line-height: 1.5;
}

.format-guide-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: var(--space-4);
}

.format-guide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.format-guide-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
}

.format-guide-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--c-primary);
}

.format-guide-desc {
    font-size: 12px;
    color: var(--c-muted);
    line-height: 1.45;
}

@media (max-width: 600px) {
    .info-steps {
        flex-direction: column;
    }

    .format-guide-grid {
        grid-template-columns: 1fr;
    }

    .convert-topbar {
        flex-wrap: wrap;
        gap: var(--space-2);
    }
}

/* ============================
   Format Selectors
   ============================ */
.format-selectors {
    display: flex;
    align-items: flex-end;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
}

.format-select-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.format-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--c-muted);
}

.format-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    color: var(--c-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A9B4D0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.format-select:hover {
    border-color: var(--c-primary);
}

.format-select:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(76, 125, 255, 0.15);
}

.format-arrow {
    color: var(--c-muted);
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 10px;
    flex-shrink: 0;
}

/* ============================
   Upload Zone
   ============================ */
.upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.upload-zone {
    position: relative;
    border: 1px dashed rgba(255, 255, 255, .15);
    border-radius: var(--r-lg);
    padding: var(--space-6) var(--space-5);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background:
        radial-gradient(1000px 350px at 20% 0%, rgba(76, 125, 255, .06), transparent 60%),
        radial-gradient(1000px 350px at 80% 0%, rgba(52, 211, 198, .04), transparent 60%),
        var(--c-surface);
    overflow: hidden;
    flex: 1;
}

.upload-zone.small {
    padding: var(--space-5) var(--space-3);
}

.upload-zone.small .upload-icon {
    width: 44px;
    height: 44px;
    margin-bottom: var(--space-3);
}

.upload-zone.small .upload-title {
    font-size: 14px;
}

.upload-zone.small .upload-subtitle {
    font-size: 11px;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--c-primary);
    background:
        radial-gradient(800px 300px at 50% 0%, rgba(76, 125, 255, .10), transparent 60%),
        var(--c-surface);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(76, 125, 255, 0.08);
}

.upload-zone.drag-over {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--gradient-glow);
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-4);
    border-radius: 50%;
    background: rgba(76, 125, 255, 0.08);
    border: 1px solid rgba(76, 125, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    position: relative;
}

.upload-icon::after {
    content: '';
    width: 20px;
    height: 3px;
    background: var(--c-primary);
    border-radius: 2px;
    position: absolute;
}

.upload-icon::before {
    content: '';
    width: 3px;
    height: 20px;
    background: var(--c-primary);
    border-radius: 2px;
    position: absolute;
}

.upload-zone:hover .upload-icon {
    transform: scale(1.08);
}

.upload-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.upload-subtitle {
    font-size: 13px;
    color: var(--c-muted);
}

input[type="file"] {
    display: none;
}

/* ============================
   URL Zone
   ============================ */
.url-zone {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background:
        radial-gradient(800px 300px at 50% 0%, rgba(76, 125, 255, .06), transparent 60%),
        var(--c-surface);
    cursor: text;
    transition: all 0.3s ease;
    width: 100%;
    margin: 0 auto;
}

.url-zone.visible {
    display: flex;
}

.url-zone .upload-title {
    color: var(--c-muted);
    font-size: 17px;
}

.url-zone .upload-subtitle {
    color: rgba(255, 255, 255, 0.3);
}

.url-input {
    width: 100%;
    margin-top: var(--space-5);
    padding: var(--space-4) var(--space-5);
    background: rgba(5, 5, 15, 0.6);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    color: var(--c-text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.url-input:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(76, 125, 255, 0.15);
}

.url-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.url-options {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-3);
}

.url-select {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: rgba(10, 10, 20, 0.4);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    color: var(--c-text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    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='%23A9B4D0' 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 12px center;
    background-size: 14px;
    padding-right: 32px;
}

.url-select:hover {
    border-color: rgba(76, 125, 255, .3);
}

.url-select:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(76, 125, 255, 0.1);
}

.url-select option {
    background: var(--c-surface);
    color: var(--c-text);
}

/* ============================
   Editor Mode Toggle
   ============================ */
.editor-modes {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    justify-content: center;
}

.editor-mode-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    color: var(--c-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-mode-btn:hover {
    border-color: rgba(76, 125, 255, 0.5);
    color: white;
}

.editor-mode-btn.active {
    background: rgba(76, 125, 255, 0.15);
    border-color: var(--c-primary);
    color: white;
    box-shadow: 0 0 15px rgba(76, 125, 255, 0.2);
}

/* ============================
   Merge Zones
   ============================ */
.merge-zones {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.merge-zones.visible {
    display: grid;
}

/* ============================
   File Info
   ============================ */
.file-info {
    display: none;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    margin-top: var(--space-3);
}

.file-info.visible {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    background: rgba(76, 125, 255, 0.08);
    border: 1px solid rgba(76, 125, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.file-icon::after {
    content: '';
    width: 14px;
    height: 16px;
    border: 2px solid var(--c-primary);
    border-radius: 2px;
    opacity: 0.6;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 12px;
    color: var(--c-muted);
    margin-top: 2px;
}

.file-remove {
    width: 34px;
    height: 34px;
    border-radius: var(--r-sm);
    border: 1px solid var(--c-border);
    background: transparent;
    color: var(--c-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-family: inherit;
}

.file-remove:hover {
    background: rgba(255, 77, 77, 0.08);
    border-color: var(--c-danger);
    color: var(--c-danger);
}

/* ============================
   Format Selector
   ============================ */
.format-selector {
    display: none;
    margin-top: var(--space-4);
    animation: slideUp 0.3s ease;
}

.format-selector.visible {
    display: block;
}

.format-selector-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-muted);
    margin-bottom: var(--space-3);
}

.format-options {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.format-opt {
    padding: var(--space-3) var(--space-5);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0.03);
    color: var(--c-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.format-opt:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
    background: rgba(76, 125, 255, 0.06);
}

.format-opt.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 16px var(--gradient-glow);
}

/* ============================
   Convert Button
   ============================ */
.convert-btn {
    display: none;
    width: 100%;
    padding: var(--space-4);
    margin-top: var(--space-4);
    border: none;
    border-radius: var(--r-md);
    background: var(--gradient-1);
    color: white;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.convert-btn.visible {
    display: block;
    animation: slideUp 0.3s ease;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 36px var(--gradient-glow);
}

.convert-btn:active:not(:disabled) {
    transform: translateY(0);
}

.convert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.convert-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transition: left 0.5s ease;
}

.convert-btn:hover:not(:disabled)::after {
    left: 100%;
}

/* ============================
   Progress Section
   ============================ */
.progress-section {
    display: none;
    margin-top: var(--space-4);
    animation: slideUp 0.3s ease;
}

.progress-section.visible {
    display: block;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.progress-label {
    font-size: 14px;
    font-weight: 600;
}

.progress-percent {
    font-size: 14px;
    color: var(--c-primary);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-1);
    border-radius: 100px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-status {
    font-size: 12px;
    color: var(--c-muted);
    margin-top: var(--space-2);
    text-align: center;
}

.progress-details {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-3);
    font-size: 12px;
    color: var(--c-primary);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    min-height: 18px;
    letter-spacing: 0.3px;
}

/* ============================
   Result Section
   ============================ */
.result-section {
    display: none;
    margin-top: var(--space-4);
    animation: slideUp 0.4s ease;
}

.result-section.visible {
    display: block;
}

.result-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(57, 217, 138, 0.15);
    border-radius: var(--r-lg);
    padding: var(--space-7) var(--space-6);
    text-align: center;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-3);
    border-radius: 50%;
    background: rgba(57, 217, 138, 0.1);
    border: 2px solid rgba(57, 217, 138, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.5s ease;
    position: relative;
}

.result-icon::after {
    content: '';
    width: 12px;
    height: 20px;
    border-right: 3px solid var(--c-success);
    border-bottom: 3px solid var(--c-success);
    transform: rotate(45deg) translate(-2px, -2px);
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }

    60% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

.result-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.result-subtitle {
    font-size: 13px;
    color: var(--c-muted);
    margin-bottom: var(--space-5);
}

/* ============================
   Buttons
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: 14px 28px;
    border-radius: var(--r-md);
    font-size: 15px;
    font-weight: 650;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 15px var(--gradient-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--gradient-glow);
    filter: brightness(1.05);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--c-text);
    border-color: var(--c-border);
    margin-top: var(--space-3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-lg {
    width: 100%;
    padding: var(--space-5);
    font-size: 16px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 14px var(--space-6);
    border: none;
    border-radius: var(--r-md);
    background: var(--gradient-success);
    color: #071022;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(57, 217, 138, 0.2);
    text-decoration: none;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(57, 217, 138, 0.25);
}

/* ============================
   Error & Cancel
   ============================ */
.error-message {
    display: none;
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-5);
    background: rgba(255, 77, 77, 0.06);
    border: 1px solid rgba(255, 77, 77, 0.2);
    border-radius: var(--r-md);
    color: var(--c-danger);
    font-size: 14px;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.error-message.visible {
    display: block;
}

.cancel-btn {
    display: block;
    margin: var(--space-3) auto 0;
    padding: 8px var(--space-5);
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    color: var(--c-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    border-color: var(--c-danger);
    color: var(--c-danger);
    background: rgba(255, 77, 77, 0.06);
}

/* ============================
   Popular Conversions
   ============================ */
.popular-conversions-section {
    padding: var(--space-5) 0 0;
    text-align: center;
}

.popular-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
    margin-top: var(--space-5);
}

.popular-links a {
    display: inline-block;
    padding: var(--space-3) var(--space-4);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    color: var(--c-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.popular-links a:hover {
    background: rgba(76, 125, 255, 0.08);
    border-color: var(--c-primary);
    color: var(--c-text);
    transform: translateY(-2px);
}

/* ============================
   Footer
   ============================ */
.footer {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--container);
    padding: var(--space-6) var(--space-5);
    text-align: center;
    color: var(--c-muted);
    font-size: 12px;
}

.footer-trust {
    margin-top: var(--space-2);
    font-size: 11px;
    opacity: 0.6;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-2);
}

.footer-links a {
    color: var(--c-muted);
    text-decoration: none;
    font-size: 11px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--c-primary);
}

/* ============================
   FAQ Section
   ============================ */
.faq-section {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--container);
    margin: var(--space-3) auto var(--space-7);
    padding: 0 var(--space-5);
}

.faq-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--c-muted);
    margin-bottom: var(--space-4);
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.faq-item[open] {
    border-color: var(--c-border-active);
}

.faq-question {
    padding: var(--space-4) var(--space-5);
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s ease;
    min-height: 44px;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 18px;
    font-weight: 300;
    color: var(--c-primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: var(--space-3);
}

.faq-item[open] .faq-question::after {
    content: '\2212';
}

.faq-question:hover {
    color: var(--c-primary);
}

.faq-answer {
    padding: 0 var(--space-5) var(--space-4);
    font-size: 13px;
    line-height: 1.7;
    color: var(--c-muted);
    animation: slideUp 0.3s ease;
}

/* ============================
   SEO Text & Formats Table
   ============================ */
.seo-text-section {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--container);
    margin: var(--space-6) auto var(--space-7);
    padding: 0 var(--space-5);
}

.seo-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--c-muted);
    text-align: center;
    margin-bottom: var(--space-5);
}

.formats-table-wrapper {
    width: 100%;
    margin: var(--space-6) 0;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    overflow: hidden;
}

.formats-table {
    width: 100%;
    border-collapse: collapse;
}

.formats-table th,
.formats-table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--c-border);
}

.formats-table th {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
    background: rgba(76, 125, 255, 0.04);
}

.formats-table td {
    font-size: 13px;
    color: var(--c-muted);
    padding: var(--space-4) var(--space-5);
}

.formats-table tr:last-child td {
    border-bottom: none;
}

/* ============================
   Ad Slots (hidden by default)
   ============================ */
.ad-slot,
.side-ad-container {
    display: none !important;
}

/* ============================
   Toast Notifications
   ============================ */
.toast-container {
    position: fixed;
    top: var(--space-5);
    right: var(--space-5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.toast {
    padding: var(--space-3) var(--space-5);
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
    backdrop-filter: blur(12px);
    border: 1px solid var(--c-border);
    background: rgba(17, 26, 46, .9);
    animation: toastIn 0.3s ease;
    max-width: 360px;
}

.toast.toast-success {
    border-left: 3px solid var(--c-success);
}

.toast.toast-error {
    border-left: 3px solid var(--c-danger);
}

.toast.toast-warning {
    border-left: 3px solid var(--c-warning);
}

.toast.toast-info {
    border-left: 3px solid var(--c-primary);
}

.toast.toast-out {
    animation: toastOut 0.25s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 600px) {
    .header-top {
        flex-direction: column;
        gap: var(--space-4);
    }

    .container {
        padding: var(--space-4);
    }

    .header h1 {
        font-size: 22px;
    }

    .upload-zone {
        padding: var(--space-5) var(--space-4);
    }

    .picker-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .merge-zones {
        grid-template-columns: 1fr;
    }

    .lang-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 10px 14px;
        font-size: 13px;
    }

    .back-btn {
        min-height: 44px;
        padding: 10px 18px;
    }

    .convert-btn {
        min-height: 48px;
        font-size: 16px;
    }

    .btn {
        min-height: 48px;
    }

    .picker-card {
        min-height: 44px;
        padding: var(--space-5) var(--space-3);
    }

    .chosen-change {
        min-height: 44px;
        min-width: 44px;
        padding: 10px var(--space-4);
    }

    .file-remove {
        min-width: 44px;
        min-height: 44px;
    }

    .toast-container {
        top: var(--space-3);
        right: var(--space-3);
        left: var(--space-3);
    }

    .toast {
        max-width: none;
    }
}