body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f7fb;
    color: #111827;
}

/* Hero section */

.hero-converter {
    position: relative;
    padding: 110px 0 70px;
    background: radial-gradient(circle at 30% 30%, #4a6cf7 0%, #8b9ffb 40%, #e2e7ff 100%);
    overflow: hidden;
}

.hero-converter::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.4) 0, transparent 55%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.16);
    border: 1px solid rgba(199, 210, 254, 0.4);
    color: #e5e7eb;
    padding: 0.15rem 0.65rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
    color: #f9fafb;
}

.hero-subtitle {
    font-size: 1rem;
    max-width: 36rem;
    color: #e5e7eb;
    margin-bottom: 1.2rem;
}

.hero-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.25rem;
    color: #e5e7eb;
    font-size: 0.95rem;
}

.hero-list li::before {
    content: "•";
    margin-right: 0.45rem;
    color: #c7d2fe;
}

.hero-side-card {
    background: rgba(248, 250, 252, 0.95);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
    padding: 1.1rem 1.2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hero-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #4a6cf7 0, #8b9ffb 40%, #e2e7ff 100%);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-icon-wrapper i {
    font-size: 2rem;
}

/* Converter card */

.converter-shell {
    padding-bottom: 2rem;
}

.converter-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.converter-card .card-body {
    padding: 1.75rem 1.75rem 1.5rem;
}

.converter-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

/* Drop area */

#converter-drop-area {
    border: 1px dashed #c3cbe5;
    border-radius: 16px;
    background: radial-gradient(circle at top left, #f2f5ff 0, #f7f9fc 40%, #ffffff 100%);
    padding: 28px 18px;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease,
        transform 0.1s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: center;
}

#converter-drop-area::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(74, 108, 247, 0.06), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

#converter-drop-area.dragover {
    background: linear-gradient(135deg, #eef3ff, #f8f9ff);
    border-color: #4a6cf7;
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2), 0 12px 20px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

#converter-drop-area.dragover::before {
    opacity: 1;
}

#converter-drop-area .drop-inner {
    pointer-events: none;
}

.drop-main-text {
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
}

.drop-sub-text {
    font-size: 0.85rem;
    color: #4b5563;
}

/* File info + controls */

.selected-file {
    font-size: 0.9rem;
    color: #111827;
}

.selected-file-empty {
    color: #6b7280;
}

.converter-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Buttons */

.btn-cta {
    min-width: 140px;
    border-radius: 999px;
    box-shadow: 0 8px 14px rgba(37, 99, 235, 0.35);
    border: none;
}

.btn-soft {
    border-radius: 999px;
    border-color: #d1d5db;
    color: #374151;
}

.btn-soft:hover,
.btn-soft:focus {
    background-color: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

/* Converter workflow */

.converter-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}

.converter-step {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #475569;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.converter-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-weight: 700;
    font-size: 0.85rem;
}

.converter-step-copy {
    display: block;
    min-width: 0;
}

.converter-step-title,
.converter-step-text {
    display: block;
}

.converter-step-title {
    color: #111827;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
}

.converter-step-text {
    margin-top: 0.15rem;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.35;
}

.converter-step.is-active {
    border-color: rgba(37, 99, 235, 0.45);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.converter-step.is-active .converter-step-badge {
    background: #2563eb;
    color: #ffffff;
}

.converter-step.is-complete {
    border-color: rgba(16, 185, 129, 0.38);
    background: #f0fdf4;
}

.converter-step.is-complete .converter-step-badge {
    background: #10b981;
    color: #ffffff;
}

#converter-drop-area {
    border-radius: 14px;
    padding: 30px 18px;
}

#converter-drop-area:hover {
    border-color: #93c5fd;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

#converter-drop-area:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 4px;
}

#converter-drop-area .drop-inner {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.converter-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    margin-top: 0.9rem;
    padding: 0.62rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 9px 18px rgba(37, 99, 235, 0.24);
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.converter-upload-button:hover,
.converter-upload-button:focus {
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 11px 22px rgba(8, 145, 178, 0.28);
}

.converter-upload-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 3px;
}

.converter-control-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
    gap: 1rem;
    align-items: stretch;
}

.converter-control-panel {
    min-width: 0;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
}

.converter-control-label {
    display: block;
    margin-bottom: 0.45rem;
    color: #111827;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.selected-file {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 54px;
    padding: 0.75rem 0.85rem;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #f8fafc;
    color: #111827;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.selected-file-empty {
    color: #64748b;
}

.selected-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
}

.selected-file-copy {
    min-width: 0;
}

.selected-file-name {
    display: block;
    font-weight: 700;
    line-height: 1.25;
}

.selected-file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.selected-file-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.76rem;
    font-weight: 700;
}

.converter-format-panel {
    scroll-margin-top: 96px;
}

.converter-select {
    width: 100%;
    min-height: 46px;
    border-color: #cbd5e1;
    border-radius: 12px;
    color: #111827;
    font-size: 0.95rem;
}

.converter-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.14);
}

.converter-control-helper {
    display: block;
    margin-top: 0.45rem;
    color: #64748b;
    font-size: 0.8rem;
}

.converter-action-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.converter-submit-btn,
.converter-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.62rem 1.2rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.converter-submit-btn {
    min-width: 180px;
}

.converter-submit-btn:disabled {
    opacity: 0.58;
    cursor: not-allowed;
    box-shadow: none;
}

.converter-submit-btn.is-loading {
    opacity: 0.86;
    cursor: wait;
}

.converter-submit-btn.is-converted {
    background-color: #059669;
    border-color: #059669;
    box-shadow: 0 8px 14px rgba(5, 150, 105, 0.28);
}

.converter-secondary-btn {
    min-width: 104px;
}

.converter-submit-btn.is-loading::before {
    content: "";
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.48);
    border-top-color: #ffffff;
    border-radius: 999px;
    animation: converterButtonSpin 0.75s linear infinite;
}

@keyframes converterButtonSpin {
    to {
        transform: rotate(360deg);
    }
}

#output-format.converter-select-glow {
    animation: converterSelectGlow 1.9s ease-out;
    border-color: #2563eb;
}

@keyframes converterSelectGlow {
    0% {
        border-color: #93c5fd;
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.18);
    }
    42% {
        border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13), 0 8px 18px rgba(15, 23, 42, 0.08);
    }
    100% {
        border-color: #cbd5e1;
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.converter-button-glow:not(:disabled) {
    animation: converterButtonGlow 1.9s ease-out;
}

@keyframes converterButtonGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.2), 0 8px 16px rgba(37, 99, 235, 0.22);
    }
    42% {
        box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12), 0 10px 18px rgba(37, 99, 235, 0.28);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0), 0 8px 16px rgba(37, 99, 235, 0.22);
    }
}

@media (max-width: 767.98px) {
    .converter-steps,
    .converter-control-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .converter-step {
        padding: 0.78rem;
    }

    .converter-action-row {
        justify-content: stretch;
    }

    .converter-submit-btn,
    .converter-secondary-btn,
    .converter-upload-button {
        width: 100%;
        min-height: 46px;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .converter-step,
    #converter-drop-area,
    .converter-upload-button,
    .converter-submit-btn,
    .converter-secondary-btn {
        transition: none;
    }

    .converter-upload-button:hover,
    .converter-upload-button:focus {
        transform: none;
    }

    .converter-submit-btn.is-loading::before,
    #output-format.converter-select-glow,
    .converter-button-glow:not(:disabled) {
        animation: none;
    }

    #output-format.converter-select-glow,
    .converter-button-glow:not(:disabled) {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 8px 18px rgba(15, 23, 42, 0.06);
    }

    #output-format.converter-select-glow {
        border-color: #2563eb;
    }
}

/* Donation cards */

.donation-section {
    margin-top: 1.5rem;
}

.donation-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.donation-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.donation-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    padding: 0.75rem 0.8rem 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    color: inherit;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.donation-card:hover,
.donation-card:focus {
    color: inherit;
    text-decoration: none;
    border-color: rgba(74, 108, 247, 0.55);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
    transform: translateY(-2px);
}

.donation-card:focus {
    outline: none;
}

.donation-card:focus-visible {
    outline: 3px solid rgba(74, 108, 247, 0.28);
    outline-offset: 3px;
}

.donation-card-header {
    margin-bottom: 0.4rem;
}

.donation-label {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.donation-card-body {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.donation-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    flex-shrink: 0;
}

.paypal-icon {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.patreon-icon {
    background: linear-gradient(135deg, #ec4899, #ef4444);
}

.btcpay-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.donation-text {
    min-width: 0;
}

.donation-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.donation-copy {
    font-size: 0.8rem;
    color: #4b5563;
    margin: 0.15rem 0 0;
}

.donation-card-footer {
    margin-top: 0.55rem;
}

.donation-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.donation-helper-text {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.78rem;
    color: #6b7280;
}

@media (max-width: 767.98px) {
    .donation-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Info cards */

.info-section {
    margin-top: 2.5rem;
}

.section-title {
    color: #111827;
    font-size: 1.4rem;
    font-weight: 700;
}

.section-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
}

.info-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    padding: 1.1rem 1.2rem 1.25rem;
    height: 100%;
}

.info-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
}

.info-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.35rem;
}

.info-card-text {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 0;
}

/* Result / messages */

#converter-messages {
    font-size: 0.9rem;
}

.converter-note {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Responsive */

@media (max-width: 767.98px) {
    .hero-converter {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 1.9rem;
    }

    .converter-card .card-body {
        padding: 1.25rem 1.25rem 1.1rem;
    }
}
