ctf-ad-mirror-tool-rust/web/app.css

941 lines
26 KiB
CSS

/* Original mirror_tool base.html CSS, retained verbatim. */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
background: #000000 !important;
height: 100%;
}
body {
background: #000000 !important;
background-color: #000000 !important;
min-height: 100vh;
height: 100%;
overflow: hidden;
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
color: #ffffff;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.navbar {
background: rgba(0, 0, 0, 0.8) !important;
backdrop-filter: blur(20px) saturate(180%);
border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
padding: 0;
}
.navbar-brand {
color: #ffffff !important;
font-weight: 500;
font-size: 15px;
letter-spacing: -0.3px;
}
.nav-link {
color: rgba(255, 255, 255, 0.8) !important;
font-size: 14px;
font-weight: 400;
}
.nav-link:hover {
color: #ffffff !important;
}
.container {
max-width: 95vw;
padding: 12px 14px;
height: 100vh;
display: flex;
flex-direction: column;
gap: 10px;
overflow: hidden;
}
.service-card {
background: rgba(28, 28, 30, 0.6);
border: 0.5px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
backdrop-filter: blur(20px) saturate(180%);
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
margin-bottom: 8px;
padding: 16px 20px;
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
position: relative;
z-index: 1;
}
.service-card:hover {
background: rgba(28, 28, 30, 0.8);
border-color: rgba(255, 255, 255, 0.15);
}
.service-content {
display: flex;
align-items: center;
gap: 16px;
flex: 1;
}
.service-title {
color: #ffffff;
font-size: 15px;
font-weight: 500;
letter-spacing: -0.2px;
margin: 0;
}
.service-ip {
color: rgba(52, 199, 89, 0.9);
font-size: 13px;
font-weight: 500;
font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
margin-top: 4px;
}
.service-port {
color: rgba(255, 255, 255, 0.5);
font-size: 13px;
font-weight: 400;
font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
}
.service-controls {
display: flex;
align-items: center;
gap: 12px;
}
.select-modern {
background: rgba(44, 44, 46, 0.8);
border: 0.5px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
color: #ffffff;
padding: 8px 12px;
font-size: 13px;
min-width: 180px;
transition: all 0.2s;
}
.select-modern:focus {
outline: none;
border-color: rgba(255, 255, 255, 0.2);
background: rgba(44, 44, 46, 1);
}
.select-modern option {
background: #1c1c1e;
color: #ffffff;
}
.custom-select {
position: relative;
min-width: 180px;
}
.custom-select-display {
background: rgba(44, 44, 46, 0.8);
border: 0.5px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
color: #ffffff;
padding: 8px 12px;
font-size: 13px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
cursor: pointer;
transition: all 0.2s;
}
.custom-select-display i {
font-size: 11px;
color: rgba(255, 255, 255, 0.5);
transition: transform 0.2s;
}
.custom-select.open .custom-select-display {
border-color: rgba(255, 255, 255, 0.2);
background: rgba(44, 44, 46, 1);
}
.custom-select.open .custom-select-display i {
transform: rotate(180deg);
}
.custom-select-dropdown {
position: absolute;
top: calc(100% + 6px);
left: 0;
right: 0;
background: rgba(28, 28, 30, 0.95);
border: 0.5px solid rgba(255, 255, 255, 0.1);
border-radius: 10px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
padding: 6px 0;
max-height: 240px;
overflow-y: auto;
opacity: 0;
pointer-events: none;
transform: translateY(-6px);
transition: all 0.2s;
z-index: 10;
}
.service-card.select-open {
z-index: 50;
}
.custom-select.open .custom-select-dropdown {
opacity: 1;
pointer-events: auto;
transform: translateY(0);
}
.custom-select-option {
padding: 8px 12px;
color: rgba(255, 255, 255, 0.9);
font-size: 13px;
transition: all 0.2s;
display: flex;
align-items: center;
gap: 8px;
}
.custom-select-option:hover {
background: rgba(44, 44, 46, 0.8);
}
.custom-select-option.active {
color: #34c759;
}
.option-status {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
background: rgba(255, 255, 255, 0.3);
}
.option-status.available {
background: #34c759;
}
.option-status.unavailable {
background: #ff453a;
}
.option-status.unknown {
background: rgba(255, 255, 255, 0.3);
}
.input-modern {
background: rgba(44, 44, 46, 0.8);
border: 0.5px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
color: #ffffff;
padding: 8px 12px;
font-size: 13px;
transition: all 0.2s;
}
.input-modern::placeholder {
color: rgba(255, 255, 255, 0.4);
}
.input-modern:focus {
outline: none;
border-color: rgba(255, 255, 255, 0.2);
background: rgba(44, 44, 46, 1);
}
.toggle-button {
width: 44px;
height: 28px;
border-radius: 14px;
border: none;
position: relative;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
background: rgba(120, 120, 128, 0.3);
padding: 0;
}
.toggle-button.no-transition,
.toggle-button.no-transition::before {
transition: none !important;
}
.toggle-button.active {
background: #34c759;
}
.toggle-button::before {
content: '';
position: absolute;
width: 24px;
height: 24px;
border-radius: 12px;
background: #ffffff;
top: 2px;
left: 2px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.toggle-button.active::before {
transform: translateX(16px);
}
.toggle-button:hover {
opacity: 0.8;
}
.toggle-button:active {
transform: scale(0.95);
}
.btn-delete {
width: 28px;
height: 28px;
border-radius: 6px;
border: none;
background: rgba(255, 59, 48, 0.2);
color: #ff3b30;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
padding: 0;
}
.btn-delete:hover {
background: rgba(255, 59, 48, 0.3);
}
.section-title {
color: #ffffff;
font-size: 22px;
font-weight: 600;
margin-bottom: 16px;
letter-spacing: -0.5px;
}
.add-button {
background: rgba(44, 44, 46, 0.8);
border: 0.5px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
color: #ffffff;
padding: 8px 16px;
font-size: 13px;
font-weight: 500;
transition: all 0.2s;
display: flex;
align-items: center;
gap: 6px;
cursor: pointer;
}
.add-button:hover {
background: rgba(44, 44, 46, 1);
border-color: rgba(255, 255, 255, 0.15);
}
.modal-content {
background: rgba(28, 28, 30, 0.95);
backdrop-filter: blur(20px) saturate(180%);
border: 0.5px solid rgba(255, 255, 255, 0.1);
color: #ffffff;
border-radius: 12px;
}
.modal-header {
border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
padding: 20px;
}
.modal-title {
font-size: 17px;
font-weight: 600;
letter-spacing: -0.3px;
}
.modal-body {
padding: 20px;
}
.modal-footer {
border-top: 0.5px solid rgba(255, 255, 255, 0.1);
padding: 16px 20px;
}
.form-label {
color: rgba(255, 255, 255, 0.8);
font-size: 13px;
font-weight: 500;
margin-bottom: 8px;
}
.alert {
background: rgba(28, 28, 30, 0.8);
border: 0.5px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
color: #ffffff;
padding: 12px 16px;
font-size: 13px;
}
.btn-close-white {
filter: invert(1) grayscale(100%) brightness(200%);
}
.header-actions {
display: flex;
align-items: center;
gap: 12px;
}
.refresh-button {
width: 32px;
height: 32px;
border-radius: 6px;
border: none;
background: rgba(44, 44, 46, 0.8);
border: 0.5px solid rgba(255, 255, 255, 0.1);
color: #ffffff;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
padding: 0;
}
.refresh-button:hover {
background: rgba(44, 44, 46, 1);
}
.logout-button {
width: 32px;
height: 32px;
border-radius: 6px;
border: none;
background: rgba(255, 59, 48, 0.18);
border: 0.5px solid rgba(255, 255, 255, 0.12);
color: #ff453a;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
padding: 0;
}
.logout-button:hover {
background: rgba(255, 59, 48, 0.28);
border-color: rgba(255, 255, 255, 0.18);
}
.service-actions {
display: flex;
align-items: center;
gap: 8px;
margin-right: 20px;
}
.service-stats {
display: flex;
align-items: center;
gap: 16px;
margin-top: 12px;
padding-top: 12px;
border-top: 0.5px solid rgba(255, 255, 255, 0.1);
}
.stat-item {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: rgba(255, 255, 255, 0.6);
}
.stat-value {
color: rgba(255, 255, 255, 0.9);
font-weight: 500;
font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
}
.stat-label {
color: rgba(255, 255, 255, 0.5);
}
.stat-active {
color: #34c759 !important;
}
.stat-error {
transition: color 0.3s;
}
.main-dashboard {
display: flex;
flex-direction: column;
gap: 12px;
flex: 1;
min-height: 0;
}
.task-board {
display: flex;
gap: 14px;
height: 100%;
overflow-x: auto;
overflow-y: hidden;
padding-bottom: 8px;
}
.task-column {
background: rgba(28, 28, 30, 0.7);
border: 0.5px solid rgba(255, 255, 255, 0.08);
border-radius: 14px;
backdrop-filter: blur(18px) saturate(180%);
min-width: 360px;
flex: 0 0 360px;
display: flex;
flex-direction: column;
height: 100%;
max-height: 100%;
overflow: hidden;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
min-height: 0;
}
.task-column:hover {
border-color: rgba(255, 255, 255, 0.14);
background: rgba(28, 28, 30, 0.82);
}
.task-header {
padding: 16px;
border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
}
.task-title-wrap {
display: flex;
flex-direction: column;
gap: 8px;
}
.task-title-row {
display: flex;
align-items: center;
gap: 8px;
}
.task-title {
color: #ffffff;
font-size: 17px;
font-weight: 600;
letter-spacing: -0.3px;
}
.task-port {
color: rgba(255, 255, 255, 0.6);
font-size: 13px;
font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
}
.selected-team {
color: rgba(255, 255, 255, 0.7);
font-size: 13px;
line-height: 1.2;
}
.task-controls {
display: flex;
align-items: center;
gap: 10px;
}
.auto-switch-button {
width: 32px;
height: 32px;
border-radius: 8px;
border: 0.5px solid rgba(255, 255, 255, 0.12);
background: rgba(44, 44, 46, 0.8);
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s;
padding: 0;
}
.auto-switch-button:hover {
background: rgba(44, 44, 46, 1);
border-color: rgba(255, 255, 255, 0.18);
}
.auto-switch-button.active {
border-color: rgba(52, 199, 89, 0.6);
background: rgba(52, 199, 89, 0.16);
color: #34c759;
}
.open-button {
width: 32px;
height: 32px;
border-radius: 8px;
border: 0.5px solid rgba(255, 255, 255, 0.1);
background: rgba(44, 44, 46, 0.8);
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
cursor: pointer;
transition: all 0.2s;
}
.open-button:hover {
background: rgba(44, 44, 46, 1);
border-color: rgba(255, 255, 255, 0.15);
}
.task-stats {
display: flex;
align-items: center;
gap: 14px;
padding: 12px 16px;
border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
min-height: 56px;
}
.command-panel {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
padding: 10px 12px 16px;
}
.panel-title {
color: rgba(255, 255, 255, 0.7);
font-size: 13px;
font-weight: 600;
letter-spacing: -0.2px;
padding: 6px 4px;
}
.command-list {
display: flex;
flex-direction: column;
gap: 8px;
overflow-y: auto;
flex: 1;
min-height: 0;
padding: 4px;
}
.command-item {
width: 100%;
background: rgba(44, 44, 46, 0.7);
border: 0.5px solid rgba(255, 255, 255, 0.1);
border-radius: 11px;
color: #ffffff;
padding: 0px 10px 0px 0;
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
cursor: pointer;
transition: all 0.2s;
text-align: left;
position: relative;
}
.command-item:hover {
border-color: rgba(255, 255, 255, 0.18);
background: rgba(44, 44, 46, 0.9);
}
.command-item.primary-active {
border-color: rgba(52, 199, 89, 0.5);
background: rgba(52, 199, 89, 0.12);
}
.command-item.replica-active {
border-color: rgba(255, 255, 255, 0.35);
background: rgba(68, 68, 70, 0.78);
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.command-meta {
display: flex;
align-items: center;
gap: 8px;
flex: 1;
min-width: 0;
}
.command-name {
text-align: left;
}
.command-ip {
margin-left: 6px;
font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
font-size: 10.5px;
color: rgba(255, 255, 255, 0.32);
letter-spacing: -0.1px;
font-weight: 400;
user-select: all;
transition: color 0.15s;
}
.command-item:hover .command-ip {
color: rgba(255, 255, 255, 0.55);
}
.command-item.primary-active .command-ip,
.command-item.replica-active .command-ip {
color: rgba(255, 255, 255, 0.5);
}
.selected-team-ip {
margin-left: 6px;
font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
font-size: 11px;
color: rgba(255, 255, 255, 0.32);
font-weight: 400;
letter-spacing: -0.1px;
user-select: all;
}
.selected-team-tail {
color: rgba(255, 255, 255, 0.4);
font-size: 12px;
}
.command-left {
display: flex;
align-items: center;
gap: 10px;
flex-shrink: 0;
}
.primary-area {
width: 36px;
height: 36px;
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.18);
display: flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.04);
transition: all 0.2s;
}
.primary-area:hover {
border-color: rgba(255, 255, 255, 0.4);
background: rgba(255, 255, 255, 0.08);
}
.primary-toggle {
width: 16px;
height: 16px;
border-radius: 50%;
border: 1px solid rgba(255, 255, 255, 0.35);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: all 0.2s;
}
.primary-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: transparent;
transition: all 0.2s;
}
.command-item.primary-active .primary-toggle {
border-color: rgba(52, 199, 89, 0.9);
box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.15);
}
.command-item.primary-active .primary-area {
border-color: rgba(52, 199, 89, 0.7);
background: rgba(52, 199, 89, 0.12);
}
.command-item.primary-active .primary-dot {
background: #34c759;
}
.command-name {
font-size: 14px;
font-weight: 500;
}
.command-ip {
font-size: 12px;
color: rgba(255, 255, 255, 0.65);
font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
}
.flag-chip {
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 8px;
color: rgba(255, 255, 255, 0.85);
padding: 2px 6px;
font-size: 12px;
font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
line-height: 1.2;
margin-left: auto;
}
.sb-up {
color: #34c759;
}
.sb-corrupt {
color: #ffd60a;
}
.sb-mumble {
color: #ff9f0a;
}
.sb-down {
color: #ff453a;
}
.sb-fail {
color: #bf5af2;
}
.sb-off {
color: rgba(255, 255, 255, 0.85);
}
.strip {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 6px;
border-radius: 14px 14px 0 0;
background: rgba(255, 255, 255, 0.1);
pointer-events: none;
z-index: 2;
}
.strip.sb-up { background: #34c759; }
.strip.sb-corrupt { background: #ffd60a; }
.strip.sb-mumble { background: #ff9f0a; }
.strip.sb-down { background: #ff453a; }
.strip.sb-fail { background: #bf5af2; }
.strip.sb-off { background: rgba(255, 255, 255, 0.1); }
.custom-ip-row {
display: flex;
align-items: center;
gap: 10px;
padding: 0 16px 12px;
}
.custom-ip-row .input-modern {
flex: 1;
}
.board-scroll {
scrollbar-width: thin;
}
.board-scroll::-webkit-scrollbar {
height: 6px;
width: 6px;
}
.board-scroll::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.2);
border-radius: 10px;
}
/* Compatibility and small usability improvements. */
[hidden] { display: none !important; }
.header-row { gap: 10px; }
.login-row { min-height: 60vh; }
.login-heading { color: #fff; font-size: 22px; font-weight: 600; margin-bottom: 8px; letter-spacing: -.5px; }
.login-caption { color: rgba(255,255,255,.5); font-size: 13px; }
.login-password { text-align: center; }
.login-card { display: block; cursor: default; }
.login-panel { width: 100%; }
.task-column { position: relative; }
.task-title-button { border: 0; padding: 0; background: none; text-align: left; }
.task-title-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.legacy-modal { margin: auto; inset: 0; overflow-y: auto; overscroll-behavior: contain; color: #fff; background: transparent; border: 0; padding: 0; width: min(100% - 24px, 500px); max-height: calc(100dvh - 40px); }
.legacy-modal::backdrop { background: rgba(0,0,0,.5); }
.legacy-modal .modal-dialog { margin: 0; }
.cancel-button { background: rgba(44,44,46,.8); }
.form-error, .service-error { color: #ff453a; font-size: 12px; }
.form-error:empty, .service-error:empty { display: none; }
.service-error { padding: 0 16px; margin: 6px 0; }
.initial-stats { visibility: hidden; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, [role=button]:focus-visible { outline: 2px solid #0a84ff; outline-offset: 3px; }
.command-item { min-height: 38px; }
.command-item.stale-data .command-name, .flag-chip.stale-data { color: rgba(255,255,255,.5); }
.container { height: calc(100dvh - 8px); }
@media (max-width: 420px) { .container { max-width: 100vw; padding-left: 10px; padding-right: 10px; } .task-column { min-width: min(360px, calc(100vw - 20px)); flex-basis: min(360px, calc(100vw - 20px)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
.task-title-wrap, .task-title-row { min-width: 0; }
.task-title-button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-port { flex-shrink: 0; }
/* Preserve the legacy board; keep long labels and native dialogs predictable. */
:root { color-scheme: dark; }
.legacy-modal .modal-dialog { pointer-events: auto; }
.task-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
.task-title-wrap { display: contents; }
.task-title-row { grid-column: 1; grid-row: 1; align-self: center; }
.task-controls { grid-column: 2; grid-row: 1; }
.selected-team { grid-column: 1 / -1; grid-row: 2; }
.task-controls { flex-shrink: 0; }
.selected-team { display: flex; align-items: baseline; min-width: 0; white-space: nowrap; }
.selected-team-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.selected-team-ip { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.selected-team-tail { flex-shrink: 0; margin-left: 4px; }
.stat-value, .task-port, .flag-chip { font-variant-numeric: tabular-nums; }
.input-modern[type=number] { appearance: textfield; -moz-appearance: textfield; }
.input-modern::-webkit-inner-spin-button, .input-modern::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.input-modern[aria-invalid=true] { border-color: #ff453a; }
.input-modern:read-only { color: rgba(255,255,255,.55); }
.form-hint { color: rgba(255,255,255,.65); font-size: 12px; line-height: 1.5; }
.form-hint:empty { display: none; }
.help-body { font-size: 13px; line-height: 1.6; }
.help-body h6 { margin-top: 20px; }
.help-body pre { padding: 12px; border-radius: 8px; background: rgba(0,0,0,.25); color: #ddd; font-size: 12px; }
.header-actions { gap: 8px; flex-shrink: 0; }
@media (max-width: 420px) { .section-title { font-size: 19px; } .header-actions { gap: 5px; } }