html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --otter-bg: #f7f2e8;
    --otter-surface: #fffaf0;
    --otter-text: #20242a;
    --otter-muted: #707780;
    --otter-border: #e8dfd0;
    --otter-brown: #8b5e3c;
    --otter-brown-hover: #754d31;
    --otter-brown-soft: #f8efe2;
    --otter-shadow: 0 12px 35px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.03);
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--otter-bg);
    color: var(--otter-text);
}

/* =========================================
   MAIN PAGE / SHARED CARD
   ========================================= */

.converter-page {
    width: 100%;
    max-width: 760px;
    margin: 42px auto 36px;
    padding: 0 20px;
}

.converter-card {
    width: 100%;
    padding: 38px 40px 40px;
    background: var(--otter-surface);
    border: 1px solid var(--otter-border);
    border-radius: 20px;
    box-shadow: var(--otter-shadow);
}

/* =========================================
   SHARED CONVERTER HEADER
   ========================================= */

.converter-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 30px;
    text-align: left;
}

.converter-header-image {
    width: 78px;
    height: 78px;
    object-fit: contain;
    flex: 0 0 78px;
}

.converter-header-text {
    min-width: 0;
}

    .converter-header-text h1 {
        margin: 0 0 7px;
        font-size: 32px;
        line-height: 1.2;
        font-weight: 700;
        letter-spacing: -0.5px;
        color: #181c21;
    }

    .converter-header-text p {
        margin: 0;
        color: var(--otter-muted);
        font-size: 16px;
        line-height: 1.5;
    }

/* =========================================
   FORM SECTIONS
   ========================================= */

.form-section {
    width: 100%;
    margin-bottom: 25px;
}

.section-label {
    display: block;
    margin-bottom: 9px;
    color: #30363d;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

/* =========================================
   FILE DROP ZONE
   ========================================= */

.file-drop-zone {
    position: relative;
    width: 100%;
    min-height: 205px;
    padding: 30px 20px;
    border: 2px dashed #d8cbbf;
    border-radius: 15px;
    background: linear-gradient(180deg, #fffaf0 0%, #f8f0e3 100%);
    text-align: center;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85), 0 2px 5px rgba(90, 58, 36, 0.025);
    transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.15s ease;
}

    .file-drop-zone:hover {
        border-color: #cbb9a8;
        background: linear-gradient(180deg, #fffaf0 0%, #f8f0e3 100%);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.95), 0 5px 14px rgba(90, 58, 36, 0.055);
        transform: translateY(-1px);
    }

    .file-drop-zone.drag-over {
        border-color: #a98262;
        background: linear-gradient(180deg, #fcf6f0 0%, #f8eee5 100%);
        box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.10), 0 7px 18px rgba(90, 58, 36, 0.08);
        transform: translateY(-1px);
    }

    .file-drop-zone:focus-visible {
        outline: 3px solid rgba(139, 94, 60, 0.35);
        outline-offset: 3px;
    }

/* =========================================
   FILE DROP ICON / TEXT
   ========================================= */

.file-drop-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin: 0 auto 14px;
    border: 1px solid #e4d8cd;
    border-radius: 50%;
    background: linear-gradient(180deg, #f5eee8 0%, #eee3d9 100%);
    color: var(--otter-brown);
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(90, 58, 36, 0.05);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.file-drop-zone:hover .file-drop-icon {
    background: linear-gradient(180deg, #f8f2ed 0%, #f1e8df 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(90, 58, 36, 0.07);
}

.file-drop-zone.drag-over .file-drop-icon {
    background: linear-gradient(180deg, #f5e9df 0%, #edddcf 100%);
    color: var(--otter-brown-hover);
    transform: scale(1.04);
}

.file-drop-title {
    margin-bottom: 5px;
    color: #30363d;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.file-drop-subtitle {
    margin-bottom: 12px;
    color: #8a929b;
    font-size: 13px;
    line-height: 1.3;
}

.file-drop-formats,
.file-drop-format,
.ebook-drop-format {
    display: block;
    margin-top: 15px;
    color: #8a949e;
    font-size: 12px;
    line-height: 1.4;
}

/* =========================================
   HIDDEN REAL FILE INPUT
   ========================================= */

.file-drop-zone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================
   SELECTED FILE
   ========================================= */

.selected-file {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    background: #fffaf0;
}

.selected-file-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

#selectedFileName {
    color: #4d5863;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

#selectedFileSize {
    color: #9299a1;
    font-size: 11px;
    line-height: 1.3;
}

.selected-file-name {
    overflow: hidden;
    color: #2f3a45;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-file-size {
    margin-top: 3px;
    color: #7a858f;
    font-size: 13px;
}

.remove-file-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin-left: 12px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #7a858f;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

    .remove-file-button:hover {
        background: #f1eadd;
        color: #2f3a45;
    }

    .remove-file-button:active {
        transform: translateY(1px);
    }

    .remove-file-button:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.18);
    }

/* =========================================
   VALIDATION MESSAGES
   ========================================= */

.validation-message,
.file-error,
.ebook-file-error {
    margin-top: 9px;
    color: #b42318;
    font-size: 13px;
    line-height: 1.4;
}

/* =========================================
   OUTPUT FORMAT OPTIONS
   ========================================= */

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

.format-option {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

    .format-option input[type="radio"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.format-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 78px;
    padding: 12px 8px;
    border: 1px solid #d7dde4;
    border-radius: 10px;
    background: #fffaf0;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

.format-option:hover .format-option-content {
    border-color: #c0a28c;
    background: #f8f0e3;
    box-shadow: 0 4px 10px rgba(90, 58, 36, 0.06);
    transform: translateY(-1px);
}

.format-option.selected .format-option-content {
    border-color: var(--otter-brown);
    background: var(--otter-brown-soft);
    box-shadow: 0 0 0 1px var(--otter-brown), 0 3px 9px rgba(90, 58, 36, 0.08);
    transform: none;
}

.format-name {
    color: #252a30;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.format-description {
    margin-top: 5px;
    color: #8a929b;
    font-size: 11px;
    line-height: 1.2;
}

.format-option input[type="radio"]:focus-visible + .format-option-content {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.22);
}

/* =========================================
   CONVERT / NEW CONVERSION BUTTONS
   ========================================= */

.convert-section {
    margin-bottom: 0;
}

.convert-button {
    width: 100%;
    margin-top: 6px;
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    background: var(--otter-brown);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

    .convert-button:hover:not(:disabled) {
        background: var(--otter-brown-hover);
        box-shadow: 0 5px 15px rgba(93, 58, 34, 0.22);
    }

    .convert-button:active:not(:disabled) {
        transform: translateY(1px);
    }

    .convert-button:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.25);
    }

    .convert-button:disabled {
        cursor: not-allowed;
        opacity: 0.65;
    }

.new-conversion-button {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 12px 20px;
    border: 1px solid #d7dce2;
    border-radius: 10px;
    background: #fffaf0;
    color: #2f3a45;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

    .new-conversion-button:hover {
        background: #f5eee2;
        border-color: #bfc7d0;
    }

    .new-conversion-button:active {
        transform: translateY(1px);
    }

/* =========================================
   PROGRESS SECTIONS — SHARED
   ========================================= */

.progress-section,
.document-conversion-progress,
.image-conversion-progress,
.ebook-conversion-progress {
    width: 100%;
    margin-top: 24px;
    padding: 24px 20px;
    border: 1px solid #dfe3e8;
    border-radius: 14px;
    background: #f8f2e8;
    text-align: center;
}

.progress-section {
    margin-top: 25px;
    padding: 22px 20px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* =========================================
   CONVERTING OTTER
   ========================================= */

.otter-converting-image,
.document-conversion-otter,
.image-converting-otter,
.ebook-converting-otter {
    display: block;
    width: 120px;
    height: 120px;
    margin: 0 auto 14px;
    object-fit: contain;
    animation: otterConvertingSpin 2.8s linear infinite;
}

.otter-converting-image {
    margin-bottom: 12px;
}

    .otter-converting-image.conversion-completed,
    .document-conversion-otter.conversion-completed,
    .image-converting-otter.conversion-completed,
    .ebook-converting-otter.conversion-completed {
        animation: none;
    }

@keyframes otterConvertingSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================
   PROGRESS HEADERS / BARS / STATUS
   ========================================= */

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: #252a30;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

#progressPercentage {
    margin: 0;
    color: var(--otter-brown);
    font-size: 13px;
    font-weight: 700;
}

.progress-bar-container,
.document-progress-bar-container,
.image-progress-bar-container,
.ebook-progress-bar-container {
    width: 100%;
    height: 8px;
    margin-top: 20px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6e9ed;
}

.progress-bar-container {
    margin-top: 0;
}

.progress-bar,
.document-progress-bar,
.image-progress-bar,
.ebook-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: var(--otter-brown);
    transition: width 0.35s ease;
}

.progress-bar {
    min-width: 0;
}

.document-progress-bar,
.image-progress-bar,
.ebook-progress-bar {
    width: 35%;
    animation: progressIndeterminate 1.4s ease-in-out infinite;
}

    .document-progress-bar.completed,
    .image-progress-bar.completed,
    .ebook-progress-bar.completed {
        width: 100%;
        transform: none;
        animation: none;
        transition: width 0.4s ease;
    }

@keyframes progressIndeterminate {
    0% {
        transform: translateX(-120%);
    }

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

.progress-status,
.document-conversion-status,
.image-conversion-status,
.ebook-conversion-status {
    margin-top: 9px;
    color: #7a858f;
    font-size: 12px;
    line-height: 1.45;
}

.document-conversion-title,
.image-conversion-title,
.ebook-conversion-title {
    margin-bottom: 6px;
    color: #2f3a45;
    font-size: 18px;
    font-weight: 600;
}

/* =========================================
   RESULT SECTION
   ========================================= */

.result-section {
    width: 100%;
    margin-top: 18px;
}

.result-success {
    padding: 17px 18px;
    border: 1px solid #d9e9de;
    border-radius: 12px;
    background: #f4faf6;
    text-align: center;
}

.result-title {
    color: #2d6a43;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.result-message {
    margin-top: 5px;
    color: #708078;
    font-size: 12px;
    line-height: 1.4;
}

/* =========================================
   FOOTER
   ========================================= */

.footer {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: 100%;
    margin-top: auto;
    padding: 24px 20px;
    text-align: center;
    line-height: normal;
    color: #858d96;
    font-size: 13px;
}

/* =========================================================
   DOCUMENT / IMAGE / E-BOOK HEADERS
   ========================================================= */

.document-converter-header,
.image-converter-header,
.ebook-converter-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 24px;
}

.document-otter-header,
.image-otter-header,
.ebook-otter-header {
    display: block;
    width: 90px;
    height: 90px;
    object-fit: contain;
    flex-shrink: 0;
}

.document-header-text,
.image-header-text,
.ebook-header-text {
    min-width: 0;
    text-align: left;
}

    .document-header-text h1,
    .image-header-text h1,
    .ebook-header-text h1 {
        margin-bottom: 6px;
    }

    .document-header-text p,
    .image-header-text p,
    .ebook-header-text p {
        margin-bottom: 0;
    }

/* =========================================================
   IMAGE / E-BOOK FORMAT SECTIONS
   ========================================================= */

.image-format-section,
.ebook-format-section {
    width: 100%;
    margin-top: 22px;
}

.image-format-title,
.ebook-format-title {
    margin-bottom: 12px;
    color: #2f3a45;
    font-size: 15px;
    font-weight: 600;
}

.image-format-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

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

.image-format-option,
.ebook-format-option {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px;
    padding: 10px;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    background: #fffaf0;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.ebook-format-option {
    min-height: 52px;
}

    .image-format-option:hover,
    .ebook-format-option:hover {
        background: #f6f8fa;
        border-color: #bfc7d0;
    }

    .image-format-option.selected,
    .ebook-format-option.selected {
        border-color: #7d8a98;
        background: #f1e8da;
    }

    .image-format-option.disabled,
    .ebook-format-option.disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

    .image-format-option input,
    .ebook-format-option input {
        margin-right: 7px;
    }

    .image-format-option span,
    .ebook-format-option span {
        color: #2f3a45;
        font-size: 14px;
        font-weight: 600;
    }

/* =========================================================
   HOME PAGE
   ========================================================= */

.home-card {
    max-width: 100%;
}

    .home-card .converter-header {
        margin-bottom: 32px;
    }

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

.home-tool-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    min-height: 218px;
    padding: 22px 22px 20px;
    border: 1px solid #e3e7ec;
    border-radius: 15px;
    background: linear-gradient(180deg, #fffaf0 0%, #f8f0e3 100%);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(24, 35, 46, 0.025);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .home-tool-card:hover {
        transform: translateY(-3px);
        border-color: #d3bba8;
        background: #fff8ec;
        box-shadow: 0 10px 24px rgba(90, 58, 36, 0.09);
        text-decoration: none;
    }

    .home-tool-card:focus-visible {
        outline: 3px solid rgba(139, 94, 60, 0.35);
        outline-offset: 3px;
    }

.home-tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    border: 1px solid #e8ddd4;
    border-radius: 13px;
    background: #f8f1eb;
    font-size: 24px;
    line-height: 1;
}

.home-tool-card h2 {
    margin: 0 0 8px;
    color: #252a30;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.home-tool-card p {
    margin: 0 0 18px;
    color: #707780;
    font-size: 14px;
    line-height: 1.5;
}

.home-tool-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    color: var(--otter-brown);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.home-tool-card:hover .home-tool-link {
    color: var(--otter-brown-hover);
}

/* =========================================================
   MEDIA CONVERTER — REMOVE BUTTON
   ========================================================= */

.media-selected-file {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding-right: 52px;
}

    .media-selected-file .selected-file-info {
        min-width: 0;
        flex: 1;
    }

.media-remove-button {
    position: absolute;
    top: 50%;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid #d8dde2;
    border-radius: 50%;
    background: #fffaf0;
    color: #6f747a;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    opacity: 1;
    visibility: visible;
    z-index: 10;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

    .media-remove-button span {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        line-height: 1;
    }

    .media-remove-button:hover {
        background: #f5eee2;
        border-color: #bfc7d0;
        color: #2f3a45;
        transform: translateY(-50%) scale(1.04);
    }

    .media-remove-button:active {
        transform: translateY(-50%) scale(0.97);
    }

    .media-remove-button:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.18);
    }

#selectedFile #removeFile {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    margin: 0 0 0 12px !important;
    padding: 0 !important;
    position: relative !important;
    border: 1px solid #d8dde2 !important;
    border-radius: 50% !important;
    background: #fffaf0 !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    overflow: visible !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    z-index: 100 !important;
}

    #selectedFile #removeFile::before {
        content: "×";
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        color: #6f747a;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 22px;
        font-weight: 400;
        line-height: 1;
    }

    #selectedFile #removeFile:hover {
        background: #f5eee2 !important;
        border-color: #bfc7d0 !important;
    }

        #selectedFile #removeFile:hover::before {
            color: #2f3a45;
        }

    #selectedFile #removeFile:active {
        transform: scale(0.96);
    }

    #selectedFile #removeFile:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.18) !important;
    }

/* =========================================================
   RESPONSIVE LAYOUT
   ========================================================= */

@media (max-width: 700px) {
    .converter-page {
        margin: 30px auto 24px;
        padding: 0 14px;
    }

    .converter-card {
        padding: 30px 24px;
        border-radius: 16px;
    }

    .converter-header {
        gap: 11px;
        margin-bottom: 28px;
    }

    .converter-header-image {
        width: 62px;
        height: 62px;
        flex-basis: 62px;
    }

    .converter-header-text h1 {
        font-size: 27px;
    }

    .converter-header-text p {
        font-size: 15px;
    }

    .document-otter-header,
    .image-otter-header,
    .ebook-otter-header {
        width: 72px;
        height: 72px;
    }

    .home-tools {
        gap: 12px;
    }

    .home-tool-card {
        min-height: 205px;
        padding: 18px;
    }
}

@media (max-width: 600px) {
    .image-format-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-tools {
        grid-template-columns: 1fr;
    }

    .home-tool-card {
        min-height: 0;
    }
}

@media (max-width: 520px) {
    .format-options {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .format-option-content {
        min-height: 64px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 10px 15px;
        text-align: left;
    }

    .format-description {
        margin-top: 0;
    }

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

@media (max-width: 420px) {
    .converter-page {
        margin: 20px auto;
        padding: 0 10px;
    }

    .converter-card {
        padding: 24px 16px;
        border-radius: 14px;
    }

    .converter-header {
        gap: 9px;
        margin-bottom: 24px;
    }

    .converter-header-image {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }

    .converter-header-text h1 {
        font-size: 21px;
    }

    .converter-header-text p {
        font-size: 13px;
    }

    .document-converter-header,
    .image-converter-header,
    .ebook-converter-header {
        gap: 10px;
    }

    .document-otter-header,
    .image-otter-header,
    .ebook-otter-header {
        width: 60px;
        height: 60px;
    }

    .file-drop-zone {
        min-height: 190px;
        padding: 24px 14px;
    }

    .file-drop-title {
        font-size: 15px;
    }

    .file-drop-subtitle {
        font-size: 12px;
    }

    .file-drop-formats,
    .file-drop-format,
    .ebook-drop-format {
        font-size: 11px;
    }

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

    .media-selected-file {
        align-items: center;
    }

    .media-remove-button {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
        margin-left: 8px;
    }

    .convert-button {
        padding: 13px 18px;
    }

    .progress-section,
    .document-conversion-progress,
    .image-conversion-progress,
    .ebook-conversion-progress {
        padding: 18px 15px;
        border-radius: 12px;
    }

    .otter-converting-image,
    .document-conversion-otter,
    .image-converting-otter,
    .ebook-converting-otter {
        width: 95px;
        height: 95px;
        margin-bottom: 10px;
    }

    .progress-header {
        font-size: 13px;
    }

    #progressPercentage {
        font-size: 12px;
    }

    .progress-bar-container,
    .document-progress-bar-container,
    .image-progress-bar-container,
    .ebook-progress-bar-container {
        height: 7px;
    }

    .progress-status {
        font-size: 10px;
    }

    .home-card .converter-header {
        align-items: flex-start;
    }

    .home-tool-card {
        padding: 17px;
    }
}

/* =========================================
   WARM LIGHT-BROWN SITE THEME — FINAL OVERRIDES
   Includes the top navigation/header, which may use Bootstrap white utilities.
   ========================================= */
:root {
    --otter-bg: #ead9c5;
    --otter-surface: #f5e8d7;
    --otter-text: #38291f;
    --otter-muted: #766253;
    --otter-border: #d7bea4;
    --otter-brown: #8b5e3c;
    --otter-brown-hover: #70472e;
    --otter-brown-soft: #e8d2ba;
    --otter-shadow: 0 10px 28px rgba(75, 48, 28, 0.10), 0 2px 7px rgba(75, 48, 28, 0.05);
}

html,
body {
    background-color: #ead9c5 !important;
}

/* Main site navigation and top strip */
header,
.site-header,
.navbar,
.navbar.navbar-light,
.navbar.navbar-expand-sm,
header .container,
header .container-fluid,
.navbar .container,
.navbar .container-fluid,
.bg-white,
.bg-light,
.bg-body-tertiary {
    background-color: #d9bd9e !important;
}

.navbar,
header,
.site-header {
    border-color: #c8a987 !important;
}

    .navbar .navbar-brand,
    .navbar .nav-link,
    .navbar a,
    header a {
        color: #493322 !important;
    }

        .navbar .nav-link:hover,
        .navbar a:hover,
        header a:hover {
            color: #70472e !important;
        }

main,
main.container,
main.container-fluid,
.container-fluid.site-content {
    background-color: transparent !important;
}

.converter-card,
.home-tool-card,
.home-card,
.card {
    background-color: #f5e8d7;
    border-color: #d7bea4;
}

input:not([type="radio"]):not([type="checkbox"]),
select,
textarea {
    background-color: #fff7ed;
    border-color: #d7bea4;
}

footer,
.site-footer {
    background-color: #d9bd9e !important;
    border-color: #c8a987 !important;
    color: #493322 !important;
}


/* =========================================================
   OTTER SIDE NAVIGATION — WARM, COLORFUL THEME
   ========================================================= */

:root {
    --otter-menu-cream: #fff2df;
    --otter-menu-sand: #e7c49c;
    --otter-menu-caramel: #c58b58;
    --otter-menu-terracotta: #c96f50;
    --otter-menu-text: #593a2b;
    --otter-menu-muted: #8c6b55;
}

body.otter-menu-open {
    overflow: hidden;
}

.otter-site-header {
    position: relative;
    z-index: 1020;
    margin-bottom: 24px;
}

.otter-topbar {
    background: linear-gradient(110deg, #e8c9a7 0%, #f1d7b8 55%, #e4c09a 100%);
    border-bottom: 1px solid #d2ad85;
    box-shadow: 0 3px 12px rgba(104, 66, 37, 0.08);
}

.otter-topbar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 1180px;
    min-height: 76px;
    margin: 0 auto;
    padding: 10px 22px;
}

.otter-menu-toggle {
    display: flex;
    flex: 0 0 46px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 10px;
    border: 1px solid rgba(126, 77, 45, 0.18);
    border-radius: 14px;
    background: #f8e6ce;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(104, 66, 37, 0.06);
    transition: background 0.2s ease, transform 0.2s ease;
}

    .otter-menu-toggle span {
        display: block;
        width: 21px;
        height: 2.5px;
        border-radius: 5px;
        background: #75482f;
        transition: width 0.2s ease, background 0.2s ease;
    }

    .otter-menu-toggle:hover {
        background: #f9d6b2;
        transform: translateY(-1px);
    }

        .otter-menu-toggle:hover span:nth-child(2) {
            width: 14px;
        }

    .otter-menu-toggle:focus-visible,
    .otter-menu-close:focus-visible,
    .otter-home-button:focus-visible {
        outline: 3px solid #d47a54;
        outline-offset: 3px;
    }

.otter-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-right: auto;
    color: #613d2a !important;
    text-decoration: none;
}

    .otter-brand:hover {
        color: #a9573d !important;
        text-decoration: none;
    }

.otter-brand-icon {
    font-size: 30px;
    line-height: 1;
}

.otter-brand-name {
    font-size: clamp(18px, 2.3vw, 25px);
    font-weight: 800;
    letter-spacing: -0.6px;
}

.otter-home-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 1px solid #d3ad85;
    border-radius: 50%;
    background: #f9e9d4;
    color: #784a30 !important;
    font-size: 28px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

    .otter-home-button:hover {
        background: #f5d2ae;
        transform: translateY(-2px);
    }

/* Screen overlay */

.otter-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(73, 45, 29, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

    .otter-menu-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
    }

    .otter-menu-backdrop[hidden] {
        display: none !important;
    }

/* Sliding side panel */

.otter-side-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    width: min(370px, 88vw);
    overflow-x: hidden;
    overflow-y: auto;
    background: linear-gradient(180deg, #fff4e3 0%, #f8e7d1 55%, #f0d8bc 100%);
    border-right: 1px solid #d9b38d;
    box-shadow: 12px 0 38px rgba(75, 45, 26, 0.16);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s ease;
    overscroll-behavior: contain;
}

    .otter-side-menu.is-open {
        transform: translateX(0);
        visibility: visible;
    }

/* Colorful menu heading */

.otter-menu-heading {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 142px;
    padding: 24px 18px;
    color: #fff8ed;
    background: linear-gradient(125deg, #b96b49 0%, #d58b5b 52%, #e4ac73 100%);
    border-bottom: 4px solid #e9bf8e;
}

.otter-menu-mascot {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 66px;
    width: 66px;
    height: 66px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 22px;
    background: rgba(255, 246, 229, 0.23);
    font-size: 39px;
    box-shadow: 0 5px 14px rgba(94, 48, 28, 0.12);
}

.otter-menu-heading-text {
    min-width: 0;
}

.otter-menu-eyebrow {
    margin-bottom: 5px;
    color: #ffead1;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.otter-menu-title {
    color: #fffaf1;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.25;
}

.otter-menu-subtitle {
    margin-top: 5px;
    color: #fff0dc;
    font-size: 12px;
}

.otter-menu-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(255, 248, 236, 0.2);
    color: #fffaf1;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

    .otter-menu-close:hover {
        background: rgba(255, 248, 236, 0.35);
        transform: rotate(90deg);
    }

/* Menu links */

.otter-menu-content {
    flex: 1;
    padding: 20px 14px 16px;
}

.otter-menu-section-label {
    margin: 4px 10px 9px;
    color: #9c7558;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

    .otter-menu-section-label:not(:first-child) {
        margin-top: 24px;
    }

.otter-menu-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    margin-bottom: 5px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--otter-menu-text) !important;
    text-decoration: none !important;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

    .otter-menu-link:hover {
        transform: translateX(3px);
        background: #fff8ec;
        border-color: #e5c6a4;
        color: #8b4e34 !important;
    }

    .otter-menu-link:focus-visible {
        outline: 3px solid #d47a54;
        outline-offset: 2px;
    }

.otter-menu-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 20px;
    box-shadow: inset 0 0 0 1px rgba(107, 69, 43, 0.06);
}

.otter-icon-home {
    background: #f7dcb9;
}

.otter-icon-documents {
    background: #f6d9a7;
}

.otter-icon-media {
    background: #f4c7b1;
}

.otter-icon-images {
    background: #e7d1f2;
}

.otter-icon-ebooks {
    background: #cde6d1;
}

.otter-icon-privacy {
    background: #d8e7f2;
}

.otter-menu-link-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}

.otter-menu-link-text {
    color: #593a2b;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.3;
}

.otter-menu-link-description {
    color: #92735d;
    font-size: 11px;
    line-height: 1.3;
}

.otter-menu-arrow {
    margin-left: auto;
    color: #b47b52;
    font-size: 25px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.otter-menu-link:hover .otter-menu-arrow {
    transform: translateX(3px);
    color: #bd6348;
}

.otter-menu-divider {
    height: 1px;
    margin: 17px 8px 13px;
    background: linear-gradient(90deg, transparent, #dfbd99, transparent);
}

.otter-menu-privacy {
    min-height: 52px;
}

/* Decorative footer */


/* Compact mascot at the bottom of the side menu */
.otter-menu-footer-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 12px 0 8px;
    padding: 0;
}

    .otter-menu-footer-decoration img {
        display: block;
        width: 76px;
        height: 76px;
        max-width: 100%;
        object-fit: contain;
        margin: 0 auto;
    }

    .otter-menu-footer-decoration + div {
        margin-top: 0;
        text-align: center;
        line-height: 1.4;
    }

.otter-menu-version {
    margin-top: 6px;
    text-align: center;
    font-size: 12px;
    line-height: 1.4;
}
    font-size: 10px;
}

/* Responsive and reduced motion */

@media (max-width: 480px) {
    .otter-topbar-inner {
        min-height: 66px;
        gap: 11px;
        padding: 9px 13px;
    }

    .otter-menu-toggle {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }

    .otter-brand {
        gap: 6px;
    }

    .otter-brand-icon {
        font-size: 25px;
    }

    .otter-brand-name {
        font-size: 17px;
        letter-spacing: -0.4px;
    }

    .otter-home-button {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .otter-menu-toggle,
    .otter-menu-toggle span,
    .otter-home-button,
    .otter-side-menu,
    .otter-menu-backdrop,
    .otter-menu-link,
    .otter-menu-arrow,
    .otter-menu-close {
        transition: none !important;
    }
}

.otter-brand-mascot {
    display: block;
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.otter-brand:hover .otter-brand-mascot {
    transform: translateY(-2px) rotate(-3deg);
}

.otter-menu-mascot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.otter-menu-mascot {
    overflow: hidden;
}

.otter-home-button svg {
    display: block;
    flex: 0 0 auto;
}

.otter-menu-link-icon svg {
    display: block;
    width: 23px;
    height: 23px;
}

@media (max-width: 480px) {
    .otter-brand-mascot {
        width: 45px;
        height: 45px;
    }

    .otter-brand-name {
        font-size: 16px;
    }
}


/* Otter mascot in the footer */

.otter-footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.otter-footer-mascot {
    display: block;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

    .otter-footer-mascot:hover {
        transform: translateY(-2px) rotate(-3deg);
    }

.otter-footer-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    color: #493322;
    font-size: 13px;
}

    .otter-footer-text a {
        color: #8b5e3c;
        text-decoration: none;
    }

        .otter-footer-text a:hover {
            color: #70472e;
            text-decoration: underline;
        }

@media (max-width: 480px) {
    .otter-footer-mascot {
        width: 48px;
        height: 48px;
    }

    .otter-footer-content {
        gap: 10px;
    }
}


/* Final footer alignment */

.otter-footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 12px;
}

.otter-footer-mascot {
    display: block;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    object-fit: contain;
    margin: 0;
}

.otter-footer-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    margin: 0;
    color: #493322;
    font-size: 13px;
    line-height: 1.4;
}

    .otter-footer-text a {
        color: #8b5e3c;
        font-size: 13px;
        line-height: 1.4;
        text-decoration: none;
    }

        .otter-footer-text a:hover {
            color: #70472e;
            text-decoration: underline;
        }

@media (max-width: 480px) {
    .otter-footer-content {
        gap: 9px;
    }

    .otter-footer-mascot {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .otter-footer-text {
        font-size: 12px;
    }
}


/* Privacy Policy page */

.privacy-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 36px 24px 56px;
    color: #493322;
}

.privacy-header {
    padding: 28px 30px;
    margin-bottom: 28px;
    background: #fff3e3;
    border: 1px solid #e7cfb3;
    border-radius: 20px;
}

.privacy-label {
    display: inline-block;
    margin-bottom: 12px;
    color: #986a46;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.privacy-header h1 {
    margin: 0 0 12px;
    color: #5b3b28;
    font-size: clamp(30px, 5vw, 42px);
    font-weight: 800;
}

.privacy-intro {
    max-width: 680px;
    margin: 0 0 16px;
    color: #795a42;
    font-size: 17px;
    line-height: 1.7;
}

.privacy-updated {
    margin: 0;
    color: #96785f;
    font-size: 13px;
}

.privacy-section {
    padding: 22px 24px;
    margin-bottom: 16px;
    background: #fffaf3;
    border: 1px solid #ead8c3;
    border-radius: 16px;
}

    .privacy-section h2,
    .privacy-contact h2 {
        margin: 0 0 12px;
        color: #69452e;
        font-size: 20px;
        font-weight: 750;
    }

    .privacy-section p,
    .privacy-contact p {
        margin: 0 0 12px;
        color: #604b3b;
        font-size: 15px;
        line-height: 1.8;
    }

        .privacy-section p:last-child,
        .privacy-contact p:last-child {
            margin-bottom: 0;
        }

.privacy-contact {
    padding: 26px;
    background: #f4e2cc;
    border: 1px solid #dfc09e;
    border-radius: 16px;
}

    .privacy-contact a {
        display: inline-block;
        margin-top: 8px;
        color: #86552f;
        font-weight: 700;
        overflow-wrap: anywhere;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

        .privacy-contact a:hover {
            color: #5b3925;
        }

@media (max-width: 600px) {
    .privacy-page {
        padding: 22px 14px 36px;
    }

    .privacy-header {
        padding: 22px 20px;
    }

    .privacy-section,
    .privacy-contact {
        padding: 20px 18px;
    }

        .privacy-section h2,
        .privacy-contact h2 {
            font-size: 18px;
        }
}




