katproxy/public/style.css

963 lines
17 KiB
CSS

:root {
--bg-primary: #09090b;
--bg-surface: #111114;
--bg-surface-hover: #18181c;
--bg-card: rgba(18, 18, 22, 0.75);
--bg-pill: rgba(255, 255, 255, 0.04);
--bg-pill-hover: rgba(255, 255, 255, 0.08);
--border-subtle: rgba(255, 255, 255, 0.08);
--border-hover: rgba(255, 255, 255, 0.16);
--border-focus: rgba(16, 185, 129, 0.5);
--text-main: #f4f4f5;
--text-muted: #a1a1aa;
--text-dim: #71717a;
--accent-emerald: #10b981;
--accent-emerald-dim: rgba(16, 185, 129, 0.15);
--accent-cyan: #38bdf8;
--accent-cyan-dim: rgba(56, 189, 248, 0.15);
--accent-amber: #f59e0b;
--accent-amber-dim: rgba(245, 158, 11, 0.15);
--accent-rose: #f43f5e;
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
--font-mono: 'JetBrains Mono', monospace;
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 14px;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background-color: var(--bg-primary);
color: var(--text-main);
font-family: var(--font-sans);
min-height: 100vh;
position: relative;
overflow-x: hidden;
-webkit-font-smoothing: antialiased;
}
/* Ambient Subtle Radial Glow */
.ambient-glow {
position: fixed;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 900px;
height: 380px;
background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.05) 0%, rgba(56, 189, 248, 0.02) 40%, transparent 70%);
pointer-events: none;
z-index: 0;
}
.app-container {
max-width: 1240px;
margin: 0 auto;
padding: 28px 24px 60px;
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
min-height: 100vh;
}
/* Header */
.header {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 20px;
padding-bottom: 24px;
border-bottom: 1px solid var(--border-subtle);
}
.brand {
display: flex;
align-items: center;
gap: 10px;
}
.brand-dot {
width: 8px;
height: 8px;
background-color: var(--accent-emerald);
border-radius: 50%;
box-shadow: 0 0 10px var(--accent-emerald);
animation: pulse-dot 2.5s infinite ease-in-out;
}
@keyframes pulse-dot {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.4; transform: scale(0.85); }
}
.brand-name {
font-family: var(--font-mono);
font-size: 22px;
font-weight: 700;
letter-spacing: -0.5px;
color: #fff;
}
.brand-badge {
font-family: var(--font-mono);
font-size: 10px;
font-weight: 700;
color: var(--accent-emerald);
background: var(--accent-emerald-dim);
border: 1px solid rgba(16, 185, 129, 0.3);
padding: 2px 7px;
border-radius: 9999px;
letter-spacing: 0.5px;
}
.brand-subtitle {
font-size: 13px;
color: var(--text-dim);
margin-top: 4px;
}
.header-right {
display: flex;
align-items: center;
gap: 16px;
flex-wrap: wrap;
}
.stats-group {
display: flex;
align-items: center;
gap: 8px;
}
.stat-pill {
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-sm);
padding: 6px 12px;
display: flex;
flex-direction: column;
min-width: 78px;
}
.stat-label {
font-family: var(--font-mono);
font-size: 9px;
font-weight: 600;
color: var(--text-dim);
letter-spacing: 0.5px;
}
.stat-value {
font-family: var(--font-mono);
font-size: 14px;
font-weight: 600;
color: var(--text-main);
margin-top: 1px;
}
.highlight-emerald {
color: var(--accent-emerald) !important;
}
.highlight-cyan {
color: var(--accent-cyan) !important;
}
/* Refresh & Timer */
.refresh-control {
display: flex;
align-items: center;
gap: 8px;
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
padding: 4px 8px;
border-radius: var(--radius-sm);
}
.timer-widget {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 0 4px 0 2px;
}
.progress-ring {
display: block;
flex-shrink: 0;
}
.progress-ring-circle {
transform: rotate(-90deg);
transform-origin: 50% 50%;
transition: stroke-dashoffset 0.4s ease;
}
.timer-text {
font-family: var(--font-mono);
font-size: 11px;
color: var(--text-muted);
font-weight: 500;
letter-spacing: -0.2px;
min-width: 34px;
}
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
font-family: var(--font-sans);
font-size: 12px;
font-weight: 500;
padding: 6px 12px;
border-radius: var(--radius-sm);
border: 1px solid var(--border-subtle);
background: var(--bg-surface);
color: var(--text-main);
cursor: pointer;
transition: all 0.15s ease;
user-select: none;
}
.btn:hover {
background: var(--bg-surface-hover);
border-color: var(--border-hover);
}
.btn:active {
transform: scale(0.98);
}
.btn:disabled {
opacity: 0.4;
cursor: not-allowed;
transform: none;
}
.btn-icon {
padding: 6px;
background: transparent;
border: none;
color: var(--text-muted);
border-radius: 4px;
}
.btn-icon:hover {
background: rgba(255, 255, 255, 0.06);
color: #fff;
}
.btn-icon.spinning svg {
animation: spin 0.8s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.btn-primary {
background: var(--accent-emerald);
color: #000;
border-color: var(--accent-emerald);
font-weight: 600;
}
.btn-primary:hover {
background: #059669;
border-color: #059669;
}
.btn-secondary {
background: var(--bg-pill);
border-color: var(--border-subtle);
color: var(--text-muted);
}
.btn-secondary:hover {
background: var(--bg-pill-hover);
color: #fff;
border-color: var(--border-hover);
}
.btn-sm {
padding: 5px 10px;
font-size: 11px;
}
.btn-xs {
padding: 4px 8px;
font-size: 11px;
}
/* Controls Bar */
.controls-bar {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 12px;
margin-top: 24px;
padding: 12px 16px;
background: var(--bg-card);
backdrop-filter: blur(16px);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-md);
}
/* Protocol Pills */
.filter-pills {
display: flex;
background: rgba(0, 0, 0, 0.3);
padding: 3px;
border-radius: var(--radius-sm);
border: 1px solid var(--border-subtle);
}
.pill-btn {
font-family: var(--font-mono);
font-size: 11px;
font-weight: 600;
padding: 4px 10px;
background: transparent;
color: var(--text-dim);
border: none;
border-radius: 4px;
cursor: pointer;
transition: all 0.15s ease;
}
.pill-btn:hover {
color: var(--text-muted);
}
.pill-btn.active {
background: rgba(255, 255, 255, 0.1);
color: #fff;
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
/* Toggle Switch */
.toggle-control {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
user-select: none;
}
.toggle-control input {
display: none;
}
.toggle-slider {
width: 32px;
height: 18px;
background: #27272a;
border-radius: 9999px;
position: relative;
transition: background 0.2s ease;
}
.toggle-slider::after {
content: '';
position: absolute;
top: 2px;
left: 2px;
width: 14px;
height: 14px;
background: #fff;
border-radius: 50%;
transition: transform 0.2s ease;
}
.toggle-control input:checked + .toggle-slider {
background: var(--accent-emerald);
}
.toggle-control input:checked + .toggle-slider::after {
transform: translateX(14px);
}
.toggle-label {
font-size: 12px;
color: var(--text-muted);
font-weight: 500;
}
/* Search Box */
.search-box {
flex: 1;
min-width: 220px;
position: relative;
display: flex;
align-items: center;
}
.search-icon {
position: absolute;
left: 10px;
color: var(--text-dim);
pointer-events: none;
}
.search-box input {
width: 100%;
background: rgba(0, 0, 0, 0.35);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-sm);
padding: 7px 28px 7px 32px;
color: #fff;
font-family: var(--font-sans);
font-size: 12px;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-box input:focus {
outline: none;
border-color: var(--border-focus);
box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}
.search-box input::placeholder {
color: var(--text-dim);
}
.search-clear {
position: absolute;
right: 8px;
background: transparent;
border: none;
color: var(--text-dim);
font-size: 14px;
cursor: pointer;
padding: 2px 4px;
}
.search-clear:hover {
color: #fff;
}
/* Select Dropdown */
.select-wrapper {
position: relative;
display: flex;
align-items: center;
}
.select-wrapper select {
appearance: none;
background: rgba(0, 0, 0, 0.35);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-sm);
padding: 7px 28px 7px 10px;
color: var(--text-muted);
font-family: var(--font-sans);
font-size: 12px;
cursor: pointer;
}
.select-wrapper select:focus {
outline: none;
border-color: var(--border-focus);
}
.select-arrow {
position: absolute;
right: 9px;
color: var(--text-dim);
pointer-events: none;
}
/* Action Buttons Group */
.action-buttons {
display: flex;
gap: 8px;
}
/* Main Content & Metadata */
.main-content {
flex: 1;
margin-top: 18px;
}
.list-meta {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
color: var(--text-dim);
padding: 0 4px 12px;
}
.checking-indicator {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--accent-cyan);
}
.spin-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--accent-cyan);
animation: pulse-dot 1.2s infinite;
}
/* Proxy Grid & Cards */
.proxy-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
gap: 12px;
}
.proxy-card {
background: var(--bg-card);
backdrop-filter: blur(12px);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-md);
padding: 14px 16px;
display: flex;
flex-direction: column;
gap: 10px;
transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
position: relative;
cursor: pointer;
}
.proxy-card:hover {
background: var(--bg-surface-hover);
border-color: var(--border-hover);
transform: translateY(-2px);
}
.card-top {
display: flex;
justify-content: space-between;
align-items: center;
}
.endpoint-group {
display: flex;
align-items: baseline;
gap: 6px;
font-family: var(--font-mono);
}
.ip-text {
font-size: 14px;
font-weight: 600;
color: #fff;
letter-spacing: -0.2px;
}
.port-text {
font-size: 13px;
font-weight: 500;
color: var(--text-muted);
}
.copy-hint-btn {
background: transparent;
border: none;
color: var(--text-dim);
cursor: pointer;
padding: 3px;
border-radius: 4px;
opacity: 0.6;
transition: opacity 0.15s, color 0.15s;
}
.proxy-card:hover .copy-hint-btn {
opacity: 1;
color: var(--text-muted);
}
.copy-hint-btn:hover {
color: #fff;
}
.card-middle {
display: flex;
align-items: center;
justify-content: space-between;
}
.badge-row {
display: flex;
align-items: center;
gap: 6px;
}
.proto-tag {
font-family: var(--font-mono);
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
padding: 2px 6px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.05);
color: var(--text-muted);
border: 1px solid rgba(255, 255, 255, 0.06);
}
.proto-tag.proto-http {
color: #60a5fa;
background: rgba(96, 165, 250, 0.1);
border-color: rgba(96, 165, 250, 0.2);
}
.proto-tag.proto-socks4 {
color: #c084fc;
background: rgba(192, 132, 252, 0.1);
border-color: rgba(192, 132, 252, 0.2);
}
.proto-tag.proto-socks5 {
color: #34d399;
background: rgba(52, 211, 153, 0.1);
border-color: rgba(52, 211, 153, 0.2);
}
.latency-badge {
display: flex;
align-items: center;
gap: 5px;
font-family: var(--font-mono);
font-size: 11px;
font-weight: 600;
}
.latency-dot {
width: 6px;
height: 6px;
border-radius: 50%;
}
.latency-fast {
color: var(--accent-emerald);
}
.latency-fast .latency-dot {
background: var(--accent-emerald);
box-shadow: 0 0 6px var(--accent-emerald);
}
.latency-med {
color: var(--accent-amber);
}
.latency-med .latency-dot {
background: var(--accent-amber);
}
.latency-slow {
color: var(--text-dim);
}
.latency-slow .latency-dot {
background: var(--text-dim);
}
.card-bottom {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 6px;
border-top: 1px solid rgba(255, 255, 255, 0.04);
font-size: 11px;
color: var(--text-dim);
}
.geo-info {
display: flex;
align-items: center;
gap: 5px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.country-flag {
font-size: 13px;
}
.card-actions-quick {
display: flex;
gap: 4px;
}
.quick-action-link {
background: none;
border: none;
font-family: var(--font-mono);
font-size: 10px;
color: var(--text-dim);
cursor: pointer;
padding: 2px 4px;
border-radius: 3px;
transition: color 0.15s, background 0.15s;
}
.quick-action-link:hover {
color: #fff;
background: rgba(255, 255, 255, 0.08);
}
/* Empty State */
.empty-state {
text-align: center;
padding: 60px 20px;
background: var(--bg-card);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-md);
margin-top: 20px;
}
.empty-icon {
font-size: 32px;
color: var(--text-dim);
margin-bottom: 12px;
}
.empty-state h3 {
font-size: 16px;
color: #fff;
margin-bottom: 6px;
}
.empty-state p {
font-size: 13px;
color: var(--text-dim);
margin-bottom: 16px;
}
/* Pagination */
.pagination-bar {
display: flex;
justify-content: center;
align-items: center;
gap: 16px;
margin-top: 28px;
}
.page-indicator {
font-family: var(--font-mono);
font-size: 12px;
color: var(--text-dim);
}
/* Footer */
.footer {
margin-top: auto;
padding-top: 36px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 11px;
color: var(--text-dim);
border-top: 1px solid var(--border-subtle);
}
.footer-link {
color: var(--text-dim);
text-decoration: none;
transition: color 0.15s;
}
.footer-link:hover {
color: #fff;
}
.separator {
margin: 0 6px;
color: rgba(255, 255, 255, 0.15);
}
/* Modal */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(8px);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
padding: 20px;
}
.modal-card {
background: #121216;
border: 1px solid var(--border-hover);
border-radius: var(--radius-lg);
max-width: 440px;
width: 100%;
padding: 24px;
box-shadow: 0 20px 40px rgba(0,0,0,0.6);
animation: modal-in 0.18s ease-out;
}
@keyframes modal-in {
from { opacity: 0; transform: scale(0.96); }
to { opacity: 1; transform: scale(1); }
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.modal-header h3 {
font-size: 15px;
font-weight: 600;
color: #fff;
}
.modal-close {
background: transparent;
border: none;
color: var(--text-dim);
font-size: 20px;
cursor: pointer;
}
.modal-close:hover {
color: #fff;
}
.modal-body {
margin-bottom: 20px;
}
.modal-body label {
display: block;
font-size: 12px;
font-weight: 500;
color: var(--text-muted);
margin-bottom: 6px;
}
.modal-input {
width: 100%;
background: #09090b;
border: 1px solid var(--border-subtle);
border-radius: var(--radius-sm);
padding: 8px 12px;
color: #fff;
font-family: var(--font-mono);
font-size: 13px;
margin-bottom: 8px;
}
.modal-input:focus {
outline: none;
border-color: var(--accent-emerald);
}
.modal-hint {
font-size: 11px;
color: var(--text-dim);
line-height: 1.5;
margin-bottom: 12px;
}
.quick-endpoints {
display: flex;
gap: 6px;
flex-wrap: wrap;
}
.modal-footer {
display: flex;
justify-content: flex-end;
gap: 8px;
}
/* Toast System */
.toast-container {
position: fixed;
bottom: 24px;
right: 24px;
display: flex;
flex-direction: column;
gap: 8px;
z-index: 200;
pointer-events: none;
}
.toast {
background: rgba(18, 18, 22, 0.95);
backdrop-filter: blur(12px);
border: 1px solid var(--border-hover);
color: #fff;
padding: 10px 16px;
border-radius: var(--radius-md);
font-size: 12px;
font-family: var(--font-mono);
box-shadow: 0 10px 25px rgba(0,0,0,0.5);
display: flex;
align-items: center;
gap: 8px;
animation: toast-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
transition: opacity 0.2s, transform 0.2s;
pointer-events: auto;
}
.toast.toast-exit {
opacity: 0;
transform: translateY(8px);
}
@keyframes toast-in {
from { opacity: 0; transform: translateY(12px) scale(0.96); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
.toast-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--accent-emerald);
}
/* Utilities */
.hidden {
display: none !important;
}
/* Responsive */
@media (max-width: 768px) {
.header {
flex-direction: column;
align-items: flex-start;
}
.header-right {
width: 100%;
justify-content: space-between;
}
.controls-bar {
flex-direction: column;
align-items: stretch;
}
.action-buttons {
justify-content: space-between;
}
.proxy-grid {
grid-template-columns: 1fr;
}
}