.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── HERO ── */
.hero {
    background: linear-gradient(219deg, #FB0E76 0%, #910694 100%);
    padding: 25px 24px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 4px;
    border-radius: 10px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
    pointer-events: none;

}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.95);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 5px 14px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 40px !important;
    font-weight: 800;
    color: #ffffff !important;
  
    letter-spacing: -0.02em;
}

.hero-sub {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto;
}

/* ── CONTAINER ── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    flex: 1;
    width: 100%;
}

/* ── TOOLBAR CARD ── */
.toolbar-card {
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8eaf0 !important;
    padding: 20px 24px !important;
    margin-bottom: 16px;
}

.toolbar-section-label {
    font-size: 12px !important;
    font-weight: 600;
    color: #9ca3af !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tb-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    border: 1.5px solid #e8eaf0 !important;
    background: #ffffff !important;
    color: #1a1d2e !important;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.tb-btn:hover {
    border-color: #FB0E76 !important;
    color: #FB0E76 !important;
    background: #fff5fa !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(251, 14, 118, 0.15);
}

.tb-btn:active {
    transform: translateY(0);
}

.tb-btn svg {
    flex-shrink: 0;
    opacity: 0.75;
}

.tb-btn:hover svg {
    opacity: 1;
}

.tb-btn-paste {
    border-color: #d1d5db !important;
    background: #f9fafb !important;
}

.tb-btn-upload {
    background: linear-gradient(219deg, #FB0E76 0%, #910694 100%) !important;
    border-color: transparent;
    color: #ffffff !important;
    font-weight: 600;
}

.tb-btn-upload:hover {
    color: #ffffff !important;
    background: linear-gradient(219deg, #ff2a87 0%, #a007ab 100%) !important;
    border-color: transparent !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(145, 6, 148, 0.4);
}

.tb-btn-upload svg {
    opacity: 1 !important;
}

/* ── OPTIONS CARD ── */
.options-card {
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8eaf0;
    padding: 24px;
    margin-bottom: 16px;
}

.options-title {
    font-size: 13px !important;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 18px;
}

.options-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 160px;
}

.field-group-sm {
    max-width: 120px;
    min-width: 100px;
    flex: 0 0 120px;
}

.field-label {
    font-size: 12px !important;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.02em;
}

.field-input {
    padding: 10px 14px !important;
    border-radius: 8px !important;
    border: 1.5px solid #d1d5db !important;
    background: #f9fafb !important;
    color: #1a1d2e;
    font-size: 14px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 500;
    transition: all 0.18s ease;
    outline: none;
    width: 100%;
}

.field-input:focus {
    border-color: #FB0E76;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(251, 14, 118, 0.1);
}

.field-input[type="number"] {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
}

/* ── TOGGLES ── */
.toggles-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 4px;
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(219deg, #FB0E76 0%, #910694 100%) !important;
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 13px;
    font-weight: 500;
    color: #1a1d2e;
    user-select: none;
}

/* ── EDITORS ROW ── */
.editors-row {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    align-items: stretch;
}

.editor-card {
    flex: 1;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8eaf0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.editor-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    flex-shrink: 0;
}

.divider-arrow {
    width: 32px;
    height: 32px;
    background: linear-gradient(219deg, #FB0E76 0%, #910694 100%);
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 14px rgba(145, 6, 148, 0.35);
    flex-shrink: 0;
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e8eaf0 !important;
    background: #fcfcfd;
}

.editor-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1a1d2e;
}

.editor-title svg {
    color: #FB0E76;
    opacity: 0.8;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    border: 1.5px solid #e8eaf0 !important;
    background: #ffffff !important;
    color: #6b7280 !important;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    cursor: pointer;
    transition: all 0.18s ease;
}

.copy-btn:hover {
    border-color: #FB0E76;
    color: #FB0E76;
    background: #fff5fa;
}

.copy-btn.copied {
    border-color: #16a34a;
    color: #16a34a;
    background: #f0fdf4;
}

.editor-area {
    flex: 1;
    width: 100%;
    min-height: 320px;
    padding: 18px !important;
    border: none;
    resize: vertical;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #1a1d2e;
    background: #ffffff;
    outline: none;
    transition: background 0.15s;
}

.editor-area:focus {
    background: #fffbff !important;
}

.editor-area::placeholder {
    color: #9ca3af;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    line-height: 1.7;
}

.editor-area-xml {
    color: #8b1c5e;
    background: #fef9fc;
}

.editor-area-xml::placeholder {
    color: #9ca3af;
}

.editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px;
    border-top: 1px solid #e8eaf0;
    background: #fcfcfd;
}

.editor-footer span {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

/* ── ACTIONS ROW ── */
.actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-convert {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 32px !important;
    border-radius: 100px !important;
    border: none;
    background: linear-gradient(219deg, #FB0E76 0%, #910694 100%) !important;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(145, 6, 148, 0.35);
    letter-spacing: 0.01em;
}

.btn-convert:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(145, 6, 148, 0.45);
}

.btn-convert:active {
    transform: translateY(0);
}

.btn-clear {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 28px !important;
    border-radius: 100px !important;
    border: 2px solid #e8eaf0 !important;
    background: #ffffff !important;
    color: #6b7280 !important;
    font-size: 15px !important;
    font-weight: 600;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
    transform: translateY(-1px);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 28px !important;
    border-radius: 100px !important;
    border: 2px solid #e8eaf0 !important;
    background: #ffffff !important;
    color: #1a1d2e !important;
    font-size: 15px !important;
    font-weight: 600;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-download:hover {
    border-color: #910694;
    color: #910694;
    background: #fdf4ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(145, 6, 148, 0.15);
}

/* ── TOAST ── */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1d2e;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: linear-gradient(135deg, #065f46, #047857);
}

.toast.error {
    background: linear-gradient(135deg, #991b1b, #dc2626);
}

/* ── FOOTER ── */
.footer {
    text-align: center;
    padding: 24px;
    color: #9ca3af;
    font-size: 13px;
    border-top: 1px solid #e8eaf0;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .hero {
        padding: 40px 20px 48px;
    }

    .container {
        padding: 0px;
    }

    .toolbar-card,
    .options-card {
        padding: 16px;
    }

    .options-fields {
        flex-direction: column;
        gap: 12px;
    }

    .field-group-sm {
        max-width: 100%;
        flex: 1;
    }

    .editors-row {
        flex-direction: column;
    }

    .editor-divider {
        width: 100%;
        height: 40px;
        flex-direction: row;
    }

    .divider-arrow {
        transform: rotate(90deg);
    }

    .editor-area {
        min-height: 200px;
    }

    .toggles-row {
        gap: 14px;
    }

    .actions-row {
        gap: 10px;
    }

    .btn-convert,
    .btn-clear,
    .btn-download {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .tb-btn {
        padding: 7px 12px;
        font-size: 12px;
    }

    .toggle-label {
        font-size: 12px;
    }
}