Spaces:
Running
Running
body { | |
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
min-height: 100vh; | |
background-color: #f0f2f5; | |
margin: 0; | |
padding: 20px; | |
box-sizing: border-box; | |
} | |
.page-header { | |
text-align: center; | |
margin-bottom: 25px; | |
color: #333; | |
width: 100%; | |
max-width: 860px; /* Match main content max-width */ | |
} | |
.page-header h1 { | |
font-size: 2.2em; | |
margin-bottom: 8px; | |
color: #2c3e50; | |
} | |
.page-header p { | |
font-size: 1.1em; | |
color: #555; | |
line-height: 1.6; | |
} | |
.main-content-wrapper { | |
display: flex; | |
flex-direction: row; | |
gap: 25px; | |
width: 100%; | |
max-width: 860px; /* Adjusted max-width */ | |
align-items: flex-start; | |
} | |
.aroma-info-panel { | |
flex-basis: 280px; /* Increased width for perfume details */ | |
flex-shrink: 0; | |
background-color: #ffffff; | |
padding: 20px; | |
border-radius: 8px; | |
box-shadow: 0 2px 8px rgba(0,0,0,0.08); | |
} | |
.perfume-details { | |
text-align: center; | |
margin-bottom: 20px; | |
padding-bottom: 15px; | |
border-bottom: 1px solid #e0e0e0; | |
} | |
.perfume-details h2 { | |
font-size: 1.6em; | |
color: #34495e; | |
margin-top: 0; | |
margin-bottom: 5px; | |
} | |
.perfume-details p { | |
font-size: 1em; | |
color: #666; | |
font-style: italic; | |
margin-top: 0; | |
} | |
.aroma-legend h3 { /* Changed from h2 */ | |
font-size: 1.2em; /* Adjusted size */ | |
color: #34495e; | |
margin-top: 0; | |
margin-bottom: 15px; | |
text-align: center; | |
} | |
.aroma-legend table { | |
width: 100%; | |
border-collapse: collapse; | |
} | |
.aroma-legend th, .aroma-legend td { | |
text-align: left; | |
padding: 8px 5px; | |
font-size: 0.9em; /* Slightly smaller for compactness */ | |
border-bottom: 1px solid #f0f0f0; | |
vertical-align: middle; | |
} | |
.aroma-legend th { | |
color: #555; | |
font-weight: 600; | |
} | |
.aroma-legend tr:last-child td { | |
border-bottom: none; | |
} | |
.aroma-legend td:nth-child(1), .aroma-legend th:nth-child(1) { /* # column */ | |
text-align: center; | |
width: 20px; | |
} | |
.aroma-legend td:nth-child(4), .aroma-legend th:nth-child(4) { /* Dose column */ | |
text-align: right; | |
width: 40px; | |
font-weight: bold; | |
} | |
.color-swatch { | |
display: inline-block; | |
width: 16px; /* Adjusted size */ | |
height: 16px; | |
border-radius: 3px; | |
border: 1px solid #ccc; | |
margin-right: 6px; | |
vertical-align: middle; | |
} | |
.app-area { | |
flex-grow: 1; | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
min-width: 0; /* Important for flex item to shrink properly */ | |
} | |
/* Image Upload Section */ | |
.image-upload-section { | |
background-color: #fff; | |
padding: 20px; | |
border-radius: 8px; | |
box-shadow: 0 2px 8px rgba(0,0,0,0.08); | |
text-align: center; | |
margin-bottom: 20px; | |
width: 100%; | |
max-width: 400px; /* Match dispenser width */ | |
} | |
.image-upload-label { | |
display: block; | |
width: 100%; | |
height: 200px; /* Adjust as needed */ | |
border: 2px dashed #ccc; | |
border-radius: 6px; | |
cursor: pointer; | |
margin-bottom: 15px; | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
justify-content: center; | |
background-color: #f9f9f9; | |
overflow: hidden; /* To contain the image */ | |
} | |
.image-upload-label:hover { | |
border-color: #999; | |
} | |
.image-upload-label img { | |
max-width: 100%; | |
max-height: 100%; | |
object-fit: contain; /* Changed from cover to contain for placeholder */ | |
} | |
.image-upload-label span { | |
margin-top: 10px; | |
color: #777; | |
font-size: 0.9em; | |
} | |
.image-upload-section button { | |
padding: 10px 20px; | |
font-size: 1em; | |
background-color: #5cb85c; | |
color: white; | |
border: none; | |
border-radius: 5px; | |
cursor: pointer; | |
transition: background-color 0.2s; | |
} | |
.image-upload-section button:hover { | |
background-color: #4cae4c; | |
} | |
.image-upload-section button:disabled { | |
background-color: #ccc; | |
cursor: not-allowed; | |
} | |
#loadingIndicator { | |
margin-top: 10px; | |
color: #337ab7; | |
} | |
.error-message { | |
color: red; | |
font-size: 0.9em; | |
margin-top: 10px; | |
} | |
.dispenser-area { | |
position: relative; | |
width: 100%; /* Make it responsive within its container */ | |
max-width: 400px; /* Max size of the dispenser visuals */ | |
aspect-ratio: 400 / 450; /* Maintain aspect ratio */ | |
height: auto; /* Let aspect-ratio define height */ | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
justify-content: flex-start; /* Aligns drum to top */ | |
margin-bottom: 20px; | |
border: 2px solid #b0b0b0; | |
padding: 5%; /* Use percentage padding */ | |
background-color: #fdfdfd; | |
border-radius: 10px; | |
box-shadow: 0 5px 15px rgba(0,0,0,0.1); | |
box-sizing: border-box; | |
} | |
.motor-base { | |
width: 15%; /* Relative width */ | |
height: 7.5%; /* Relative height */ | |
background-color: #6c757d; | |
border-radius: 5px; | |
position: absolute; | |
/* Position relative to drum */ | |
top: calc(7.5% + 31.25% - 3.75%); /* drum.marginTop + drum.height/2 - motor.height/2 */ | |
left: 50%; | |
transform: translateX(-50%); | |
box-shadow: 0 2px 4px rgba(0,0,0,0.2); | |
z-index: 1; | |
} | |
.drum { | |
width: 62.5%; /* 250px / 400px */ | |
height: 62.5%; /* 250px / 400px */ | |
background-image: radial-gradient(circle, #e0e0e0, #c0c0c0 60%, #a0a0a0); | |
border-radius: 50%; | |
position: relative; | |
margin-top: 7.5%; /* 30px / 400px */ | |
border: 1%; /* 4px / 400px */ | |
border-style: solid; | |
border-color: #555; | |
box-shadow: 0 1% 3% rgba(0,0,0,0.25), inset 0 0 4.5% rgba(0,0,0,0.1); | |
transition: transform 0.7s ease-in-out; | |
transform-style: preserve-3d; | |
z-index: 2; | |
box-sizing: border-box; | |
} | |
.drum::before { | |
content: ''; | |
position: absolute; | |
width: 14%; /* 35px / 250px drum width */ | |
height: 14%; | |
background-color: #4a4a4a; | |
border-radius: 50%; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
border: 1.2%; /* 3px / 250px */ | |
border-style: solid; | |
border-color: #333; | |
box-shadow: inset 0 0 3.2% rgba(0,0,0,0.6); | |
z-index: 3; | |
} | |
.bottle-slot { | |
position: absolute; | |
width: 9.6%; /* 24px / 250px drum width */ | |
height: 50%; /* Drum radius */ | |
left: calc(50% - 4.8%); /* 50% - (width/2) */ | |
top: 50%; | |
transform-origin: center top; | |
z-index: 4; | |
} | |
.base-aroma-bottle { | |
width: 100%; /* Full width of slot */ | |
height: 36%; /* 45px / 125px slot height */ | |
border: 0.8%; /* 1px / 125px slot height */ | |
border-style: solid; | |
border-color: #4a2d0a; | |
border-radius: 5px 5px 3px 3px; /* Keep somewhat fixed for shape */ | |
position: absolute; | |
bottom: -4%; /* -5px / 125px */ | |
left: 0; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
font-size: 0.7em; /* Make font responsive */ | |
font-weight: bold; | |
color: white; | |
text-shadow: 1px 1px 1px rgba(0,0,0,0.9); | |
box-shadow: 1px 2px 5px rgba(0,0,0,0.3); | |
cursor: default; | |
box-sizing: border-box; | |
} | |
.base-aroma-bottle::before { | |
content: ''; | |
position: absolute; | |
top: -15.5%; /* -7px / 45px bottle height */ | |
left: 50%; | |
transform: translateX(-50%); | |
width: 66.6%; /* 16px / 24px bottle width */ | |
height: 15.5%; /* 7px / 45px bottle height */ | |
background-color: #282828; | |
border-radius: 3px 3px 0 0; | |
border: 0.4%; /* 1px / 250px drum width (approx for small elements) */ | |
border-style: solid; | |
border-color: #111; | |
} | |
.perfume-flask { | |
width: 13.75%; /* 55px / 400px */ | |
height: 20%; /* 90px / 450px */ | |
background-color: rgba(200, 225, 255, 0.75); | |
border: 0.5%; /* 2px / 400px */ | |
border-style: solid; | |
border-color: #adcdea; | |
border-radius: 6px 6px 25px 25px; | |
position: absolute; | |
bottom: 5.5%; /* 25px / 450px */ | |
left: 50%; | |
transform: translateX(-50%); | |
box-shadow: 0 0.8% 1.6% rgba(0,0,0,0.1); | |
z-index: 3; | |
box-sizing: border-box; | |
} | |
.perfume-flask::before { | |
content: ''; | |
position: absolute; | |
top: -20%; /* -18px / 90px flask height */ | |
left: 50%; | |
transform: translateX(-50%); | |
width: 40%; /* 22px / 55px flask width */ | |
height: 20%; /* 18px / 90px flask height */ | |
background-color: rgba(200, 225, 255, 0.75); | |
border: 0.5%; /* 2px / 400px */ | |
border-style: solid; | |
border-color: #adcdea; | |
border-top-left-radius: 4px; | |
border-top-right-radius: 4px; | |
border-bottom: none; | |
} | |
.perfume-liquid { | |
width: 100%; | |
height: 0%; | |
position: absolute; | |
bottom: 0; | |
border-radius: 0 0 23px 23px; | |
transition: height 0.5s ease-out, background-color 0.5s ease; | |
} | |
.dispensing-stream { | |
position: absolute; | |
width: 0.75%; /* 3px / 400px */ | |
height: 0px; | |
left: 50%; | |
transform: translateX(-50%); | |
transition: height 0.25s ease-out; | |
z-index: 1; /* Behind drum */ | |
border-radius: 2px; | |
} | |
.controls { | |
display: flex; /* Will be shown by JS */ | |
flex-direction: column; | |
align-items: center; | |
gap: 12px; | |
padding: 20px; | |
background-color: #ffffff; | |
border-radius: 8px; | |
box-shadow: 0 4px 10px rgba(0,0,0,0.1); | |
width: 100%; | |
max-width: 400px; /* Match dispenser max width */ | |
margin-top: 10px; /* Space from dispenser if it's visible */ | |
} | |
.control-group { | |
display: flex; | |
align-items: center; | |
gap: 10px; | |
width: 100%; | |
justify-content: space-between; | |
} | |
.control-group label, .control-group > span:not(#aromaNumberDisplay):not(#doseDisplay) { | |
flex-shrink: 0; | |
} | |
#doseSlider { | |
flex-grow: 1; | |
} | |
.controls button { | |
padding: 10px 18px; | |
font-size: 1em; | |
font-weight: 500; | |
cursor: pointer; | |
border: 1px solid #ced4da; | |
background-color: #f8f9fa; | |
color: #343a40; | |
border-radius: 5px; | |
transition: background-color 0.2s, box-shadow 0.2s; | |
} | |
.controls button:hover { | |
background-color: #e9ecef; | |
border-color: #adb5bd; | |
} | |
.controls button:active { | |
background-color: #dee2e6; | |
box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); | |
} | |
.controls button:disabled { | |
background-color: #e9ecef; | |
color: #6c757d; | |
cursor: not-allowed; | |
} | |
.display { /* This is for the animation controls display */ | |
padding: 10px 15px; | |
background-color: #343a40; | |
color: #90ee90; | |
border-radius: 4px; | |
width: calc(100% - 30px); /* Full width minus padding */ | |
text-align: center; | |
font-family: 'Consolas', 'Courier New', monospace; | |
font-size: 1em; | |
border: 1px solid #495057; | |
margin-bottom: 5px; | |
} | |
/* Adaptive Design */ | |
@media (max-width: 880px) { /* Slightly wider than main content for smoother transition */ | |
.main-content-wrapper { | |
flex-direction: column; | |
align-items: center; /* Center items when stacked */ | |
gap: 20px; | |
} | |
.aroma-info-panel { | |
flex-basis: auto; /* Allow it to take full width */ | |
width: 100%; | |
max-width: 450px; /* Limit width when stacked */ | |
} | |
.app-area { | |
width: 100%; | |
align-items: center; /* Ensure app area children are centered */ | |
} | |
.image-upload-section, .dispenser-area, .controls { | |
max-width: 450px; /* Allow them to be a bit wider if info panel is full width */ | |
} | |
} | |
@media (max-width: 480px) { | |
.page-header h1 { | |
font-size: 1.8em; | |
} | |
.page-header p { | |
font-size: 1em; | |
} | |
.aroma-info-panel, .image-upload-section, .dispenser-area, .controls { | |
padding: 15px; | |
} | |
.controls button, .display, .image-upload-section button { | |
font-size: 0.9em; | |
} | |
.aroma-legend th, .aroma-legend td { | |
font-size: 0.85em; | |
padding: 6px 3px; | |
} | |
.base-aroma-bottle { | |
font-size: 0.6em; /* Further reduce for very small screens */ | |
} | |
} |