/* Utilix — PDF Rotate (pdfr-) */
:root { --pdfr-accent: #e11d48; --pdfr-accent-light: #fff1f2; --pdfr-accent-dark: #be123c; }

.pdfr-hero { padding-bottom: 40px; }
.pdfr-hero__grid { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: center; }
.pdfr-hero__main { display: flex; gap: 20px; align-items: flex-start; }
.pdfr-hero__visual { display: flex; align-items: center; justify-content: center; }
.pdfr-hero__rotate { display: flex; align-items: center; gap: 16px; }
.pdfr-hero__page { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 16px; min-width: 90px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 4px 16px rgba(15,23,42,.08); font-size: .75rem; font-weight: 700; color: #64748b; }
.pdfr-hero__page i { width: 36px; height: 36px; color: #ef4444; }
.pdfr-hero__page--before i { transform: rotate(90deg); transition: transform .3s; }
.pdfr-hero__page strong { font-size: .875rem; color: var(--heading); }
.pdfr-hero__arc { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--pdfr-accent); }
.pdfr-hero__arc i { width: 28px; height: 28px; }
.pdfr-hero__arc span { font-size: .625rem; font-weight: 600; color: #94a3b8; }

.pdfr-main { padding: 0 0 48px; }
.pdfr-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.pdfr-workspace { display: flex; flex-direction: column; gap: 20px; }

.pdfr-step-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: 0 4px 24px rgba(15,23,42,.05); }
.pdfr-step-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.pdfr-step-card__head h2 { margin: 0; font-size: 1.0625rem; font-weight: 700; color: var(--heading); }
.pdfr-step-card__num { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; font-size: .875rem; font-weight: 800; color: #fff; background: var(--pdfr-accent); border-radius: 10px; flex-shrink: 0; }

.pdfr-dropzone { border: 2px dashed #fecdd3; border-radius: 16px; background: #fffbfb; cursor: pointer; transition: border-color .2s, background .2s; }
.pdfr-dropzone.is-dragover, .pdfr-dropzone:hover { border-color: var(--pdfr-accent); background: #fff1f2; }
.pdfr-dropzone__inner { display: flex; flex-direction: column; align-items: center; padding: 36px 24px; text-align: center; }
.pdfr-dropzone__icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 16px; color: var(--pdfr-accent); background: var(--pdfr-accent-light); border-radius: 16px; }
.pdfr-dropzone__title { margin: 0 0 8px; font-size: 1rem; font-weight: 600; }
.pdfr-dropzone__or { font-size: .8125rem; color: #94a3b8; margin-bottom: 16px; }
.pdfr-dropzone__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 12px; }
.pdfr-dropzone__hint { margin: 0; font-size: .75rem; color: #94a3b8; }
.pdfr-upload-preview { display: flex; align-items: center; gap: 16px; padding: 16px; }
.pdfr-upload-preview__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; color: #ef4444; background: #fef2f2; border-radius: 12px; flex-shrink: 0; }
.pdfr-upload-preview__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pdfr-upload-preview__meta strong { font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdfr-upload-preview__meta span { font-size: .75rem; color: #94a3b8; }

.pdfr-rot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pdfr-rot-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 12px 16px; border: 2px solid var(--border); border-radius: 16px; background: #fff; cursor: pointer; text-align: center; transition: border-color .2s, box-shadow .2s; min-height: 110px; }
.pdfr-rot-card input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; opacity: 0; }
.pdfr-rot-card__icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--pdfr-accent); background: var(--pdfr-accent-light); border-radius: 12px; }
.pdfr-rot-card__icon i { width: 22px; height: 22px; }
.pdfr-rot-card__icon--ccw i { transform: scaleX(-1); }
.pdfr-rot-card__icon--flip i { transform: rotate(180deg); }
.pdfr-rot-card strong { font-size: .8125rem; font-weight: 700; color: var(--heading); line-height: 1.3; }
.pdfr-rot-card p { margin: 0; font-size: .6875rem; color: #94a3b8; }
.pdfr-rot-card__check { position: absolute; top: 10px; left: 10px; width: 20px; height: 20px; border: 2px solid #cbd5e1; border-radius: 50%; box-sizing: border-box; }
.pdfr-rot-card.is-selected, .pdfr-rot-card:has(input:checked) { border-color: var(--pdfr-accent); box-shadow: 0 0 0 3px rgba(225,29,72,.12); }
.pdfr-rot-card.is-selected .pdfr-rot-card__check, .pdfr-rot-card:has(input:checked) .pdfr-rot-card__check { border-color: var(--pdfr-accent); background: var(--pdfr-accent); }
.pdfr-rot-card.is-selected .pdfr-rot-card__check::after, .pdfr-rot-card:has(input:checked) .pdfr-rot-card__check::after { content: ''; position: absolute; top: 4px; left: 7px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

.pdfr-tip-box { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 14px 16px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 14px; }
.pdfr-tip-box i { color: #2563eb; flex-shrink: 0; margin-top: 2px; }
.pdfr-tip-box p { margin: 0; font-size: .8125rem; color: #1e40af; line-height: 1.5; }

.pdfr-custom-angle { margin-top: 16px; padding: 16px; background: #f8fafc; border: 1px solid var(--border); border-radius: 14px; }
.pdfr-custom-angle label { display: block; margin-bottom: 8px; font-size: .8125rem; font-weight: 600; color: var(--heading); }
.pdfr-custom-angle input { width: 100%; max-width: 160px; padding: 10px 14px; font-size: .875rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.pdfr-custom-angle small { display: block; margin-top: 8px; font-size: .75rem; color: #94a3b8; }

.pdfr-range-list { display: flex; flex-direction: column; gap: 12px; }
.pdfr-radio { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 2px solid var(--border); border-radius: 14px; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.pdfr-radio input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; opacity: 0; }
.pdfr-radio__mark { position: relative; width: 20px; height: 20px; min-width: 20px; margin-top: 2px; border: 2px solid #cbd5e1; border-radius: 50%; box-sizing: border-box; flex-shrink: 0; }
.pdfr-radio__text { display: flex; flex-direction: column; gap: 4px; }
.pdfr-radio__text strong { font-size: .875rem; font-weight: 600; color: var(--heading); }
.pdfr-radio__text span { font-size: .8125rem; color: #94a3b8; line-height: 1.4; }
.pdfr-radio:has(input:checked) { border-color: var(--pdfr-accent); box-shadow: 0 0 0 3px rgba(225,29,72,.1); }
.pdfr-radio:has(input:checked) .pdfr-radio__mark { border-color: var(--pdfr-accent); }
.pdfr-radio:has(input:checked) .pdfr-radio__mark::after { content: ''; position: absolute; inset: 3px; background: var(--pdfr-accent); border-radius: 50%; }

.pdfr-range-field { margin-top: 12px; padding: 0 4px; }
.pdfr-range-field input { width: 100%; padding: 12px 14px; font-size: .875rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.pdfr-range-field small { display: block; margin-top: 8px; font-size: .75rem; color: #94a3b8; }

.pdfr-preview-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 16px; font-size: .8125rem; color: #64748b; }
.pdfr-preview-toolbar select { padding: 6px 10px; font-size: .8125rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.pdfr-preview-strip { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 8px 4px 12px; min-height: 140px; }
.pdfr-preview-strip__empty { width: 100%; text-align: center; padding: 32px 16px; font-size: .8125rem; color: #94a3b8; }
.pdfr-preview-item { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.pdfr-preview-item__thumb { position: relative; width: 80px; height: 104px; display: flex; align-items: center; justify-content: center; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pdfr-preview-item__thumb canvas { max-width: 100%; max-height: 100%; display: block; transition: transform .3s; }
.pdfr-preview-item__thumb--placeholder { color: #cbd5e1; }
.pdfr-preview-item__thumb--placeholder i { width: 28px; height: 28px; }
.pdfr-preview-item span { font-size: .6875rem; font-weight: 600; color: #64748b; }
.pdfr-preview-arrow { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: #fff; background: var(--pdfr-accent); border-radius: 50%; flex-shrink: 0; }
.pdfr-preview-arrow i { width: 14px; height: 14px; }

.pdfr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; font-size: .875rem; font-weight: 600; border-radius: 12px; border: 1px solid transparent; cursor: pointer; transition: background .15s, opacity .15s; }
.pdfr-btn--primary { color: #fff; background: var(--pdfr-accent); }
.pdfr-btn--primary:hover { background: var(--pdfr-accent-dark); }
.pdfr-btn--outline { color: #475569; background: #fff; border-color: var(--border); }
.pdfr-btn--outline:hover { border-color: var(--pdfr-accent); color: var(--pdfr-accent); }
.pdfr-btn--ghost { color: #475569; background: transparent; border-color: transparent; }
.pdfr-btn--sm { padding: 8px 14px; font-size: .8125rem; }
.pdfr-btn--rotate { width: 100%; padding: 16px 24px; font-size: 1rem; color: #fff; background: linear-gradient(135deg, var(--pdfr-accent), #f43f5e); border: none; border-radius: 14px; box-shadow: 0 8px 24px rgba(225,29,72,.3); }
.pdfr-btn--rotate:disabled { opacity: .5; cursor: not-allowed; }
.pdfr-security-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; font-size: .8125rem; color: #94a3b8; text-align: center; }

.pdfr-progress { margin-top: 16px; padding: 12px; background: #f8fafc; border-radius: 12px; border: 1px solid var(--border); }
.pdfr-progress__bar { height: 6px; width: 0; background: linear-gradient(90deg, var(--pdfr-accent), #f43f5e); border-radius: 100px; transition: width .3s; }
.pdfr-progress__text { display: block; margin-top: 8px; font-size: .75rem; font-weight: 600; color: #64748b; text-align: center; }

.pdfr-result-body { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.pdfr-result-icon { position: relative; width: 100px; height: 120px; display: flex; align-items: center; justify-content: center; }
.pdfr-result-icon__doc { display: flex; align-items: center; justify-content: center; width: 80px; height: 100px; color: #ef4444; background: #fef2f2; border: 1px solid #fecdd3; border-radius: 12px; }
.pdfr-result-icon__doc i { width: 40px; height: 40px; }
.pdfr-result-icon__check { position: absolute; bottom: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: #16a34a; background: #dcfce7; border-radius: 50%; border: 2px solid #fff; }
.pdfr-result-info__name { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.pdfr-result-info__name strong { font-size: 1rem; }
.pdfr-ready-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; font-size: .6875rem; font-weight: 700; color: #16a34a; background: #dcfce7; border-radius: 100px; }
.pdfr-info-table { margin: 0 0 20px; }
.pdfr-info-table__row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .8125rem; }
.pdfr-info-table__row dt { color: #94a3b8; }
.pdfr-info-table__row dd { margin: 0; font-weight: 600; text-align: right; }
.pdfr-result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.pdfr-start-over { display: inline-flex; align-items: center; gap: 6px; padding: 0; font-size: .8125rem; font-weight: 600; color: #64748b; background: none; border: none; cursor: pointer; }
.pdfr-start-over:hover { color: var(--pdfr-accent); }

.pdfr-sidebar { display: flex; flex-direction: column; gap: 16px; }
.pdfr-side-card { padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 20px; }
.pdfr-side-card__title { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: .9375rem; font-weight: 700; }
.pdfr-how-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pdfr-how-list li { display: flex; gap: 12px; font-size: .8125rem; color: #475569; line-height: 1.5; }
.pdfr-how-list li span { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; font-size: .75rem; font-weight: 700; color: #fff; background: var(--pdfr-accent); border-radius: 50%; flex-shrink: 0; }
.pdfr-why-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pdfr-why-list li { display: flex; gap: 8px; font-size: .8125rem; color: #475569; line-height: 1.5; }
.pdfr-why-list li i { color: var(--pdfr-accent); flex-shrink: 0; margin-top: 2px; }
.pdfr-feat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pdfr-feat-list li { display: flex; align-items: center; gap: 10px; font-size: .8125rem; color: #475569; }
.pdfr-feat-icon { display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 8px; flex-shrink: 0; background: #fee2e2; color: #ef4444; }
.pdfr-tools-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pdfr-tools-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: .8125rem; color: #475569; text-decoration: none; background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; }
.pdfr-tools-link:hover { color: var(--pdfr-accent); background: var(--pdfr-accent-light); }
.pdfr-tools-link--soon { opacity: .7; cursor: default; }
.pdfr-tools-link--soon em { margin-left: auto; font-size: .625rem; font-weight: 700; font-style: normal; color: #94a3b8; text-transform: uppercase; }
.pdfr-tools-link__icon { display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; color: var(--pdfr-accent); background: #fff; border-radius: 8px; flex-shrink: 0; }

.pdfr-features { padding: 48px 0; background: #f8fafc; }
.pdfr-features__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pdfr-feature-card { padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: 20px; }
.pdfr-feature-card__icon { display: flex; width: 48px; height: 48px; align-items: center; justify-content: center; margin-bottom: 16px; border-radius: 14px; }
.pdfr-feature-card__icon--red { background: #fee2e2; color: #ef4444; }
.pdfr-feature-card__icon--green { background: #dcfce7; color: #16a34a; }
.pdfr-feature-card__icon--blue { background: #dbeafe; color: #2563eb; }
.pdfr-feature-card__icon--purple { background: #ede9fe; color: #7c3aed; }

.pdfr-steps-section { padding: 56px 0; }
.pdfr-section-head--center { text-align: center; margin-bottom: 40px; }
.pdfr-section-eyebrow { display: inline-flex; gap: 6px; margin-bottom: 12px; padding: 6px 14px; font-size: .75rem; font-weight: 700; color: var(--pdfr-accent); background: var(--pdfr-accent-light); border-radius: 100px; }
.pdfr-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; }
.pdfr-step { position: relative; padding: 24px 20px; background: #fff; border: 1px solid var(--border); border-radius: 20px; text-align: center; }
.pdfr-step__num { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; color: #fff; background: var(--pdfr-accent); border-radius: 50%; }
.pdfr-step__icon { display: flex; width: 48px; height: 48px; margin: 8px auto 12px; align-items: center; justify-content: center; color: var(--pdfr-accent); background: var(--pdfr-accent-light); border-radius: 14px; }
.pdfr-faq { padding: 56px 0; }

.pdfr-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); padding: 12px 24px; font-size: .875rem; font-weight: 600; color: #fff; background: #1e293b; border-radius: 12px; opacity: 0; transition: transform .3s, opacity .3s; z-index: 9999; pointer-events: none; max-width: 90vw; text-align: center; }
.pdfr-toast--show { transform: translateX(-50%) translateY(0); opacity: 1; }

.pdfr-animate-in { opacity: 0; transform: translateY(16px); transition: opacity .5s, transform .5s; }
.pdfr-animate-in.is-visible { opacity: 1; transform: translateY(0); }
.pdfr-animate-in--delay { transition-delay: .1s; }
.pdfr-animate-in--delay2 { transition-delay: .2s; }
.pdfr-animate-in--delay3 { transition-delay: .3s; }

@media (max-width: 1024px) {
    .pdfr-hero__grid, .pdfr-layout { grid-template-columns: 1fr; }
    .pdfr-hero__visual { display: none; }
    .pdfr-rot-grid { grid-template-columns: repeat(2, 1fr); }
    .pdfr-result-body { grid-template-columns: 1fr; }
    .pdfr-features__grid, .pdfr-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .pdfr-rot-grid { grid-template-columns: 1fr; }
    .pdfr-features__grid, .pdfr-steps { grid-template-columns: 1fr; }
}

[data-theme="dark"] .pdfr-step-card,
[data-theme="dark"] .pdfr-side-card,
[data-theme="dark"] .pdfr-feature-card,
[data-theme="dark"] .pdfr-step,
[data-theme="dark"] .pdfr-rot-card,
[data-theme="dark"] .pdfr-radio { background: var(--bg-section); border-color: var(--border); }
[data-theme="dark"] .pdfr-dropzone { background: #1a2332; border-color: #4c1d2e; }
[data-theme="dark"] .pdfr-dropzone.is-dragover,
[data-theme="dark"] .pdfr-dropzone:hover { background: #2a1520; border-color: var(--pdfr-accent); }
[data-theme="dark"] .pdfr-btn--outline,
[data-theme="dark"] .pdfr-custom-angle input,
[data-theme="dark"] .pdfr-range-field input,
[data-theme="dark"] .pdfr-preview-toolbar select { background: #1a2332; border-color: var(--border); }
[data-theme="dark"] .pdfr-tip-box { background: rgba(37,99,235,.12); border-color: rgba(59,130,246,.3); }
[data-theme="dark"] .pdfr-tip-box p { color: #93c5fd; }
[data-theme="dark"] .pdfr-custom-angle { background: #1a2332; }
[data-theme="dark"] .pdfr-progress,
[data-theme="dark"] .pdfr-tools-link { background: #1a2332; border-color: var(--border); }
[data-theme="dark"] .pdfr-features { background: var(--bg); }
[data-theme="dark"] .pdfr-ready-badge { background: rgba(34,197,94,.15); color: #4ade80; }
[data-theme="dark"] .pdfr-result-icon__doc { background: rgba(239,68,68,.12); border-color: #4c1d2e; }
[data-theme="dark"] .pdfr-hero__page { background: var(--bg-section); }
[data-theme="dark"] .pdfr-toast { background: #334155; }
[data-theme="dark"] .pdfr-upload-preview__icon { background: rgba(239,68,68,.12); }
[data-theme="dark"] .pdfr-preview-item__thumb { background: #1a2332; }
[data-theme="dark"] .pdfr-rot-card__check,
[data-theme="dark"] .pdfr-radio__mark { border-color: #475569; }
[data-theme="dark"] .pdfr-rot-card.is-selected,
[data-theme="dark"] .pdfr-rot-card:has(input:checked),
[data-theme="dark"] .pdfr-radio:has(input:checked) { box-shadow: 0 0 0 3px rgba(225,29,72,.2); }
