* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: white;
  color: black;
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
  background-color: black;
  color: white;
}

header {
  position: relative;
  z-index: 10;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #111;  
  color: white;
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode header {
  background-color: white;  
  color: black;
}

.mode-icon {
  left: 4px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  margin: 0 5px;
  transition: opacity 0.3s ease;
}

.mode-icon:hover {
  opacity: 0.7;
}

.mode-toggle img {
  width: 19px;
  height: auto;
  filter: invert(0); 
  cursor: pointer;
  transition: filter 0.3s ease;
}

.dark-mode .mode-toggle img {
  filter: invert(1); 
}

.left, .right {
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 1px;
}

.center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}


.mode-toggle span {
  cursor: pointer;
  font-size: 16px;
  margin: 0 6px;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 90vh;
  padding: 2rem;
}

.input-wrapper {
  position: relative;
  height: 700px; 
  padding-bottom: 3rem; 
  width: 100%;
  max-width: 1200px;
  overflow: hidden;
}

.image-output {
  position: absolute;
  top: 0;
  left: 0;
  padding-bottom: 30px;
  width: 100%;
  height: calc(100% - 30px); 
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0rem;
  pointer-events: none;
  z-index: 1;
  overflow: hidden; 
}

.image-output img {
  max-height: 800px;
  margin: 0;
  object-fit: contain;
  transition: height 0.2s ease, filter 0.3s;
}

body.dark-mode .image-output img {
  filter: invert(1) hue-rotate(180deg) brightness(1.2) contrast(1.1);
}

input[type="text"] {
  position: absolute;
  bottom: 1.2rem;
  left: 0;
  width: 100%;
  border: none;
  outline: none;
  font-size: 12px;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1.2px;
  z-index: 2;
  background: transparent;
  color: #333;
}

body.dark-mode input[type="text"] {
  color: white;
}

.input-line {
  position: absolute;
  bottom: 0;
  left: 0;
  border-top: 1px solid #999;
  width: 100%;
  z-index: 2;
}

#saveBtn {
  margin-top: 40px;
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 1px;
  background: none;
  border: 1px solid #888;
  cursor: pointer;
  transition: background 0.2s;
}

#saveBtn:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.dark-mode #saveBtn {
  color: white;
  border: 1px solid #ccc;
  background: none;
}

.about-wrapper {
  position: relative;
  display: inline-block;
}

.about-link {
  cursor: pointer;
}

.about-popup {
  position: absolute;
  top: 35px;
  right: 0;
  width: 280px;
  padding: 1rem;
  background-color: black;
  color: white;
  font-size: 11px;
  line-height: 1.6;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border: 1px solid white;
}

.about-wrapper:hover .about-popup {
  opacity: 1;
  pointer-events: auto;
}

body.dark-mode .about-popup {
  background-color: white;
  color: black;
  border: 1px solid black;
}

