.proxy-panel { display: grid; gap: 20px; min-width: 0; max-width: 100%; }
.proxy-panel > * { min-width: 0; box-sizing: border-box; }
.proxy-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.proxy-heading h2,.proxy-heading h3 { margin: 0; }
.proxy-heading p,.proxy-hint { color: var(--text-muted); font-size: 13px; }
.proxy-heading-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.proxy-heading-actions .proxy-button { margin: 0; }
.proxy-settings-button { display: inline-flex; align-items: center; gap: 8px; padding: 15px 22px; border: 2px solid var(--primary); color: var(--text-main); background: color-mix(in srgb, var(--bg-card) 75%, var(--primary)); font-weight: 700; }
.proxy-settings-button span { font-size: 20px; }
.proxy-panel .proxy-settings-modal { box-sizing: border-box; width: min(960px,95vw); max-width: 960px; max-height: 90vh; overflow-y: auto; }
.proxy-settings-modal > .password-modal-header { margin-bottom: 20px; }
.proxy-section-title { display: flex; align-items: center; gap: 10px; }
.proxy-stage-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border-color); border-radius: 50%; color: var(--text-muted); font-size: 18px; }
.proxy-stage-icon.running { color: var(--accent-soft); border-color: var(--primary); animation: proxy-stage-spin 1.2s linear infinite; }
@keyframes proxy-stage-spin { to { transform: rotate(360deg); } }
.proxy-stage-icon.done { color: var(--accent-green); border-color: var(--success); }
.proxy-stage-icon.stopped { color: var(--accent-red); border-color: var(--danger); }
.proxy-card .proxy-section-title { margin: 28px 0 0; }
.proxy-card { background: var(--bg-card); border: 1px solid var(--bg-hover); padding: 24px; border-radius: 14px; }
.proxy-card h3 { margin-top: 0; }
.proxy-source-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 22px; }
.proxy-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-bottom: 22px; align-items: start; }
.proxy-panel label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.proxy-panel textarea,.proxy-panel input[type=number] { box-sizing: border-box; width: 100%; margin: 0; background: var(--bg-main); border: 1px solid var(--bg-hover); border-radius: 8px; padding: 12px; color: var(--text-main); }
.proxy-panel textarea { resize: vertical; font-family: monospace; font-size: 12px; line-height: 1.5; }
.proxy-panel input[type=range] { width: 100%; accent-color: var(--accent-blue); margin: 12px 0; }
.proxy-panel small { color: var(--text-muted); font-size: 11px; }
.proxy-option-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.proxy-option-heading output { background: var(--bg-main); border: 1px solid var(--accent-blue); border-radius: 8px; padding: 8px 12px; color: var(--text-main); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.proxy-options fieldset { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--bg-hover); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.proxy-kinds legend { color: var(--text-secondary); font-size: 13px; padding: 0 6px; }
.proxy-panel .proxy-kind { flex: 1; margin: 0; padding: 12px 10px; }
.proxy-panel .proxy-kind.is-selected { background: var(--accent-blue); border-color: var(--accent-blue); color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); }
.proxy-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.proxy-panel .proxy-actions button { margin: 0; min-height: 44px; box-sizing: border-box; }
.proxy-button { display: inline-block; padding: 11px 18px; border-radius: 8px; border: 1px solid var(--bg-hover); background: var(--bg-main); color: var(--text-main); font-size: 13px; text-decoration: none; cursor: pointer; }
.proxy-primary { background: var(--primary); color: #fff; border-color: transparent; }
.proxy-stop { background: #984747; color: #fff; }
.proxy-results-button { padding: 16px 24px; font-weight: 700; color: #fff; background: var(--primary); border-color: var(--primary-hover); box-shadow: 0 4px 14px rgba(var(--primary-rgb),.25); }
.proxy-button:disabled { opacity: .5; cursor: not-allowed; }
.proxy-button:hover:not(:disabled) { filter: brightness(1.1); }
.proxy-button:focus-visible,.proxy-sources-scroll:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 3px; }
.proxy-message { padding: 14px; background: var(--bg-card); border-left: 3px solid var(--accent-blue); border-radius: 6px; }
.proxy-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin: 24px 0; }
.proxy-meta > div { min-width: 0; padding: 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; text-align: center; box-shadow: 0 4px 6px -1px rgba(0,0,0,.2); }
.proxy-meta dt { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.proxy-meta dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.proxy-statistics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; margin: 24px 0; }
.proxy-found-statistics { grid-template-columns: repeat(3,minmax(0,1fr)); }
.proxy-statistic { min-width: 0; background: var(--bg-card); border: 1px solid var(--border-color); padding: 16px; border-radius: 12px; display: flex; flex-direction: column; gap: 8px; text-align: center; box-shadow: 0 4px 6px -1px rgba(0,0,0,.2); }
.proxy-statistic span { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.proxy-statistic strong { font-size: 28px; font-weight: 700; color: var(--accent-soft); overflow-wrap: anywhere; }
.proxy-progress { width: 100%; height: 14px; border-radius: 99px; overflow: hidden; background: var(--bg-hover); }
.proxy-progress-fill { height: 100%; border-radius: inherit; background: var(--primary); transition: width .5s ease; }
.proxy-progress-fill.is-running { background: linear-gradient(110deg, var(--primary) 20%, var(--accent-soft) 45%, var(--primary) 70%); background-size: 200% 100%; animation: proxy-progress-flow 2s linear infinite; }
@keyframes proxy-progress-flow { from { background-position: 200% 0; } to { background-position: 0 0; } }
.proxy-loading { min-height: 240px; }
.proxy-progress-caption { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.proxy-progress-section h4 { font-size: 13px; color: var(--text-secondary); font-weight: 600; margin: 0 0 12px; }
.proxy-sources-scroll { margin-top: 24px; max-height: 322px; overflow: auto; border: 1px solid var(--bg-hover); border-radius: 10px; }
.proxy-sources-scroll table { width: 100%; font-size: 12px; overflow: visible; margin-top: 0; }
.proxy-sources-scroll th { position: sticky; top: 0; z-index: 1; background: var(--bg-hover); }
.proxy-sources-scroll th,.proxy-sources-scroll td { height: 30px; box-sizing: border-box; padding: 7px 12px; white-space: nowrap; }
.proxy-source-url { min-width: 180px; }
.proxy-source-url a { color: inherit; text-decoration: underline; }
.proxy-source-ok td { color: var(--accent-green); }
.proxy-source-failed td { color: var(--accent-red); }
.proxy-working-ok { border-color: var(--success); }
.proxy-working-ok strong,.proxy-working-ok span { color: var(--accent-green); }
.proxy-working-failed { border-color: var(--danger); }
.proxy-working-failed strong,.proxy-working-failed span { color: var(--accent-red); }
.proxy-working-scroll { height: 322px; font-size: 12px; }
.proxy-working-scroll table { font-size: 12px; }
.proxy-working-scroll th,.proxy-working-scroll td { height: 30px; padding: 7px 12px; }
.proxy-history-heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.proxy-history-heading h2 { margin: 0; }
.proxy-back-button { margin: 0; background: rgba(100,116,139,.15); border: 1px solid var(--bg-hover); color: var(--text-muted); padding: 6px 12px; border-radius: 6px; font-weight: 600; }
@media (max-width: 1000px) { .proxy-statistics { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 700px) { .proxy-source-grid,.proxy-options,.proxy-meta { grid-template-columns: 1fr; } .proxy-statistics { grid-template-columns: repeat(2,minmax(0,1fr)); } .proxy-card { padding: 16px; } }
@media (prefers-reduced-motion: reduce) { .proxy-progress-fill { transition: none; } }
.proxy-history-scroll { overflow: auto; max-height: 70vh; max-width: 100%; padding: 0; border: 1px solid var(--border-color); border-radius: 12px; }
.proxy-history-table { --list-row-hover: color-mix(in srgb, var(--bg-card) 75%, var(--bg-hover)); margin-top: 0; }
.proxy-history-table thead th { position: sticky; top: 0; z-index: 1; background: var(--bg-hover); color: var(--text-main); }
.proxy-history-table { overflow: visible; }
.proxy-history-table thead th:hover { background: var(--button-hover); }
.proxy-history-table tbody tr { background: var(--bg-card); }
.proxy-history-table tbody tr:hover { background: var(--list-row-hover); }
.proxy-history-table tbody td { background: inherit; }
.proxy-history-table { width: 100%; min-width: 1150px; }
.proxy-history-table button[title]:hover::after { display: none; }
.proxy-history-tooltip { position: fixed; z-index: 10000; pointer-events: none; box-sizing: border-box; padding: 5px 10px; background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border-color); border-radius: 6px; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3); }
.proxy-history-table th,.proxy-history-table td { vertical-align: middle; }
.proxy-history-table th { text-transform: none; letter-spacing: normal; }
.proxy-history-table td:nth-child(2),.proxy-history-table td:nth-child(3) { white-space: nowrap; }
.proxy-sort { padding: 0; margin: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.proxy-sort:disabled { opacity: .5; cursor: not-allowed; }
.proxy-row-actions { display: flex; gap: 6px; flex-wrap: nowrap; }
.proxy-row-actions .proxy-button { padding: 7px 10px; font-size: 12px; white-space: nowrap; }
.proxy-recent-tag { display: block; width: fit-content; margin-top: 6px; padding: 3px 7px; border-radius: 99px; font-size: 11px; color: var(--accent-blue); background: var(--bg-hover); }
.proxy-scan-info { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-card); color: var(--text-secondary); font-size: 13px; white-space: nowrap; overflow-x: auto; }
.proxy-scan-info-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 20px; height: 20px; border: 1px solid currentColor; border-radius: 50%; font-weight: 600; }
.proxy-overview-info { flex: 1 1 520px; align-items: flex-start; white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
.proxy-overview-info strong { color: var(--text-main); }
.proxy-heading .proxy-overview-info p { margin: 6px 0 0; color: var(--text-secondary); }
.proxy-overview-info .proxy-scan-info-icon { margin-top: 2px; }
.proxy-overview-heading { align-items: flex-start; }
.proxy-overview-info > div { flex: 1; min-width: 0; }
.proxy-overview-toggle { display: none; }
.proxy-overview-description { text-align: justify; }
.alternative-domains-empty { white-space: normal; overflow-wrap: anywhere; }
.proxy-scan-info .proxy-recent-tag { display: inline-block; margin: 0 3px; vertical-align: middle; color: var(--text-main); }
.proxy-danger { color: var(--accent-red,#d55f5f); }
@media (max-width: 700px) {
  .proxy-overview-info { font-size: 12px; }
  .proxy-heading .proxy-overview-info p { font-size: 12px; }
  .proxy-overview-title { display: none; }
  .proxy-overview-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 0; border: 0; background: transparent; color: var(--text-main); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
  .proxy-overview-toggle:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 3px; }
  .proxy-overview-description { display: none; }
  .proxy-overview-info.is-expanded .proxy-overview-description { display: block; }
  .proxy-heading-actions { width: 100%; gap: 8px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .proxy-heading-actions .proxy-button { padding: 12px 8px; display: flex; justify-content: center; text-align: center; align-items: center; gap: 6px; min-width: 0; box-sizing: border-box; }
  .proxy-meta { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .proxy-meta > div { padding: 10px 5px; }
  .proxy-meta dt { font-size: 9px; letter-spacing: 0; overflow-wrap: anywhere; }
  .proxy-meta dd { font-size: 11px; }
  .proxy-found-statistics { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .proxy-found-statistics .proxy-statistic { padding: 10px 5px; }
  .proxy-found-statistics .proxy-statistic span { font-size: 9px; letter-spacing: 0; overflow-wrap: anywhere; }
  .proxy-found-statistics .proxy-statistic strong { font-size: 22px; }
  .proxy-statistics:not(.proxy-found-statistics) > :nth-child(1) { grid-row: 1; grid-column: 1; }
  .proxy-statistics:not(.proxy-found-statistics) > :nth-child(4) { grid-row: 1; grid-column: 2; }
  .proxy-statistics:not(.proxy-found-statistics) > :nth-child(2) { grid-row: 2; grid-column: 1; }
  .proxy-statistics:not(.proxy-found-statistics) > :nth-child(3) { grid-row: 2; grid-column: 2; }
  .proxy-statistics:not(.proxy-found-statistics) > :nth-child(5) { grid-row: 3; grid-column: 1 / -1; }
  .proxy-section-title { font-size: 16px; }
  .proxy-stage-icon { flex-shrink: 0; }
  .proxy-panel .proxy-settings-modal { width: 95vw; padding: 16px; }
  .proxy-panel .proxy-settings-modal textarea { min-width: 0; }
  .proxy-sources-scroll { max-width: 100%; }
  .proxy-scan-info { align-items: flex-start; white-space: normal; overflow-x: visible; line-height: 1.6; }
  .proxy-scan-info > span:last-child { min-width: 0; overflow-wrap: anywhere; }
  .proxy-scan-info .proxy-recent-tag { white-space: nowrap; }
  .proxy-working-scroll th,.proxy-working-scroll td { padding: 7px 8px; }
}
.proxy-settings-overlay { overflow-y: auto; padding: 12px; box-sizing: border-box; }
.proxy-panel .proxy-settings-modal { flex-shrink: 0; min-height: 0; max-height: calc(100dvh - 24px) !important; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.proxy-settings-modal .proxy-actions { position: sticky; bottom: -16px; background: var(--bg-card); padding: 12px 0; z-index: 2; }
.proxy-working-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border-color); min-width: 0; }
.proxy-download-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.proxy-working-section h3 { margin-bottom: 22px; }
.proxy-download-actions .proxy-button { margin: 0; }
.proxy-download-actions .proxy-button { display: inline-flex; align-items: center; gap: 8px; }
.proxy-history-table tbody tr.proxy-current-row { background: color-mix(in srgb, var(--bg-card) 90%, var(--primary)); }
.proxy-history-table tbody tr.proxy-current-row:hover { background: color-mix(in srgb, var(--bg-card) 84%, var(--primary)); }
.proxy-current-card { border-color: var(--primary); background: color-mix(in srgb, var(--bg-card) 96%, var(--primary)); }
.proxy-progress-section h4 { display: flex; align-items: center; gap: 8px; }
.proxy-settings-modal .proxy-actions { bottom: 0; }
.proxy-panel .proxy-settings-modal { display: flex; flex-direction: column; overflow: hidden; }
.proxy-settings-modal > .password-modal-header { flex-shrink: 0; }
.proxy-settings-modal > form { display: flex; flex-direction: column; min-height: 0; }
.proxy-settings-fields { min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-right: 4px; }
.proxy-settings-modal .proxy-actions { position: static; flex-shrink: 0; border-top: 1px solid var(--border-color); }
@media (max-width: 700px) { .proxy-settings-modal .proxy-actions { display: grid; grid-template-columns: 1fr 1fr; } .proxy-settings-modal .proxy-actions button { min-width: 0; padding: 10px 6px; } }
@media (prefers-reduced-motion: reduce) { .proxy-stage-icon.running { animation: none; } }
@media (max-width: 700px) {
  .proxy-download-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .proxy-download-actions .proxy-button { min-width: 0; justify-content: center; padding: 10px 4px; gap: 4px; font-size: 11px; }
  .proxy-download-actions svg { width: 14px; height: 14px; flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) { .proxy-progress-fill.is-running,.proxy-loading .spinner { animation: none; } }
