image-editor / styles.css
soiz1's picture
Update styles.css
291c76b verified
:root {
--primary-color: #4a6bff;
--secondary-color: #6c757d;
--dark-color: #343a40;
--light-color: #f8f9fa;
--border-color: #dee2e6;
--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Roboto', sans-serif;
line-height: 1.6;
color: #333;
background-color: #f5f7fa;
padding: 20px;
}
.container {
max-width: 1000px;
margin: 0 auto;
background: white;
border-radius: 8px;
box-shadow: var(--shadow);
padding: 25px;
overflow: hidden;
}
h1 {
color: var(--dark-color);
margin-bottom: 20px;
display: flex;
align-items: center;
gap: 10px;
}
h1 i {
color: var(--primary-color);
}
h3 {
margin: 15px 0 10px;
color: var(--dark-color);
display: flex;
align-items: center;
gap: 8px;
}
h3 i {
color: var(--primary-color);
font-size: 0.9em;
}
.upload-section {
margin-bottom: 25px;
text-align: center;
}
#image-upload {
display: none;
}
.upload-btn {
display: inline-block;
padding: 10px 20px;
background-color: var(--primary-color);
color: white;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
font-weight: 500;
}
.upload-btn:hover {
background-color: #3a56d4;
transform: translateY(-2px);
}
.upload-btn i {
margin-right: 8px;
}
.editor-container {
display: flex;
flex-direction: column;
gap: 30px;
}
.image-preview {
width: 100%;
border: 1px solid var(--border-color);
border-radius: 4px;
overflow: hidden;
background: #f0f0f0;
display: flex;
justify-content: center;
align-items: center;
min-height: 300px;
}
#image-canvas {
max-width: 100%;
max-height: 600px;
display: block;
}
.controls {
width: 100%;
padding: 15px;
background: var(--light-color);
border-radius: 4px;
border: 1px solid var(--border-color);
}
.control-group {
margin-bottom: 25px;
padding-bottom: 15px;
border-bottom: 1px solid var(--border-color);
}
.control-group:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}
.slider-control {
margin-bottom: 15px;
}
.slider-control label {
display: block;
margin-bottom: 5px;
font-weight: 500;
}
.slider-control input[type="range"] {
width: 100%;
height: 8px;
-webkit-appearance: none;
background: #ddd;
border-radius: 4px;
outline: none;
margin-bottom: 5px;
}
.slider-control input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 18px;
height: 18px;
background: var(--primary-color);
border-radius: 50%;
cursor: pointer;
}
.slider-control span {
display: inline-block;
width: 40px;
text-align: right;
font-weight: 500;
}
.curve-controls {
display: flex;
flex-wrap: wrap;
gap: 15px;
justify-content: space-between;
}
.curve-container {
flex: 1 1 45%;
min-width: 200px;
text-align: center;
margin-bottom: 15px;
}
.curve-container canvas {
border: 1px solid var(--border-color);
border-radius: 4px;
background: white;
margin-bottom: 5px;
width: 100%;
height: auto;
}
.curve-container label {
font-size: 0.9em;
color: var(--secondary-color);
display: block;
}
.action-buttons {
display: flex;
gap: 15px;
margin-top: 25px;
flex-wrap: wrap;
}
.btn {
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-weight: 500;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 8px;
}
.btn i {
font-size: 0.9em;
}
.btn.primary {
background-color: var(--primary-color);
color: white;
}
.btn.primary:hover {
background-color: #3a56d4;
}
.btn:not(.primary) {
background-color: var(--light-color);
color: var(--secondary-color);
border: 1px solid var(--border-color);
}
.btn:not(.primary):hover {
background-color: #e9ecef;
}
.loading-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: transparent; /* θƒŒζ™―γ‚’ι€ζ˜Žγ«ε€‰ζ›΄ */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 1000;
display: none;
}
.loading-spinner {
border: 5px solid #f3f3f3;
border-top: 5px solid var(--primary-color);
border-radius: 50%;
width: 50px;
height: 50px;
animation: spin 1s linear infinite;
margin-bottom: 15px;
box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* γ‚Ήγƒ”γƒŠγƒΌγ«ε½±γ‚’θΏ½εŠ  */
}
.loading-text {
color: var(--dark-color); /* γƒ†γ‚­γ‚Ήγƒˆθ‰²γ‚’γƒ€γƒΌγ‚―γ«ε€‰ζ›΄ */
font-size: 1.2em;
background-color: rgba(255,255,255,0.7); /* γƒ†γ‚­γ‚ΉγƒˆθƒŒζ™―γ‚’εŠι€ζ˜Žη™½γ« */
padding: 5px 10px;
border-radius: 4px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
#apply-btn {
background-color: #28a745;
}
#apply-btn:hover {
background-color: #218838;
}
#download-btn {
background-color: var(--secondary-color);
color: white;
}
#download-btn:hover {
background-color: #5a6268;
}
@media (max-width: 768px) {
.curve-container {
flex: 1 1 100%;
}
.action-buttons {
flex-direction: column;
}
.btn {
width: 100%;
justify-content: center;
}
}