/**
 * Gufo Media Tools
 * Main visual styles for desktop and mobile interfaces.
 *
 * Version: 3.1.0
 * Updated: 2026-08-09
 */

/* =========================================================
   1. Theme and global layout
   ========================================================= */
:root {
    --bg: #06101f;
    --panel: #0d2139;
    --panel-2: #102944;
    --line: rgba(150, 198, 242, 0.18);
    --text: #f4f8ff;
    --muted: #9eb2ca;
    --accent: #45a6ff;
    --accent-2: #73d7ff;
    --success: #79efb2;
    --danger: #ff9b9b;
    --highlight: #ffd86b;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 5%, rgba(42, 124, 211, 0.25), transparent 28rem),
        radial-gradient(circle at 85% 25%, rgba(0, 190, 255, 0.12), transparent 25rem),
        var(--bg);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.17;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 34px 34px;
}

.topbar,
main,
footer {
    position: relative;
    z-index: 1;
}

main,
.topbar,
footer {
    width: min(1160px, calc(100% - 32px));
    margin-inline: auto;
}

[hidden] {
    display: none !important;
}

/* =========================================================
   2. Header and brand
   ========================================================= */
.topbar {
    padding: 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.brand span {
    display: flex;
    flex-direction: column;
}

.brand strong {
    font-size: 1rem;
}

.brand small {
    color: var(--muted);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.78rem;
    background: rgba(8, 24, 43, 0.65);
}

.status-pill i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 14px var(--success);
}

/* =========================================================
   3. Hero
   ========================================================= */
.hero {
    padding: 58px 0 42px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-2);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.17em;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.3rem, 7vw, 5rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero h1 span {
    color: #b8c8da;
}

.hero > p:last-child {
    max-width: 690px;
    margin: 22px auto 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.16rem);
    line-height: 1.7;
}

/* =========================================================
   4. Compact tool navigation
   ========================================================= */
.tool-navigation {
    margin-bottom: 28px;
}

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

.tool-card {
    min-height: 82px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(10, 28, 49, 0.74);
    color: var(--text);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 11px;
    text-align: left;
    transition: 0.2s ease;
}

.tool-card.active {
    cursor: pointer;
    border-color: rgba(69, 166, 255, 0.75);
    background: linear-gradient(145deg, rgba(28, 76, 124, 0.94), rgba(10, 32, 57, 0.96));
    box-shadow: 0 18px 40px rgba(25, 104, 180, 0.17);
}

.tool-card.active:hover {
    transform: translateY(-2px);
}

.tool-card.selected-tool {
    border-color: var(--accent-2);
    box-shadow: 0 10px 24px rgba(25, 104, 180, 0.16);
}

.tool-card.disabled {
    opacity: 0.48;
}

.tool-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(69, 166, 255, 0.13);
    color: var(--accent-2);
    font-size: 1.08rem;
}

.tool-card > span:nth-child(2) {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tool-card b {
    font-size: 0.92rem;
}

.tool-card small {
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.tool-explanation {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(115, 215, 255, 0.25);
    border-radius: 15px;
    background: linear-gradient(90deg, rgba(34, 93, 147, 0.28), rgba(5, 22, 39, 0.58));
    display: flex;
    align-items: center;
    gap: 13px;
}

.tool-explanation-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(69, 166, 255, 0.14);
    color: var(--accent-2);
    font-size: 1.12rem;
}

.tool-explanation strong {
    display: block;
    margin-bottom: 3px;
}

.tool-explanation p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.88rem;
}

.mobile-tool-picker {
    display: none;
}

/* =========================================================
   5. Workspace and form
   ========================================================= */
.workspace {
    margin: 28px 0;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--line);
    border-radius: 25px;
    background: linear-gradient(145deg, rgba(18, 44, 75, 0.94), rgba(7, 23, 42, 0.96));
    box-shadow: var(--shadow);
}

.workspace-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.workspace-heading h2 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    letter-spacing: -0.04em;
}

.workspace-heading p:last-child {
    margin: 0;
    color: var(--muted);
}

.workspace-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.format-badge,
.reset-button {
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
}

.format-badge {
    color: var(--accent-2);
    font-size: 0.76rem;
    font-weight: 800;
    background: rgba(4, 16, 30, 0.4);
}

.reset-button {
    background: rgba(4, 16, 30, 0.5);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.reset-button:hover {
    border-color: var(--accent-2);
    color: var(--accent-2);
}

form {
    margin-top: 28px;
}

.drop-zone {
    min-height: 118px;
    padding: 18px 22px;
    border: 1.5px dashed rgba(115, 192, 255, 0.5);
    border-radius: 21px;
    background: rgba(3, 15, 29, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.drop-zone:hover,
.drop-zone.dragging {
    transform: translateY(-2px);
    border-color: var(--accent-2);
    background: rgba(28, 91, 148, 0.2);
}

.upload-icon {
    display: none;
}

.drop-zone span,
.drop-zone small {
    color: var(--muted);
}

.drop-zone small {
    margin-top: 8px;
}

.selected-file,
.progress-wrap,
.message,
.result-card {
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(4, 16, 30, 0.45);
}

.selected-file {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    color: var(--highlight);
    font-weight: 800;
}

.selected-file button {
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================================
   6. Tool-specific options
   ========================================================= */
.trim-fields {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.trim-fields label {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(4, 16, 30, 0.45);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trim-fields label > span {
    font-weight: 800;
}

.trim-fields input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(115, 192, 255, 0.32);
    border-radius: 11px;
    background: rgba(3, 13, 25, 0.72);
    color: var(--text);
    font: inherit;
    font-size: 1.05rem;
    outline: none;
}

.trim-fields input:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(69, 166, 255, 0.12);
}

.trim-fields small,
.time-help {
    color: var(--muted);
}

.time-help {
    margin: 10px 2px 0;
    font-size: 0.82rem;
}

.time-help strong {
    color: var(--text);
}

.compression-options,
.format-options {
    margin: 18px 0 0;
    padding: 0;
    border: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.compression-options,
.format-options legend {
    width: 100%;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 800;
}

.compression-choice,
.format-choice {
    position: relative;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(4, 16, 30, 0.45);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.compression-choice:hover,
.format-choice:hover {
    border-color: rgba(115, 215, 255, 0.55);
}

.compression-choice:has(input:checked),
.format-choice:has(input:checked) {
    border-color: var(--accent-2);
    background: rgba(34, 93, 147, 0.28);
    box-shadow: 0 0 0 2px rgba(69, 166, 255, 0.1);
}

.compression-choice input,
.format-choice input {
    margin-top: 3px;
    accent-color: var(--accent);
}

.compression-choice span,
.format-choice span {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.compression-choice b,
.format-choice b {
    line-height: 1.35;
}

.compression-choice small,
.format-choice small {
    color: var(--muted);
    line-height: 1.45;
}

.compression-choice em,
.format-choice em {
    margin-left: 5px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(121, 239, 178, 0.13);
    color: var(--success);
    font-size: 0.62rem;
    font-style: normal;
    text-transform: uppercase;
    white-space: nowrap;
}

/* =========================================================
   7. Merge list
   ========================================================= */
.merge-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.merge-item {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(4, 16, 30, 0.45);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.merge-item > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.merge-item b {
    overflow-wrap: anywhere;
}

.merge-item small {
    color: var(--muted);
}

.merge-item > div {
    display: flex;
    gap: 6px;
}

.merge-item button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(69, 166, 255, 0.1);
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
}

.merge-item button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* =========================================================
   8. Progress, messages, and results
   ========================================================= */
.progress-wrap {
    padding: 15px;
}

.progress-info {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 0.85rem;
}

.progress-track {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.progress-track div {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.2s ease;
}

.progress-wrap.processing .progress-track div {
    width: 100% !important;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
    background-size: 200% 100%;
    animation: gufo-processing 1.25s linear infinite;
}

.progress-wrap.processing #progressPercent {
    color: var(--accent-2);
}

@keyframes gufo-processing {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.message {
    padding: 14px 16px;
}

.message.error {
    color: #ffdede;
    border-color: rgba(255, 100, 110, 0.38);
    background: rgba(120, 25, 34, 0.27);
}

.message.success {
    color: #d9ffeb;
    border-color: rgba(90, 235, 160, 0.35);
    background: rgba(17, 108, 74, 0.25);
}

.primary-button {
    width: 100%;
    min-height: 56px;
    margin-top: 16px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #267bd1);
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(38, 123, 209, 0.25);
}

.primary-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.result-card {
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.result-check {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(121, 239, 178, 0.14);
    color: var(--success);
    font-weight: 900;
}

.result-card > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.result-card small {
    color: var(--muted);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.download-button {
    margin-left: auto;
    padding: 12px 17px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #267bd1);
    font-weight: 850;
    white-space: nowrap;
}

/* =========================================================
   9. Trust row and footer
   ========================================================= */
.trust-row {
    margin: 24px 0 70px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.trust-row span {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    background: rgba(8, 24, 43, 0.5);
}

footer {
    padding: 28px 0 38px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
}

/* =========================================================
   10. Responsive design
   ========================================================= */
@media (max-width: 900px) {
    .tool-grid,
    .trust-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .compression-options,
.format-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .tool-grid {
        display: none;
    }

    .mobile-tool-picker {
        display: block;
    }

    .mobile-tool-picker label {
        display: block;
        margin: 0 0 7px;
        color: var(--muted);
        font-size: 0.76rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .mobile-tool-picker select {
        width: 100%;
        min-height: 52px;
        padding: 0 14px;
        border: 1px solid rgba(115, 192, 255, 0.38);
        border-radius: 14px;
        background: var(--panel);
        color: var(--text);
        font: inherit;
        font-weight: 800;
        outline: none;
    }

    .mobile-tool-picker select:focus {
        border-color: var(--accent-2);
        box-shadow: 0 0 0 3px rgba(69, 166, 255, 0.12);
    }

    .tool-explanation {
        align-items: flex-start;
    }

    .workspace {
        margin-top: 20px;
    }
}

@media (max-width: 620px) {
    .topbar {
        align-items: flex-start;
    }

    .status-pill {
        display: none;
    }

    .brand img {
        width: 45px;
        height: 45px;
    }

    .hero {
        padding-top: 38px;
    }

    .trust-row,
    .trim-fields {
        grid-template-columns: 1fr;
    }

    .workspace {
        border-radius: 20px;
    }

    .workspace-heading,
    .result-card {
        flex-direction: column;
    }

    .workspace-actions {
        width: 100%;
        justify-content: stretch;
    }

    .workspace-actions > * {
        flex: 1;
        text-align: center;
    }

    .format-badge,
    .download-button {
        width: 100%;
        text-align: center;
    }

    .download-button {
        margin-left: 0;
    }

    .drop-zone {
        min-height: 96px;
    }

    .selected-file {
        align-items: flex-start;
    }

    .merge-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .merge-item > div {
        width: 100%;
    }

    .merge-item button {
        flex: 1;
    }
}

/* =========================================================
   RESIZE VIDEO
   ========================================================= */
.resize-options {
    margin: 18px 0 0;
    padding: 0;
    border: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.resize-options legend {
    width: 100%;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 800;
}

.resize-choice {
    position: relative;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(4, 16, 30, 0.45);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.resize-choice:hover { border-color: rgba(115, 215, 255, 0.55); }
.resize-choice:has(input:checked) {
    border-color: var(--accent-2);
    background: rgba(34, 93, 147, 0.28);
    box-shadow: 0 0 0 2px rgba(69, 166, 255, 0.1);
}
.resize-choice input { margin-top: 3px; accent-color: var(--accent); }
.resize-choice span { display: flex; flex-direction: column; gap: 7px; }
.resize-choice small { color: var(--muted); line-height: 1.45; }
.resize-choice em { color: var(--accent); font-size: .72rem; font-style: normal; }

.custom-resize-fields {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.custom-resize-fields label { display: flex; flex-direction: column; gap: 7px; font-weight: 700; }
.custom-resize-fields input {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
    background: rgba(4, 16, 30, 0.55); color: var(--text); font: inherit; outline: none;
}
.custom-resize-fields input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(69,166,255,.12); }
.custom-resize-fields > small { grid-column: 1 / -1; color: var(--muted); }

@media (max-width: 780px) { .resize-options { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) {
    .resize-options, .custom-resize-fields { grid-template-columns: 1fr; }
    .custom-resize-fields > small { grid-column: auto; }
}


/* =========================================================
   11. Crop Video and Extract Frames
   ========================================================= */
.crop-options, .frame-options { margin:18px 0 0; padding:0; border:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.crop-options legend, .frame-options legend { width:100%; margin-bottom:10px; font-weight:800; }
.crop-choice, .frame-options label { padding:16px; border:1px solid var(--line); border-radius:14px; background:rgba(4,16,30,.45); display:flex; gap:10px; }
.crop-choice { cursor:pointer; align-items:flex-start; }
.crop-choice:has(input:checked) { border-color:var(--accent-2); background:rgba(34,93,147,.28); }
.crop-choice input { margin-top:3px; accent-color:var(--accent); }
.crop-choice span, .frame-options label { flex-direction:column; }
.crop-choice small, .frame-options small, .crop-position small { color:var(--muted); line-height:1.45; }
.crop-choice em { margin-left:5px; padding:3px 6px; border-radius:999px; background:rgba(121,239,178,.13); color:var(--success); font-size:.62rem; font-style:normal; text-transform:uppercase; }
.crop-position { margin-top:14px; padding:16px; border:1px solid var(--line); border-radius:14px; background:rgba(4,16,30,.45); display:grid; gap:8px; }
.crop-position label, .frame-options label>span { font-weight:800; }
.crop-position select, .frame-options input { width:100%; min-height:46px; padding:0 12px; border:1px solid rgba(115,192,255,.32); border-radius:11px; background:rgba(3,13,25,.72); color:var(--text); font:inherit; }
.frame-options { grid-template-columns:repeat(3,minmax(0,1fr)); }
.frame-options label { align-items:stretch; }
@media (max-width:760px) { .crop-options, .frame-options { grid-template-columns:1fr; } }


/* ==========================================================
   CREATE THUMBNAIL
   Controls used by the Create Thumbnail tool.
   ========================================================== */
.thumbnail-options {
    margin: 22px 0 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.thumbnail-options legend {
    padding: 0 8px;
    font-weight: 700;
}

.thumbnail-options > label:first-of-type {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
}

.thumbnail-options input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.thumbnail-choice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 13px 12px;
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    cursor: pointer;
}

.thumbnail-choice span {
    display: grid;
    gap: 3px;
}

.thumbnail-choice small {
    color: var(--muted);
}


/* ==========================================================
   13. Rotate Video
   Simple rotation choices used by the Rotate Video tool.
   ========================================================== */
.rotate-options {
    margin: 22px 0 0;
    padding: 0;
    border: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.rotate-options legend {
    width: 100%;
    margin-bottom: 10px;
    font-weight: 800;
}

.rotate-choice {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(4, 16, 30, 0.45);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.rotate-choice:has(input:checked) {
    border-color: var(--accent-2);
    background: rgba(34, 93, 147, 0.28);
}

.rotate-choice input {
    margin-top: 3px;
    accent-color: var(--accent);
}

.rotate-choice span {
    display: grid;
    gap: 4px;
}

.rotate-choice small {
    color: var(--muted);
    line-height: 1.45;
}

.rotate-choice em {
    margin-left: 5px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(121, 239, 178, 0.13);
    color: var(--success);
    font-size: 0.62rem;
    font-style: normal;
    text-transform: uppercase;
}

@media (max-width: 760px) {
    .rotate-options {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   REPLACE / REMOVE AUDIO
   ========================================================= */
.replace-audio-options {
    margin: 18px 0 0;
    padding: 0;
    border: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.replace-audio-options legend {
    width: 100%;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 800;
}

.replace-audio-choice {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(4, 16, 30, 0.45);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.replace-audio-choice.recommended {
    border-color: rgba(69, 166, 255, 0.5);
}

.replace-audio-choice span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.replace-audio-choice small,
.audio-help {
    color: var(--muted);
    line-height: 1.45;
}

.replace-audio-choice em {
    color: var(--accent-2);
    font-style: normal;
    font-size: 0.72rem;
}

.audio-file-panel {
    grid-column: 1 / -1;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(4, 16, 30, 0.45);
}

.audio-file-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 800;
}

.audio-file-picker input[type="file"] {
    width: 100%;
    color: var(--muted);
}

.selected-audio-file {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 216, 107, 0.35);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--highlight);
    font-weight: 800;
}

.selected-audio-file button {
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
}

.audio-help {
    display: block;
    margin-top: 10px;
}

@media (max-width: 700px) {
    .replace-audio-options {
        grid-template-columns: 1fr;
    }

    .audio-file-panel {
        grid-column: auto;
    }

    .drop-zone {
        min-height: 96px;
        padding: 16px;
    }
}

/* =========================================================
   14. Image Slideshow
   ========================================================= */
.slideshow-help {
    margin: 10px 2px 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.slideshow-item {
    flex-wrap: wrap;
}

.slideshow-duration {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.78rem;
}

.slideshow-duration select {
    min-width: 86px;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(4, 16, 30, 0.7);
    color: var(--text);
    font: inherit;
}

@media (max-width: 640px) {
    .slideshow-item {
        align-items: stretch;
    }

    .slideshow-item > span {
        flex: 1 1 100%;
    }

    .slideshow-duration {
        flex: 1 1 auto;
    }

    .slideshow-item > div {
        margin-left: auto;
    }
}
