← back to Melanie Project
public/style.css
480 lines
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1400px;
margin: 0 auto;
background: white;
border-radius: 20px;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
overflow: hidden;
}
header {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
color: white;
padding: 30px;
text-align: center;
}
header h1 {
font-size: 3em;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
.subtitle {
font-size: 1.2em;
opacity: 0.95;
}
.main-content {
padding: 30px;
}
.photo-section, .hairstyles-section, .visualization-section {
margin-bottom: 40px;
padding: 20px;
background: #f8f9fa;
border-radius: 10px;
}
h2 {
color: #333;
margin-bottom: 20px;
font-size: 1.8em;
}
.photo-controls {
display: flex;
gap: 10px;
flex-wrap: wrap;
margin-bottom: 20px;
}
input[type="file"] {
display: none;
}
.btn {
padding: 12px 24px;
border: none;
border-radius: 8px;
font-size: 16px;
cursor: pointer;
transition: all 0.3s ease;
font-weight: 600;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #5a6268;
}
#cameraContainer {
margin-top: 20px;
background: #000;
border-radius: 10px;
padding: 20px;
position: relative;
}
#cameraStream {
width: 100%;
max-width: 640px;
height: auto;
border-radius: 8px;
display: block;
margin: 0 auto;
-webkit-transform: scaleX(1); /* Fix for some browsers */
transform: scaleX(1);
}
/* Desktop-specific camera styles */
@media (min-width: 769px) {
#cameraStream {
min-height: 480px;
max-height: 720px;
object-fit: cover;
}
}
/* Mobile-specific camera styles */
@media (max-width: 768px) {
#cameraStream {
min-height: 360px;
object-fit: cover;
}
}
.camera-controls {
margin-top: 15px;
display: flex;
gap: 10px;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}
.photo-count {
color: white;
font-weight: 600;
margin: 0;
}
.photos-preview {
margin-top: 20px;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
}
.photo-slot {
background: white;
border-radius: 10px;
padding: 15px;
border: 2px dashed #ddd;
text-align: center;
transition: all 0.3s ease;
}
.photo-slot.filled {
border-color: #667eea;
border-style: solid;
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}
.photo-slot canvas {
max-width: 100%;
height: auto;
border-radius: 8px;
display: block;
margin: 0 auto 10px auto;
}
.photo-slot p {
color: #666;
font-weight: 600;
margin: 0;
}
.btn-danger {
background: #dc3545;
color: white;
}
.btn-danger:hover {
background: #c82333;
}
.loading {
text-align: center;
padding: 20px;
color: #667eea;
font-size: 1.2em;
}
.hairstyles-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
margin-top: 20px;
}
.hairstyle-card {
background: white;
border-radius: 12px;
padding: 20px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
transition: all 0.3s ease;
cursor: pointer;
border: 2px solid transparent;
}
.hairstyle-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 15px rgba(0,0,0,0.2);
border-color: #667eea;
}
.hairstyle-card.selected {
border-color: #f5576c;
background: #fff5f7;
}
.style-preview {
width: 100%;
height: 200px;
background: #f8f9fa;
border-radius: 8px;
margin-bottom: 15px;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
position: relative;
}
.preview-placeholder {
color: #999;
font-size: 0.9em;
text-align: center;
padding: 20px;
}
.preview-loading {
color: #667eea;
font-weight: 600;
animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.ai-overlay-text {
position: absolute;
bottom: 10px;
left: 10px;
right: 10px;
background: rgba(102, 126, 234, 0.9);
color: white;
padding: 8px;
border-radius: 6px;
font-size: 0.85em;
text-align: center;
}
.reference-label {
position: absolute;
top: 10px;
right: 10px;
background: rgba(245, 87, 108, 0.9);
color: white;
padding: 4px 8px;
border-radius: 4px;
font-size: 0.7em;
font-weight: 600;
}
.three-angle-preview {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
margin-bottom: 15px;
}
.angle-view {
position: relative;
height: 150px;
border-radius: 8px;
overflow: hidden;
border: 2px solid #e9ecef;
}
.angle-label {
position: absolute;
bottom: 5px;
left: 5px;
right: 5px;
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 3px;
border-radius: 3px;
font-size: 0.7em;
text-align: center;
font-weight: 600;
}
.your-preview {
margin-top: 15px;
padding: 15px;
background: #f8f9fa;
border-radius: 8px;
text-align: center;
}
.style-btn {
width: 100%;
padding: 15px;
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
color: white;
border: none;
border-radius: 8px;
font-size: 1em;
font-weight: 700;
cursor: pointer;
margin-top: 15px;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 1px;
}
.style-btn:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(245, 87, 108, 0.4);
}
.angle-view.styled {
border: 2px solid #f5576c;
box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}
.styled-label {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
font-weight: 700 !important;
padding: 5px !important;
}
.hairstyle-card h3 {
color: #f5576c;
margin-bottom: 8px;
font-size: 1.3em;
}
.celebrity-name {
color: #667eea;
font-weight: 600;
margin-bottom: 10px;
}
.features {
color: #555;
margin: 10px 0;
line-height: 1.6;
}
.styling-instructions {
color: #333;
margin: 10px 0;
line-height: 1.8;
padding: 15px;
background: #f8f9fa;
border-radius: 8px;
border-left: 4px solid #667eea;
font-size: 0.95em;
}
.styling-instructions strong {
color: #667eea;
display: block;
margin-bottom: 8px;
}
.extension-badge {
display: inline-block;
padding: 6px 12px;
background: #ffd700;
color: #333;
border-radius: 20px;
font-size: 0.85em;
font-weight: 600;
margin-top: 10px;
}
.extension-badge.no-extensions {
background: #e9ecef;
color: #6c757d;
}
.visualization-area {
position: relative;
max-width: 600px;
margin: 0 auto;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
#clientPhoto {
width: 100%;
display: block;
}
.style-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
}
.extension-info {
margin-top: 20px;
padding: 20px;
background: white;
border-radius: 12px;
border-left: 4px solid #ffd700;
}
.extension-info h3 {
color: #333;
margin-bottom: 15px;
}
.extension-links {
display: flex;
flex-direction: column;
gap: 10px;
}
.extension-link {
padding: 12px 20px;
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
color: white;
text-decoration: none;
border-radius: 8px;
text-align: center;
transition: all 0.3s ease;
font-weight: 600;
}
.extension-link:hover {
transform: translateX(5px);
box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}
@media (max-width: 768px) {
header h1 {
font-size: 2em;
}
.hairstyles-grid {
grid-template-columns: 1fr;
}
.photo-controls {
flex-direction: column;
}
.photos-preview {
grid-template-columns: 1fr;
}
}