/* ============================================================
   PicResizer Tool — Shared Frontend Styles
   Vibrant Sunset: Orange → Pink → Purple
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Sora:wght@700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --pr-c1: #FF7A30;
    --pr-c2: #F72585;
    --pr-c3: #7209B7;
    --pr-grad: linear-gradient(135deg, var(--pr-c1) 0%, var(--pr-c2) 50%, var(--pr-c3) 100%);
    --pr-soft: linear-gradient(135deg, rgba(255,122,48,0.10), rgba(247,37,133,0.08), rgba(114,9,183,0.10));
    --pr-bg:      #0d0712;
    --pr-card:    rgba(255,255,255,0.045);
    --pr-border:  rgba(255,255,255,0.10);
    --pr-text:    #f3eef8;
    --pr-muted:   #9b8aab;
    --pr-subtle:  #c4b8d1;
    --pr-radius:  16px;
}

/* ── Widget shell ── */
.pr-widget {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--pr-bg);
    color: var(--pr-text);
    border-radius: 22px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}
.pr-widget::before {
    content: '';
    position: absolute;
    top: -120px; right: -80px;
    width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(247,37,133,0.14) 0%, transparent 70%);
    pointer-events: none;
}
.pr-widget::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -60px;
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(114,9,183,0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Widget header ── */
.pr-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; position: relative; z-index: 1; }
.pr-head-icon {
    width: 50px; height: 50px; border-radius: 14px;
    background: var(--pr-grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    box-shadow: 0 6px 20px rgba(247,37,133,0.35);
    flex-shrink: 0;
}
.pr-head-text h2 {
    font-family: 'Sora', sans-serif;
    font-size: 20px; font-weight: 800; color: #fff;
    letter-spacing: -0.3px; line-height: 1.2; margin: 0 0 3px;
}
.pr-head-text p { font-size: 12.5px; color: var(--pr-muted); margin: 0; }

/* ── Notice ── */
.pr-notice {
    padding: 12px 16px; border-radius: 11px; font-size: 13px; font-weight: 500;
    margin-bottom: 18px; display: none; position: relative; z-index: 1;
}
.pr-notice.success { background: rgba(45,212,191,0.1); border: 1px solid rgba(45,212,191,0.25); color: #5eead4; }
.pr-notice.error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.25);  color: #f87171; }

/* ── Grid layouts ── */
.pr-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; position: relative; z-index: 1; }
.pr-grid-3 { display: grid; grid-template-columns: 1fr 280px; gap: 18px; position: relative; z-index: 1; }
@media (max-width: 700px) { .pr-grid, .pr-grid-3 { grid-template-columns: 1fr; } }

/* ── Cards ── */
.pr-card {
    background: var(--pr-card);
    border: 1px solid var(--pr-border);
    border-radius: var(--pr-radius);
    padding: 20px;
}
.pr-card-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.1px; color: var(--pr-muted); margin-bottom: 16px;
    display: flex; align-items: center; gap: 7px;
}
.pr-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.pr-dot-pink   { background: #F72585; box-shadow: 0 0 7px #F72585; }
.pr-dot-orange { background: #FF7A30; box-shadow: 0 0 7px #FF7A30; }
.pr-dot-purple { background: #7209B7; box-shadow: 0 0 7px #7209B7; }
.pr-dot-teal   { background: #2dd4bf; box-shadow: 0 0 7px #2dd4bf; }

/* ── Dropzone ── */
.pr-dropzone {
    border: 2px dashed rgba(247,37,133,0.3);
    border-radius: 14px; padding: 36px 16px; text-align: center; cursor: pointer;
    background: rgba(247,37,133,0.02); transition: all .22s;
}
.pr-dropzone:hover, .pr-dropzone.dragover {
    border-color: #F72585; background: rgba(247,37,133,0.07); transform: scale(1.005);
}
.pr-drop-icon  { font-size: 38px; margin-bottom: 10px; }
.pr-drop-main  { font-size: 14.5px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.pr-drop-or    { font-size: 11.5px; color: var(--pr-muted); margin-bottom: 14px; }
.pr-drop-hint  { font-size: 10.5px; color: var(--pr-muted); margin-top: 14px; }

/* ── Preview ── */
.pr-preview { margin-top: 14px; }
.pr-preview img {
    width: 100%; max-height: 230px; object-fit: contain;
    border-radius: 10px; background: rgba(0,0,0,0.25);
}
.pr-preview-meta {
    font-size: 11.5px; color: var(--pr-muted); margin-top: 8px;
    background: rgba(0,0,0,0.2); padding: 8px 12px; border-radius: 8px;
}

/* ── Form fields ── */
.pr-field { margin-bottom: 16px; }
.pr-label {
    display: block; font-size: 11.5px; font-weight: 600; color: var(--pr-subtle);
    margin-bottom: 7px; text-transform: uppercase; letter-spacing: .5px;
}
.pr-input {
    width: 100%; background: rgba(255,255,255,0.05); border: 1px solid var(--pr-border);
    border-radius: 10px; padding: 11px 14px; color: #fff; font-size: 14px;
    font-family: 'Inter', sans-serif; outline: none; transition: all .2s;
}
.pr-input:focus { border-color: rgba(247,37,133,0.5); box-shadow: 0 0 0 3px rgba(247,37,133,0.09); }

/* Toggle switch */
.pr-switch-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; cursor: pointer; font-size: 13px; color: var(--pr-subtle);
}
.pr-switch { position: relative; display: inline-block; width: 42px; height: 22px; flex-shrink: 0; }
.pr-switch input { opacity: 0; width: 0; height: 0; }
.pr-switch-track {
    position: absolute; inset: 0; background: rgba(255,255,255,0.12);
    border-radius: 100px; transition: .25s;
}
.pr-switch-track::before {
    content: ''; position: absolute; width: 16px; height: 16px;
    left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s;
}
.pr-switch input:checked + .pr-switch-track { background: var(--pr-grad); }
.pr-switch input:checked + .pr-switch-track::before { transform: translateX(20px); }

/* Range slider */
.pr-range {
    width: 100%; appearance: none; height: 3px;
    background: rgba(255,255,255,0.12); border-radius: 100px; outline: none; margin: 7px 0;
}
.pr-range::-webkit-slider-thumb {
    appearance: none; width: 18px; height: 18px; border-radius: 50%;
    background: #F72585; cursor: pointer; box-shadow: 0 0 9px rgba(247,37,133,0.55);
}
.pr-range-ends { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--pr-muted); }
.pr-hint { font-size: 11px; color: var(--pr-muted); margin-top: 7px; }

/* ── Buttons ── */
.pr-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 13px 22px; border-radius: 11px;
    font-size: 14px; font-weight: 700; font-family: 'Inter', sans-serif;
    cursor: pointer; border: none; text-decoration: none; transition: all .2s ease;
    margin-top: 6px;
}
.pr-btn:disabled { opacity: .38; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.pr-btn-primary { background: var(--pr-grad); color: #fff; font-size: 14.5px; padding: 14px; }
.pr-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(247,37,133,0.38); }

.pr-btn-success { background: linear-gradient(135deg, #2dd4bf, #0d9488); color: #fff; font-size: 14.5px; padding: 14px; }
.pr-btn-success:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(45,212,191,0.32); }

.pr-btn-outline { background: transparent; border: 1.5px solid rgba(247,37,133,0.38); color: #ff8fb8; width: auto; padding: 9px 20px; }
.pr-btn-outline:hover { background: rgba(247,37,133,0.09); }

.pr-btn-danger { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #f87171; }
.pr-btn-danger:hover { background: rgba(239,68,68,0.18); }
.pr-btn-sm { padding: 8px 14px; font-size: 12px; margin-top: 10px; }
.pr-btn-link { background: none; border: none; cursor: pointer; font-size: 12px; font-family: 'Inter', sans-serif; color: #f87171; width: auto; padding: 0; }

/* ── Result area ── */
.pr-result { margin-top: 18px; position: relative; z-index: 1; }
.pr-result-row { display: flex; align-items: center; gap: 20px; }
.pr-result-row img {
    max-width: 50%; max-height: 200px; object-fit: contain;
    border-radius: 10px; background: rgba(0,0,0,0.28);
}
.pr-result-stats { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pr-stat { background: rgba(255,255,255,0.04); border: 1px solid var(--pr-border); border-radius: 10px; padding: 10px 14px; }
.pr-stat strong { display: block; font-size: 17px; color: #fff; }
.pr-stat span   { font-size: 11px; color: var(--pr-muted); }

/* ── BG Remover compare ── */
.pr-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.pr-compare-pane { position: relative; border-radius: 10px; overflow: hidden; }
.pr-compare-tag {
    position: absolute; top: 7px; left: 7px; z-index: 2;
    background: rgba(0,0,0,0.62); color: #fff;
    font-size: 9.5px; font-weight: 700; padding: 3px 8px; border-radius: 100px;
}
.pr-compare-tag.green { background: rgba(45,212,191,0.85); }
.pr-compare-pane img { width: 100%; max-height: 220px; object-fit: contain; display: block; }
.pr-checker { background: repeating-conic-gradient(#1a1322 0% 25%, #221a2c 0% 50%) 0 0/16px 16px; }

.pr-infobox {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--pr-soft); border: 1px solid rgba(247,37,133,0.18);
    border-radius: 11px; padding: 13px; margin-bottom: 16px;
    font-size: 12.5px; color: var(--pr-subtle); line-height: 1.55;
}
.pr-infobox strong { color: var(--pr-text); }
.pr-infobox > span { font-size: 19px; flex-shrink: 0; }

.pr-radio-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.pr-radio { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--pr-subtle); transition: color .15s; }
.pr-radio:hover { color: #fff; }
.pr-radio input { display: none; }
.pr-radio-circle {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.22); flex-shrink: 0; transition: all .2s; position: relative;
}
.pr-radio input:checked + .pr-radio-circle { border-color: #F72585; background: #F72585; }
.pr-radio input:checked + .pr-radio-circle::after { content:''; position:absolute; inset:3px; background:#fff; border-radius:50%; }

/* ── Converter format grid ── */
.pr-fmt-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-bottom: 18px; }
.pr-fmt-card {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 13px 6px; border-radius: 12px; cursor: pointer; text-align: center;
    background: rgba(255,255,255,0.04); border: 2px solid var(--pr-border); transition: all .2s;
}
.pr-fmt-card:hover { border-color: rgba(247,37,133,0.3); }
.pr-fmt-card.active { border-color: #F72585; background: rgba(247,37,133,0.09); }
.pr-fmt-card input { display: none; }
.pr-fmt-ico { font-size: 22px; }
.pr-fmt-lbl { font-size: 11.5px; font-weight: 700; color: #fff; }
.pr-fmt-desc { font-size: 9.5px; color: var(--pr-muted); }
.pr-fmt-card.active .pr-fmt-desc { color: #ff8fb8; }

/* Converter file list */
.pr-filelist-head { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 8px; font-size: 12px; color: var(--pr-subtle); }
.pr-files { display: flex; flex-direction: column; gap: 7px; }
.pr-file-row {
    display: flex; align-items: center; gap: 11px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--pr-border);
    border-radius: 10px; padding: 9px 14px;
}
.pr-file-row img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: rgba(0,0,0,0.25); }
.pr-file-row-info { flex: 1; min-width: 0; }
.pr-file-row-name { font-size: 12px; font-weight: 500; color: var(--pr-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-file-row-meta { font-size: 10.5px; color: var(--pr-muted); margin-top: 2px; }
.pr-file-row-status { font-size: 11px; color: var(--pr-muted); flex-shrink: 0; }
.pr-file-row-status.done  { color: #2dd4bf; }
.pr-file-row-status.error { color: #f87171; }

/* Converter results */
.pr-cv-results { display: flex; flex-direction: column; gap: 9px; }
.pr-cv-result {
    display: flex; align-items: center; gap: 14px;
    background: rgba(45,212,191,0.06); border: 1px solid rgba(45,212,191,0.17);
    border-radius: 11px; padding: 12px 16px;
}
.pr-cv-result img { width: 44px; height: 44px; object-fit: cover; border-radius: 7px; flex-shrink: 0; background: rgba(0,0,0,0.3); }
.pr-cv-result-info { flex: 1; min-width: 0; }
.pr-cv-result-name { font-size: 12.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-cv-tag { background: rgba(45,212,191,0.16); color: #2dd4bf; font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 100px; margin-right: 6px; }
.pr-cv-size { font-size: 10.5px; color: var(--pr-muted); }
.pr-dl-link {
    background: rgba(45,212,191,0.14); border: 1px solid rgba(45,212,191,0.28);
    color: #2dd4bf; padding: 7px 14px; border-radius: 8px;
    font-size: 12px; font-weight: 700; text-decoration: none; flex-shrink: 0; transition: all .2s;
}
.pr-dl-link:hover { background: rgba(45,212,191,0.24); }

/* ── Loader ── */
.pr-loader {
    position: absolute; inset: 0;
    background: rgba(13,7,18,0.9); backdrop-filter: blur(7px);
    display: none; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; border-radius: 22px; z-index: 10;
}
.pr-loader.show { display: flex; }
.pr-loader p     { font-size: 13.5px; color: var(--pr-subtle); }
.pr-loader small { font-size: 11px; color: var(--pr-muted); }
.pr-spinner {
    width: 40px; height: 40px; border-radius: 50%;
    border: 3px solid rgba(247,37,133,0.22);
    border-top-color: #F72585;
    animation: pr-spin .75s linear infinite;
    box-shadow: 0 0 16px rgba(247,37,133,0.22);
}
@keyframes pr-spin { to { transform: rotate(360deg); } }

/* ── Footer text ── */
.pr-footer-text {
    margin-top: 16px; padding-top: 14px;
    border-top: 1px solid var(--pr-border);
    font-size: 11.5px; color: var(--pr-muted);
    text-align: center; position: relative; z-index: 1;
}
.pr-footer-text a { color: #ff8fb8; }
