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); }
}

.hidden {
  display: none !important;
}

.btn-cookie-back {
  background-color: aquamarine;
}
.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;
}

/* navigation */
.main-nav{
  margin-top:10px;
  display:flex;
  gap:16px;
  justify-content:center;
}
.main-nav .tab{
  background:none;
  border:none;
  color:#333;
  font-weight:bold;
  padding:6px 12px;
  cursor:pointer;
  border-bottom:2px solid transparent;
  transition:.2s;
}
.main-nav .tab.active{
  border-color:#28a745;
  color:#28a745;
}
.nav-section {
  padding: 40px 16px;
}
.nav-section.active{display:block;}


.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.popup-overlay.hidden {
  display: none;
}

.popup {
  background: #ffffff;
  color: #000000;
  padding: 24px;
  border-radius: 8px;
  max-width: 450px;
  width: 90%;
}

.popup-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.popup-content input,
.popup-content textarea {
  padding: 8px;
  background: #000000;
  color: #fff;
  border: none;
  border-radius: 4px;
  width: 96%;
  resize: none;
}

.popup-content button {
  padding: 8px;
  border-radius: 4px;
  border: none;
  background: #1a73e8;
  color: #fff;
  cursor: pointer;
}

.popup-content button:hover {
  background: #1660c1;
}

.hidden {
  display: none;
}


.tw-container { max-width: 540px; margin: 32px auto; background: #fff; padding: 28px 32px 24px 32px; border-radius: 20px; box-shadow: 0 8px 32px #0002; }
.tw-container h2 { color: #1f9cff; margin-bottom: 14px; }
.tw-row { display: flex; gap: 9px; align-items: center; margin-bottom: 8px; }
.or { color: #bbb; font-size: 0.96em; }
.tw-btn { padding: 13px 0; font-size: 1.14em; width: 100%; margin: 10px 0 0 0; border-radius: 9px; border: none; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.tw-btn-success { background: linear-gradient(90deg,#20dd76,#1faaff); color: #fff; }
.tw-btn-success:active { background: linear-gradient(90deg,#158156,#136dd2); }
.tw-btn-clear { background: #ddd; color: #444; margin-top:7px; }
.tw-btn-clear:active { background: #bbb; }
#pwText { width: 100%; min-height: 64px; font-size: 1.1em; border-radius: 9px; border: 1px solid #bbe; margin-bottom: 7px; padding: 7px 10px;}
#result { margin-top: 22px; padding: 15px 15px 10px 15px; border-radius: 13px; background: #f8fff8; font-size: 1.17em; min-height: 24px; }
.tw-hint {margin-top:20px; font-size:0.96em; color:#aaa;}
.tw-seedbox { background: #e7fff7; border-radius: 7px; padding: 9px 12px; margin: 6px 0 4px 0; font-size: 1.13em; color: #11a077; word-break: break-all; }
.tw-ok {color:#15c067; font-size:1.3em;}
.tw-err {color:#e23c45; font-size:1.3em;}


#copy11Btn {
  margin-top: 9px;
  padding: 10px 18px;
  font-size: 1.07em;
  border: none;
  border-radius: 7px;
  background: linear-gradient(90deg,#ffe486,#63f79b 80%);
  color: #185932;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 1.5px 7px #b3ffd7a0;
  transition: background 0.18s, color 0.15s, box-shadow 0.17s;
  outline: none;
}
#copy11Btn:active {
  background: linear-gradient(90deg,#ffe486 60%,#63f79b 100%);
  color: #108c2c;
  box-shadow: 0 0.7px 3px #9beebc80;
}
#copy11Btn.copied {
  background: #d8ffe5;
  color: #199a49;
  box-shadow: none;
}

:root{
  --accent:   #7aa2ff;
  --accent2:  #9be7ff;
  --danger:   #ff5f7a;
  --success:  #44d27b;
  --bg:#f6f7fb;
  --card:#fff;
  --text:#222;
  --muted:#7a7a85;
  --ring:#dfe3f0;
  --green:#1ad28f;
  --blue:#1899ff;
  --copy1:#f9f871;
  --copy2:#92f6a1;
}

#mmv.wrap{
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1300px 900px at 10% -10%, rgba(122,162,255,0.12), transparent 60%),
              radial-gradient(1200px 600px at 90% 0%, rgba(155,231,255,0.08), transparent 65%),
              linear-gradient(180deg, var(--bg-start), var(--bg-end));
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
}

#mmv .card{
  width: 100%;
  max-width: 860px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-br);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  padding: 22px 22px 26px;
}

#mmv .title{
  margin: 0 0 10px 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: .55rem;
}

#mmv .emoji{
  filter: drop-shadow(0 2px 8px rgba(122,162,255,0.55));
}

#mmv .label{
  display:block;
  margin: 14px 0 6px;
  font-weight: 600;
  color: var(--text);
}

#mmv .input, #mmv .textarea{
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  border: 1px solid rgba(122,162,255,.25);
  outline: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .96rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}

#mmv .input:hover, #mmv .textarea:hover{
  border-color: rgba(155,231,255,.38);
}
#mmv .input:focus, #mmv .textarea:focus{
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(155,231,255,.13);
}

#mmv .textarea{
  min-height: 110px;
  resize: vertical;
}

#mmv .details{
  margin-top: 8px;
}
#mmv .details summary{
  cursor: pointer;
  color: #1899ff;
  margin: 6px 0;
}
#mmv .details[open] summary{
  color: #1899ff;
}

#mmv .row{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
}
#mmv .or{
  opacity: .7;
  font-size: .9rem;
}
#mmv .file-hint{
  color: var(--muted);
  font-size: .88rem;
}

#mmv .buttons{
  display: flex;
  gap: 10px;
  margin: 12px 0 8px;
}

#mmv .btn{
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: transform .06s ease, box-shadow .18s ease, background .2s ease, border-color .2s ease;
}
#mmv .btn:disabled{
  opacity: .55;
  cursor: not-allowed;
}
#mmv .btn-primary{
  background: linear-gradient(180deg, #5a84ff, #3a65f7);
  color: white;
  box-shadow: 0 8px 20px rgba(90,132,255,.35);
}
#mmv .btn-primary:hover{ transform: translateY(-1px); }
#mmv .btn-muted{
  background:#e5e7eb;
  color: var(--muted);
  border-color: rgba(122,162,255,.25);
}
#mmv .btn-copy{
  margin-top: 6px;
  width: 100%;
  background: linear-gradient(180deg, #49dd8b, #27c36f);
  color: #071813;
  box-shadow: 0 8px 20px rgba(68,210,123,.28);
}

#mmv .hint{
  min-height: 22px;
  margin-top: 6px;
  color: var(--muted);
  font-size: .92rem;
}

#mmv .error{
  margin-top: 10px;
  color: var(--danger);
  font-weight: 600;
}

#mmv .output{
  margin-top: 10px;
  background: rgba(6,10,20,.75);
  border: 1px solid rgba(122,162,255,.2);
  border-radius: 12px;
  padding: 12px;
  color: #dfe7ff;
  line-height: 1.35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .9rem;
  max-height: 340px;
  overflow: auto;
}

#mmv .footnote{
  margin-top: 12px;
  color: var(--muted);
  font-size: .9rem;
}
