.mkvmp4 {
    --mkv-bg: #0b1020;
    --mkv-panel: #11182c;
    --mkv-line: rgba(255,255,255,.10);
    --mkv-text: #f7f8ff;
    --mkv-muted: #aeb8d4;
    --mkv-accent: #7c8cff;
    --mkv-accent-2: #59d3c4;
    --mkv-error: #ff7d8c;
    width: min(100%, 760px);
    margin: 24px auto;
    padding: 28px;
    box-sizing: border-box;
    color: var(--mkv-text);
    background:
        radial-gradient(circle at 100% 0, rgba(124,140,255,.20), transparent 30%),
        linear-gradient(145deg, #0b1020 0%, #11182c 100%);
    border: 1px solid var(--mkv-line);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(10,15,35,.22);
    font-family: inherit;
}

.mkvmp4 * { box-sizing: border-box; }

.mkvmp4__header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 22px;
}

.mkvmp4__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 15px;
    background: rgba(124,140,255,.14);
    color: #cbd1ff;
    border: 1px solid rgba(124,140,255,.28);
}

.mkvmp4__header h3 {
    margin: 0 0 5px;
    color: #fff;
    font-size: clamp(22px, 3vw, 29px);
    line-height: 1.1;
}

.mkvmp4__header p {
    margin: 0;
    color: var(--mkv-muted);
    font-size: 14px;
}

.mkvmp4__drop {
    display: grid;
    place-items: center;
    min-height: 200px;
    padding: 28px 18px;
    text-align: center;
    cursor: pointer;
    border: 1.5px dashed rgba(174,184,212,.38);
    border-radius: 17px;
    background: rgba(255,255,255,.035);
    transition: .2s ease;
}

.mkvmp4__drop:hover,
.mkvmp4__drop.is-drag {
    border-color: var(--mkv-accent);
    background: rgba(124,140,255,.09);
    transform: translateY(-1px);
}

.mkvmp4__drop.has-file {
    border-style: solid;
    border-color: rgba(89,211,196,.45);
    background: rgba(89,211,196,.07);
}

.mkvmp4__file {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

.mkvmp4__drop-title {
    display: block;
    font-weight: 750;
    font-size: 17px;
    color: #fff;
}

.mkvmp4__drop-sub {
    display: block;
    margin-top: 7px;
    color: var(--mkv-muted);
    font-size: 13px;
}

.mkvmp4__filename {
    display: block;
    max-width: 100%;
    margin-top: 17px;
    padding: 8px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #d8fff9;
    background: rgba(89,211,196,.10);
    border-radius: 9px;
    font-size: 13px;
}

.mkvmp4__filename:empty { display: none; }

/* Honeypot anti-spam : invisible pour un vrai visiteur, hors du flux et hors
   de l'écran (pas display:none, que certains bots savent détecter). */
.mkvmp4__hp {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    left: -9999px !important;
    top: -9999px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

.mkvmp4__submit,
.mkvmp4__download {
    appearance: none;
    border: 0;
    text-decoration: none !important;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.mkvmp4__submit {
    width: 100%;
    margin-top: 15px;
    padding: 14px 18px;
    color: #071017;
    background: linear-gradient(135deg, #9ca7ff, #65e2d2);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(89,211,196,.14);
}

.mkvmp4__submit:hover:not(:disabled),
.mkvmp4__download:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(89,211,196,.20);
}

.mkvmp4__submit:disabled {
    opacity: .62;
    cursor: wait;
}

.mkvmp4__process {
    margin-top: 18px;
    padding: 18px;
    border-radius: 14px;
    background: rgba(255,255,255,.045);
    border: 1px solid var(--mkv-line);
}

.mkvmp4__stage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.mkvmp4__stage-label { font-size: 14px; }
.mkvmp4__percent {
    color: #d8ddff;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.mkvmp4__bar {
    position: relative;
    height: 10px;
    margin-top: 10px;
    overflow: hidden;
    background: rgba(255,255,255,.08);
    border-radius: 999px;
}

.mkvmp4__bar-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--mkv-accent), var(--mkv-accent-2));
    transition: width .18s linear;
}

.mkvmp4__bar.is-indeterminate .mkvmp4__bar-fill {
    animation: mkvmp4-indeterminate 1.1s ease-in-out infinite;
}

@keyframes mkvmp4-indeterminate {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

.mkvmp4__status {
    margin: 9px 0 0;
    color: var(--mkv-muted);
    font-size: 12.5px;
}

.mkvmp4__error {
    margin-top: 18px;
    padding: 13px 15px;
    color: #ffd9de;
    background: rgba(255,125,140,.11);
    border: 1px solid rgba(255,125,140,.28);
    border-radius: 12px;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.mkvmp4__done {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    padding: 16px;
    background: rgba(89,211,196,.09);
    border: 1px solid rgba(89,211,196,.27);
    border-radius: 15px;
}

.mkvmp4__done[hidden] { display: none !important; }

.mkvmp4__check {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #071715;
    background: var(--mkv-accent-2);
    font-weight: 900;
}

.mkvmp4__done-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.mkvmp4__done-text strong { color: #e9fffc; }
.mkvmp4__done-text span {
    color: #acd9d4;
    font-size: 12px;
}

.mkvmp4__download {
    padding: 11px 15px;
    white-space: nowrap;
    color: #081413 !important;
    background: #8ff0e4;
    border-radius: 10px;
}

.mkvmp4__restart {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px 16px;
    color: var(--mkv-text);
    background: transparent;
    border: 1px solid var(--mkv-line);
    border-radius: 10px;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

.mkvmp4__restart[hidden] { display: none !important; }

.mkvmp4__restart:hover {
    border-color: var(--mkv-accent);
    background: rgba(124,140,255,.09);
}

.mkvmp4__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 18px;
    padding-top: 16px;
    color: #8490af;
    border-top: 1px solid var(--mkv-line);
    font-size: 11.5px;
}

.mkvmp4__footer code {
    padding: 2px 5px;
    color: #d4d8ff;
    background: rgba(255,255,255,.06);
    border-radius: 5px;
}

@media (max-width: 620px) {
    .mkvmp4 {
        padding: 19px;
        border-radius: 17px;
    }

    .mkvmp4__done {
        grid-template-columns: auto 1fr;
    }

    .mkvmp4__download {
        grid-column: 1 / -1;
        text-align: center;
    }
}