H-Liu1997's picture
feat: initial FloodDiffusion streaming demo for HF Space
a4f8eb3
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f5f5f5; /* Light gray background */
min-height: 100vh;
padding: 20px;
color: #333;
}
.container {
max-width: 1400px;
margin: 0 auto;
background: #ffffff; /* Pure white container */
border-radius: 16px;
border: 1px solid #e0e0e0;
overflow: hidden;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.header {
background: #ffffff;
color: #000000; /* Black text */
padding: 30px;
text-align: center;
border-bottom: 1px solid #e0e0e0;
}
.header h1 {
font-size: 2.2em;
margin-bottom: 8px;
font-weight: 600;
letter-spacing: -0.5px;
}
.subtitle {
font-size: 1em;
opacity: 0.6;
font-weight: 400;
}
.controls {
padding: 25px 30px;
background: #fafafa; /* Very light gray */
border-bottom: 1px solid #e0e0e0;
}
.input-group {
margin-bottom: 15px;
}
.input-group label {
display: block;
font-weight: 500;
margin-bottom: 8px;
color: #666;
font-size: 0.95em;
letter-spacing: 0.3px;
}
.input-group input {
width: 100%;
padding: 12px 16px;
border: 1px solid #ddd;
border-radius: 8px;
font-size: 1em;
background: #ffffff;
color: #333;
transition: all 0.3s;
}
.input-group input:focus {
outline: none;
border-color: #999;
background: #fff;
}
.param-hint {
font-size: 0.75em;
color: #999;
font-style: italic;
}
/* Description box */
.description-box {
background: #f8f8f8;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 10px 14px;
margin-bottom: 12px;
font-size: 0.85em;
color: #666;
line-height: 1.5;
}
.description-box strong {
color: #333;
font-weight: 600;
}
.button-group {
display: flex;
gap: 10px;
margin-bottom: 15px;
flex-wrap: wrap;
}
.btn {
padding: 12px 24px;
border: 1px solid #ddd;
border-radius: 8px;
font-size: 0.95em;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
flex: 1;
min-width: 120px;
background: #ffffff;
color: #333;
}
.btn:hover:not(:disabled) {
background: #f5f5f5;
border-color: #999;
transform: translateY(-1px);
}
.btn:active:not(:disabled) {
transform: translateY(0);
}
.btn:disabled {
opacity: 0.3;
cursor: not-allowed;
}
.btn-primary {
background: #000; /* Black primary button */
color: #fff;
border-color: #000;
}
.btn-primary:hover:not(:disabled) {
background: #333;
border-color: #333;
}
.btn-secondary {
background: #666;
color: #fff;
border-color: #666;
}
.btn-danger {
background: #fff;
border-color: #ddd;
color: #d33;
}
.btn-danger:hover:not(:disabled) {
background: #fee;
border-color: #d33;
}
.btn-warning {
background: #fff;
border-color: #ddd;
color: #f90;
}
.btn-warning:hover:not(:disabled) {
background: #fff5e6;
border-color: #f90;
}
.btn-success {
background: #fff;
border-color: #ddd;
color: #0a0;
}
.btn-success:hover:not(:disabled) {
background: #e6ffe6;
border-color: #0a0;
}
.status-group {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: 12px;
background: #ffffff;
padding: 16px;
border-radius: 8px;
border: 1px solid #e0e0e0;
margin-bottom: 15px;
}
.status-item {
display: flex;
flex-direction: column;
gap: 5px;
}
.status-label {
font-size: 0.8em;
color: #999;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.8px;
}
.status-value {
font-size: 1.4em;
font-weight: 600;
color: #000;
font-variant-numeric: tabular-nums;
}
#canvas-container {
width: 100%;
height: 600px;
background: #ffffff; /* White background */
position: relative;
overflow: hidden;
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
}
#renderCanvas {
width: 100%;
height: 100%;
display: block;
}
.info {
padding: 20px 30px;
background: #fafafa;
border-top: 1px solid #e0e0e0;
}
.note {
padding: 12px 16px;
background: #fff;
border-left: 3px solid #666;
border-radius: 4px;
color: #666;
font-size: 0.9em;
margin: 0;
}
/* Responsive */
@media (max-width: 768px) {
.header h1 {
font-size: 1.8em;
}
.button-group {
flex-direction: column;
}
.btn {
width: 100%;
}
#canvas-container {
height: 400px;
}
}
/* Conflict Warning */
.conflict-warning {
background: #fff3cd;
border: 2px solid #ffc107;
border-radius: 8px;
padding: 20px;
margin-top: 20px;
text-align: center;
}
.conflict-warning p {
margin: 10px 0;
color: #856404;
}
.conflict-warning strong {
font-size: 1.1em;
}
.conflict-warning button {
margin: 10px 5px 0;
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 18px;
height: 18px;
border-radius: 50%;
background: #000;
cursor: pointer;
transition: all 0.2s;
}
input[type="range"]::-webkit-slider-thumb:hover {
transform: scale(1.2);
background: #333;
}
input[type="range"]::-moz-range-thumb {
width: 18px;
height: 18px;
border-radius: 50%;
background: #000;
cursor: pointer;
border: none;
transition: all 0.2s;
}
input[type="range"]::-moz-range-thumb:hover {
transform: scale(1.2);
background: #333;
}
/* Config Modal */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal-content {
background: #fff;
border-radius: 12px;
width: 90%;
max-width: 600px;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.modal-header {
padding: 20px 24px;
border-bottom: 1px solid #e0e0e0;
}
.modal-header h2 {
font-size: 1.3em;
font-weight: 600;
color: #333;
margin: 0;
}
.modal-body {
padding: 20px 24px;
}
.config-section {
margin-bottom: 20px;
}
.config-section:last-child {
margin-bottom: 0;
}
.config-section h3 {
font-size: 0.9em;
font-weight: 600;
color: #666;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 12px;
padding-bottom: 8px;
border-bottom: 1px solid #eee;
}
.config-field {
margin-bottom: 12px;
}
.config-field label {
display: block;
font-size: 0.85em;
font-weight: 500;
color: #666;
margin-bottom: 4px;
}
.config-field input[type="number"],
.config-field input[type="text"],
.config-field select {
width: 100%;
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 0.95em;
background: #fff;
color: #333;
}
.config-field input:focus,
.config-field select:focus {
outline: none;
border-color: #999;
}
.config-field .slider-container {
display: flex;
align-items: center;
gap: 10px;
}
.config-field .slider-container input[type="range"] {
flex: 1;
height: 6px;
border-radius: 3px;
background: #ddd;
outline: none;
-webkit-appearance: none;
}
.config-field .slider-value {
min-width: 50px;
font-weight: 600;
color: #000;
font-size: 0.95em;
}
.modal-footer {
padding: 16px 24px;
border-top: 1px solid #e0e0e0;
display: flex;
justify-content: flex-end;
gap: 10px;
}
.modal-footer .btn {
flex: 0;
min-width: 140px;
}