Image-comparison / style.css
Fahd-B's picture
Update style.css
88a625a verified
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
:root {
--primary-color: #007BFF;
--secondary-color: #F0F2F5;
--text-color: #333;
--light-text-color: #888;
--border-color: #E0E0E0;
--white-color: #FFF;
--error-color: #FF3B30;
--success-color: #34C759;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Poppins', sans-serif;
background-color: var(--secondary-color);
color: var(--text-color);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.container {
display: flex;
flex-direction: column;
width: 90vw;
max-width: 1200px;
min-width: 800px;
min-height: 80vh;
background-color: var(--white-color);
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.left-panel,
.right-panel {
padding: 40px;
display: flex;
flex-direction: column;
}
.left-panel {
width: 40%;
border-right: 1px solid var(--border-color);
}
.right-panel {
width: 60%;
background-color: #F7F9FC;
position: relative;
}
.header h1 {
font-size: 28px;
font-weight: 600;
}
.header p {
color: var(--light-text-color);
margin-top: 5px;
}
.info-section {
margin-top: 10px;
padding: 5px;
background-color: var(--secondary-color);
border-radius: 10px;
border: 1px solid var(--border-color);
}
.info-header {
display: flex;
align-items: center;
margin-bottom: 10px;
font-weight: 600;
color: var(--primary-color);
}
.info-header i {
margin-right: 8px;
font-size: 18px;
}
.info-content {
font-size: 14px;
color: var(--text-color);
}
.info-content p {
margin-bottom: 8px;
display: flex;
align-items: flex-start;
}
.info-content i {
margin-right: 8px;
margin-top: 3px;
font-size: 14px;
color: var(--primary-color);
}
.upload-label {
margin-top: 20px;
border: 2px dashed var(--border-color);
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 150px;
cursor: pointer;
transition: all 0.3s;
position: relative;
text-align: center;
}
.image-display-area {
width: 100%;
flex-grow: 1;
display: flex;
gap: 20px;
justify-content: center;
align-items: center;
}
.image-preview {
width: calc(50% - 10px);
height: 100%;
border-radius: 10px;
display: flex;
justify-content: center;
align-items: center;
position: relative;
transition: all 0.3s;
overflow: hidden;
}
.upload-label.highlight,
.image-preview.highlight {
border-color: var(--primary-color);
background-color: #f0f8ff;
}
.image-preview img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
border-radius: 8px;
}
.upload-label i {
font-size: 32px;
color: var(--primary-color);
}
.upload-label span {
margin-top: 12px;
color: var(--light-text-color);
}
.upload-label small {
margin-top: 10px;
font-size: 12px;
opacity: 0.8;
}
.results-section {
margin-top: 20px;
flex-grow: 1;
display: flex;
flex-direction: column;
}
.results-section h2 {
font-size: 20px;
margin-bottom: 15px;
}
#results-container {
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
overflow-y: auto;
}
.comparison-result {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.panels-wrapper {
display: flex;
flex-grow: 1;
}
.meter-label {
font-weight: 600;
margin-bottom: 8px;
font-size: 16px;
}
.meter-container {
width: 90%;
height: 20px;
background-color: var(--secondary-color);
border-radius: 10px;
overflow: hidden;
}
.meter-bar {
height: 100%;
background-color: var(--success-color);
border-radius: 10px;
transition: width 0.5s ease-in-out;
}
.meter-description {
margin-top: 10px;
color: var(--light-text-color);
text-align: center;
}
.graph-container {
padding: 15px;
border-radius: 10px;
background-color: var(--white-color);
width: 100%;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.graph-title {
font-size: 16px;
font-weight: 600;
margin-bottom: 10px;
text-align: center;
}
.clear-section {
width: 100%;
display: flex;
justify-content: center;
margin-top: auto;
padding-top: 20px;
}
#clear-btn {
background-color: var(--error-color);
color: var(--white-color);
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 16px;
display: flex;
justify-content: center;
align-items: center;
transition: background-color 0.3s;
padding: 12px 20px;
width: 100%;
}
#clear-btn:hover {
background-color: #d93025;
}
#clear-btn i {
margin-right: 8px;
}
#status-indicator {
display: flex;
align-items: center;
justify-content: center;
height: 30px;
margin-top: 20px;
}
.spinner {
border: 3px solid #f3f3f3;
border-top: 3px solid var(--primary-color);
border-radius: 50%;
width: 20px;
height: 20px;
animation: spin 1s linear infinite;
display: none;
}
#status-text {
margin-left: 10px;
color: var(--light-text-color);
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.placeholder {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
text-align: center;
color: var(--light-text-color);
}
.placeholder i {
font-size: 50px;
color: var(--border-color);
}
.placeholder h2 {
margin-top: 20px;
font-size: 20px;
font-weight: 600;
color: var(--text-color);
}
.placeholder p {
margin-top: 10px;
font-size: 16px;
}
.error {
color: var(--error-color);
}
#meter-container {
padding: 10px 0;
display: flex;
justify-content: center;
}
.action-buttons {
text-align: center;
padding: 15px 0;
}
#show-graph-btn {
background-color: var(--primary-color);
color: var(--white-color);
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 15px;
padding: 10px 20px;
transition: background-color 0.3s;
}
#show-graph-btn:hover {
background-color: #0056b3;
}
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.5);
animation: fadeIn 0.3s;
}
.modal-content {
background-color: #fefefe;
margin: 5% auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
max-width: 900px;
border-radius: 10px;
position: relative;
}
.close-button {
color: #aaa;
position: absolute;
top: 10px;
right: 20px;
font-size: 28px;
font-weight: bold;
cursor: pointer;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.back-link-section {
position: absolute;
top: 20px;
right: 40px;
}
.back-link {
display: flex;
align-items: center;
text-decoration: none;
color: var(--primary-color);
font-weight: 600;
font-size: 15px;
transition: color 0.3s;
}
.back-link:hover {
color: #0056b3;
}
.back-link i {
margin-right: 8px;
}