Files
2024-11-29 10:44:14 +08:00

343 lines
6.3 KiB
CSS

body {
font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background-color: #f8f9fa;
color: #212529;
}
h1 {
text-align: center;
margin-bottom: 2rem;
}
.container {
background-color: white;
padding: 2rem;
border-radius: 12px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.disk-track {
position: relative;
width: 100%;
height: 120px;
background: linear-gradient(to right, #e9ecef, #dee2e6);
border-radius: 8px;
margin: 2rem 0;
padding: 1rem 0;
}
.track-scale {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 24px;
display: flex;
justify-content: space-between;
padding: 0 20px;
color: #666;
font-size: 0.8rem;
}
.head {
position: absolute;
width: 20px;
height: 60px;
background: linear-gradient(45deg, #ff4d4d, #ff6b6b);
border-radius: 6px;
top: 25px;
transform: translateX(-50%);
transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 2px 8px rgba(255, 77, 77, 0.3);
}
.request {
position: absolute;
width: 12px;
height: 12px;
background-color: #339af0;
border-radius: 50%;
top: 49px;
transform: translateX(-50%);
transition: background-color 0.3s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.served {
background-color: #51cf66;
transform: translateX(-50%) scale(1.2);
}
.controls {
background-color: #f8f9fa;
padding: 1.5rem;
border-radius: 8px;
border: 1px solid #dee2e6;
}
.input-row {
display: grid;
grid-template-columns: auto 1fr auto 1fr;
gap: 1rem;
margin-bottom: 1rem;
align-items: center;
}
.buttons-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: 12px;
align-items: center;
}
button {
padding: 10px 20px;
background: linear-gradient(45deg, #339af0, #228be6);
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-weight: 500;
transition: transform 0.2s, box-shadow 0.2s;
}
button:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
button.active {
background: linear-gradient(45deg, #40c057, #37b24d);
box-shadow: 0 4px 12px rgba(55, 178, 77, 0.2);
}
button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(34, 139, 230, 0.2);
}
input,
select {
padding: 8px 12px;
border: 1px solid #dee2e6;
border-radius: 6px;
font-size: 14px;
transition: border-color 0.2s;
}
input:focus,
select:focus {
outline: none;
border-color: #339af0;
box-shadow: 0 0 0 3px rgba(51, 154, 240, 0.1);
}
#stats {
margin-top: 1.5rem;
padding: 1.5rem;
background-color: #f8f9fa;
border-radius: 8px;
border: 1px solid #dee2e6;
}
.stat-item {
display: flex;
justify-content: space-between;
margin-bottom: 0.5rem;
}
.stat-value {
font-weight: 600;
color: #339af0;
}
@keyframes pulse {
0% {
transform: translateX(-50%) scale(1);
}
50% {
transform: translateX(-50%) scale(1.3);
}
100% {
transform: translateX(-50%) scale(1.2);
}
}
.copyright {
margin-top: 20px;
text-align: center;
color: #666;
font-size: 0.9em;
}
.copyright a {
color: #339af0;
text-decoration: none;
transition: color 0.2s;
}
.copyright a:hover {
color: #228be6;
text-decoration: underline;
}
.algorithm-comparison {
margin-top: 2rem;
background-color: #f8f9fa;
border-radius: 8px;
border: 1px solid #dee2e6;
}
.algorithm-comparison summary {
padding: 1rem 1.5rem;
cursor: pointer;
font-weight: 500;
color: #339af0;
user-select: none;
}
.algorithm-comparison summary:hover {
background-color: #e9ecef;
}
.comparison-content {
padding: 1.5rem;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
}
.algorithm-card {
background-color: white;
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.algorithm-card h3,
.seek-time-comparison h3 {
color: #339af0;
margin-top: 0;
margin-bottom: 1rem;
font-size: 1.25rem;
}
.algorithm-card ul {
margin: 0;
padding-left: 1.2rem;
}
.algorithm-card li {
margin-bottom: 0.5rem;
color: #495057;
line-height: 1.5;
}
.algorithm-card li:last-child {
margin-bottom: 0;
}
.seek-time-comparison {
margin-top: 2rem;
background-color: #f8f9fa;
padding: 1.5rem;
border-radius: 8px;
border: 1px solid #dee2e6;
}
.seek-time-comparison h3 {
color: #339af0;
margin-top: 0;
margin-bottom: 1rem;
}
#comparisonTable {
width: 100%;
border-collapse: collapse;
background-color: white;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
border-radius: 8px;
overflow: hidden;
}
#comparisonTable th,
#comparisonTable td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #dee2e6;
}
#comparisonTable th {
background-color: #e9ecef;
font-weight: 600;
color: #495057;
}
#comparisonTable tr:last-child td {
border-bottom: none;
}
#comparisonTable td:nth-child(2) {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
color: #339af0;
font-weight: 600;
}
#comparisonTable td:nth-child(3) {
font-size: 0.9em;
color: #666;
max-width: 300px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@media (max-width: 768px) {
.seek-time-comparison {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
#comparisonTable {
min-width: 600px;
}
.input-row {
grid-template-columns: auto 1fr;
}
}
.comparison-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
.comparison-header h3 {
margin: 0;
}
.comparison-footer {
display: flex;
justify-content: flex-end;
margin-top: 1rem;
}
.reset-table-btn {
background: linear-gradient(45deg, #868e96, #495057);
padding: 8px 16px;
font-size: 0.9em;
}
.reset-table-btn:hover {
background: linear-gradient(45deg, #495057, #343a40);
}