body {
    font-family: Arial, sans-serif;
    text-align: center;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#preloader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #6a11cb; 
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loaded #preloader {
    opacity: 0;
    visibility: hidden;
}
.container {
    width: 50%;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
    color: #333;
}

label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

select, input, button {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: none;
    font-size: 16px;
    transition: 0.3s;
}

select, input {
    border: 1px solid #ccc;
}

button {
    background-color: #28a745;
    color: white;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
}

button:hover {
    background-color: #218838;
    transform: scale(1.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

#pageSelection, #languageSelection, #inputFields, #resultSection {
    display: none;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.modal.show {
    opacity: 1;
    visibility: visible;
    animation: fadeIn 0.4s ease-in-out;
}

.modal.hide {
    animation: fadeOut 0.4s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 50%;
    text-align: left;
    color: black;
}

#closeModalBtn {
    width: 100%;
    background-color: red;
}

.info-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    color: #333;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
    opacity: 0;
    animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }


.info-button:hover {
    background: #ddd;
}

.info-popup {
    text-align: center;
    position: absolute;
    top: 50px;
    right: 20px;
    background: white;
    color: black;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    display: none;
    width: 250px;
    text-align: left;
}

.info-popup.show {
    display: block;
}

.powered {
    font-size: 12px;
    color: #777;
    margin-top: 10px;
    text-align: center;
}

.modal-footer {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: gray;
    font-weight: bold;
}
.powered-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

#photoField,
label[for="photoInput"] {
  transition: opacity 0.5s ease;
}
#defaultPhotoBtn{
  background:#ffffff;
  color:#28a745;
  border:2px solid #28a745;
  border-radius:6px;
  padding:8px 16px;
  cursor:pointer;
  transition:.25s;
}

#defaultPhotoBtn.active{
  background:#1e7e34;   
  color:#fff;
  border-color:#1e7e34;
}

#defaultPhotoBtn.active::after{
  content:" ✓";
  font-weight:bold;
  font-size:16px;
  margin-left:6px;
}


.upload-wrapper{
  margin: 12px 0;                
  display: flex;
  align-items: center;
  gap: 10px;                     
}

#photoInput{
  display: none;
}

.upload-btn{
  background:#ffffff;
  color:#007bff;
  border:2px dashed #007bff;
  border-radius:6px;
  padding:8px 16px;
  font-size:14px;
  cursor:pointer;
  transition: all .25s ease;
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.upload-btn:hover{
  background:#007bff;
  color:#fff;
}

.upload-btn:active{
  transform:scale(0.97);
}

.upload-icon{
  font-size:16px;                
}

.file-name{
  font-size:14px;
  color:#333;
  font-style:italic;
  max-width:220px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.drop-zone{
  flex:1;
  min-height:60px;
  border:2px dashed #999;
  border-radius:6px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  color:#666;
  transition:background .25s,border-color .25s;
}

.drop-zone.dragover{
  background:#e9ffe3;
  border-color:#28a745;
  color:#28a745;
}
