/* --- Stiluri implicite (Dark mode) --- */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #272727;
    color: #fff;
    transition: background-color 0.3s ease, color 0.3s ease;
}
header {
    background: #1e1e1e;
    padding: 1rem;
    text-align: center;
    transition: background-color 0.3s ease;
}
form {
    text-align: center;
	align-content:center;
}
input[type="file"] {
    padding: 0.5rem;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}
button {
    background: #03dac5;
    border: none;
    padding: 0.7rem 1.5rem;
    color: #000;
    margin-left: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}
button:hover {
    background: #02c9b1;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 1rem;
}
.gallery img {
    max-width: 90vw;
    height: auto;
    object-fit: cover;
    aspect-ratio: attr(data-ratio);
    border-radius: 8px;
    transition: transform 0.3s ease;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.lightbox img {
    max-width: 90%;
    max-height: 80%;
}
.lightbox .close, .lightbox .nav, .lightbox .download {
    position: absolute;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}
.lightbox .download {
    position: absolute;
    bottom: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    text-decoration: none;
    border-radius: 50%;
    padding: 10px 14px;
    text-shadow: 0 0 15px #03dac5, 0 0 30px #03dac5, 0 0 45px white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rafineaza {
    position: absolute;
    bottom: 20px;
    left: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    text-decoration: none;
    border-radius: 50%;
    padding: 10px 14px;
    text-shadow: 0 0 15px #03dac5, 0 0 30px #03dac5, 0 0 45px white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.lightbox .download:hover {
    transform: scale(1.1);
}
.lightbox .close { top: 20px; right: 30px; }
.lightbox .nav.left { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .nav.right { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .download { bottom: 20px; right: 30px; }

/* Loader */
#loader-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(18, 18, 18, 0.95);
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#preview-image {
    max-width: 60vw;
    max-height: 60vh;
    border-radius: 12px;
    box-shadow: 0 0 20px #03dac5;
    animation: pulse 2s infinite ease-in-out;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}
#progress-bar-container {
    width: 80%;
    max-width: 400px;
    margin-top: 2rem;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    height: 24px;
}
#progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, #00e5ff, #03dac5);
    transition: width 0.3s linear;
}
#progress-text {
    position: absolute;
    right: 10px;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    color: white;
    font-size: 0.9em;
}
.loader-text {
    margin-top: 10px;
    color: #ccc;
}
#typing-text {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    font-family: monospace;
    border-right: 2px solid #ccc;
    animation: blink-caret 0.75s step-end infinite;
}
@keyframes blink-caret {
    0%, 100% { border-color: transparent; }
    50% { border-color: #ccc; }
}
.upload-label img {
    border: 2px solid #03dac5;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 0 10px rgba(3, 218, 197, 0.4);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.upload-label img:hover,
.upload-label img:focus {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(3, 218, 197, 0.7);
    outline: none;
}
.upload-label img:active {
    transform: scale(0.98);
    box-shadow: 0 0 8px rgba(3, 218, 197, 0.5);
}
#footer {
    display: flex;
    justify-content: space-evenly;
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #1e1e1e;
    text-align: center;
    padding: 10px;
    color: #ccc;
    font-size: 0.9em;
    z-index: 100;
    border-top: 1px solid #333;
}
#footer a {
    color: #03dac5;
    text-decoration: none;
}
#footer a:hover {
    text-decoration: underline;
}
#results-info {
    text-align: center;
    color: #fff;
    margin: 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: Arial, sans-serif;
}
#albums-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.4rem;
}
#albums-container button {
    border-radius: 8px;
}

/* --- Stiluri pentru Light Mode --- */
body.light-mode {
    background-color: #f8f8f8;
    color: #272727;
}
body.light-mode header {
    background-color: #ffffff;
    color: #272727;
}
body.light-mode input[type="file"] {
    background: #eee;
    color: #272727;
}
body.light-mode button {
    background: #03dac5;
    color: #272727;
}
body.light-mode button:hover {
    background: #02c9b1;
    color: #fff;
}
body.light-mode a,
body.light-mode #footer a {
    color: #03dac5;
}
body.light-mode #results-info {
    color: #272727;
}

/* Toggle button styles */
.theme-toggle-btn {
    background: none;
    border: 2px solid #03dac5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    color: #03dac5;
}

.theme-toggle-btn:hover {
    background-color: #03dac5;
    color: #272727;
}

.theme-toggle-btn .icon {
    width: 24px;
    height: 24px;
}

body.light-mode .theme-toggle-btn {
    color: #272727;
    border-color: #272727;
}

body.light-mode .theme-toggle-btn:hover {
    background-color: #272727;
    color: #03dac5;
}
#selfie-image{
    width: 50vw; 
    max-width:400px;
    cursor: pointer;
}
.color-blue{
	background-color:#2e86d1!important;
	color: white!important;
	
}

#form-place{
	display:flex;
	justify-content: center;
	gap: 20px;
	margin-top: 1rem;
	
}


#brand-logo img{
	max-width:40vw;
	max-height:350px;
}
.image-wrapper {
  position: relative;
  display: inline-block;
  overflow: hidden;
  background: #f0f0f0;
  /* optional predictable boxes: */
  width: 400px;             /* adjust to your layout */
  aspect-ratio: 4 / 3;      /* or set an explicit height */
}

/* important: keep it displayed; just make it transparent */
.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;                      /* instead of display:none */
  transition: opacity .25s ease;   /* nice fade-in */
}

/* your spinner can stay as is */
.spinner {
  width: 40px; height: 40px;
  border: 4px solid rgba(0,0,0,0.1);
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

