.top-bar {
  height: 40px;
  background-color: var(--color1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  gap: 10px;
}

.top-bar-logo {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--color14);
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 800;
  font-style: normal;
  background-color: var(--color15);
  position: absolute;
  right: 100px;
  height: 50px;
  width: 60px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

// AI
.top-bar-logo-text {
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.1em;
}

.settings-fab {
  position: static;
  background: var(--color3);
  border: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.settings-fab:hover {
  box-shadow: 0 4px 16px var(--alpha4);
  background: var(--color16);
}

.settings-fab-icon {
  display: block;
}

.app-root{position:relative;height:100%}.app-content{display:flex;height:100%}.input-pane-wrapper{width:50%;min-width:0;height:100%}.text-panes{width:50%;min-width:0;display:flex;flex-direction:column;height:100%}.settings-header{padding:10px}.settings-fab-icon{display:block}.added{color:var(--color8)}.removed{color:var(--color4)}.settings-fab{position:static;background:var(--color3);border:0;width:28px;height:28px;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}.settings-fab:hover{box-shadow:0 4px 16px var(--alpha4);background:var(--color16)}.currentPosition{width:0}.hidden{visibility:hidden;display:inline-block}.pulsatingBlock{display:inline-block;width:6px;height:8px;margin-left:.8px;margin-right:2.8px;border-radius:2px;background-color:var(--alpha1);animation:pulsateLoading 1s infinite}@keyframes pulsateLoading{0%{opacity:.7}50%{opacity:1}100%{opacity:.7}}@keyframes pulsateEnd{0%{opacity:.9}50%{opacity:1}100%{opacity:.9}}.endPrompt{position:relative;display:inline-block;width:.51rem;height:.8rem;margin-left:.1rem;margin-bottom:-2px;background-color:var(--alpha1)}@keyframes pulsateDot{0%{opacity:.5}50%{opacity:1}100%{opacity:.5}}.endPrompt::before{content:".";position:absolute;top:7px;left:50%;transform:translate(-50%, -50%);font-size:.9rem;color:var(--color7);animation:pulsateDot .6s infinite}
.correctedWrapper {
  padding: 16px;
  flex: 1;
  position: relative;
  background-color: var(--color1);
}

.corrected {
  overflow-y: hidden;
  max-width: 60ch;
  margin: 0 auto;
  line-height: 1.5;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.corrected-help-text {
  color: var(--alpha2);
  font-family: 'Courier New', Courier, monospace;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

// AI
.corrected-help-text .color-marked {
  color: var(--color8);
}

.underCorrection {
  display: inline-block;
  width: 0.51rem;
  height: 0.8rem;
  margin-left: 0.1rem;
  margin-bottom: -2px;
  margin-right: 2.8px;
  background-color: var(--alpha1);
  animation: pulsateLoading 0.7s infinite;
}

@keyframes pulsateLoading {
  0% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.7;
  }
}

.originalWrapper {
  padding: 16px;
  background-color: var(--color3);
  flex: 1;
  position: relative;
}

.original {
  overflow-y: hidden;
  max-width: 60ch;
  margin: 0 auto;
  line-height: 1.5;
}

.original-help-text {
  color: var(--alpha2);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  text-align: center;
  padding: 20px;
}

.original-help-text .color-marked {
  color: var(--color4);
}

// AI
.underCorrection {
  display: inline-block;
  width: 0.51rem;
  height: 0.8rem;
  margin-left: 0.1rem;
  margin-bottom: -2px;
  margin-right: 2.8px;
  background-color: var(--alpha1);
  animation: pulsateLoading 0.7s infinite;
}

@keyframes pulsateLoading {
  0% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.7;
  }
}

.endPrompt {
  position: relative;
  display: inline-block;
  width: 0.51rem;
  height: 0.8rem;
  margin-left: 0.1rem;
  margin-bottom: -2px;
  background-color: var(--alpha1);
}

@keyframes pulsateDot {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.5;
  }
}

.endPrompt::before {
  content: ".";
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.9rem;
  color: var(--color7);
  animation: pulsateDot 0.6s infinite;
}

/* Lexical Editor Styles */
.input-pane-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #fafafa;
}

.input-tools {
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.lexical-editor-wrapper {
  flex-grow: 1;
  max-width: 60ch;
  margin: 0 auto;
  width: 100%;
  background-color: #fafafa;
  border-radius: 3px;
  position: relative;
  /* Base font size for dynamic scaling */
  font-size: 1rem;
}

.lexical-content-editable {
  min-height: 200px;
  padding: 10px;
  border: none;
  outline: none;
  border-radius: 3px;
  font-family: 'Courier New', Courier, monospace;
  /* Inherit font-size from parent to respect dynamic sizing */
  font-size: inherit;
  resize: none;
  background-color: #fafafa;
  color: #3C3C3C;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  /* Prevent layout shifts during updates */
  overflow-anchor: auto;
}

.lexical-placeholder {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #999;
  pointer-events: none;
  font-family: 'Courier New', Courier, monospace;
  /* Inherit font-size from parent to respect dynamic sizing */
  font-size: inherit;
}

.lexical-paragraph {
  margin: 0;
}

.controls {
  display: flex;
  margin-bottom: 10px;
  gap: 10px;
}

.control-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.control-group label {
  margin-bottom: 5px;
  font-weight: bold;
}

.control-group select {
  padding: 5px;
}

.colored-input-wrapper {
  position: relative;
  flex-grow: 1;
  max-width: 60ch;
  margin: 0 auto;
  width: 100%;
  background-color: #fafafa;
  border-radius: 3px;
}

.colored-input-mirror {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px;
  margin: 0;
  border: none;
  border-radius: 3px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-y: auto;
  overflow-x: hidden;
  pointer-events: none;
  color: #3C3C3C;
  background-color: transparent;
  line-height: 1.5;
  tab-size: 2;
}

.colored-input-textarea {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 10px;
  border: none;
  outline: none;
  border-radius: 3px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
  resize: none;
  background-color: transparent;
  color: transparent;
  caret-color: #3C3C3C;
  line-height: 1.5;
  tab-size: 2;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.colored-input-textarea::placeholder {
  color: #999;
  opacity: 1;
}

textarea {
  flex-grow: 1;
  padding: 10px;
  border: none;
  outline: none;
  border-radius: 3px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
  resize: none;
  background-color: #fafafa;
  color: #3C3C3C;
  max-width: 60ch;
  margin: 0 auto;
  line-height: 1.5;
}

.stats-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 10px;
  background-color: #fafafa;
}

.sentence-count,
.word-count {
  color: #666;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
}

/* AI */
.input-pane-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #fafafa;
}

.input-tools {
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.controls {
  display: flex;
  margin-bottom: 10px;
  gap: 10px;
}

.control-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.control-group label {
  margin-bottom: 5px;
  font-weight: bold;
}

.control-group select {
  padding: 5px;
}

textarea {
  flex-grow: 1;
  padding: 10px;
  border: none;
  outline: none;
  border-radius: 3px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
  resize: none;
  background-color: #fafafa;
  color: #3C3C3C;
  max-width: 60ch;
  margin: 0 auto;
  line-height: 1.5;
}

.stats-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 10px;
  background-color: #fafafa;
}

.sentence-count,
.word-count {
  color: #666;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
}

.password-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  background-color: #f0f0f0;
}

.password-page form {
  text-align: center;
}

.password-page h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #333;
  font-weight: normal;
}

.password-page input {
  padding: 10px 20px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 250px;
  outline: none;
  transition: border-color 0.3s;
}

.password-page input:focus {
  border-color: #007bff;
}

.password-page input.error {
  border-color: #dc3545;
  animation: shake 0.3s;
}

.error-message {
  color: #dc3545;
  margin-top: 10px;
  font-size: 0.9rem;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 300px;
}

.login-form h2 {
  margin: 0;
  color: var(--color2);
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.2rem;
  font-weight: bold;
}

// AI
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-weight: bold;
  color: var(--color2);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
}

.form-group input {
  padding: 8px 12px;
  border: 1px solid var(--color10);
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  background-color: var(--color9);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color8);
  box-shadow: 0 0 0 2px var(--alpha3);
}

.form-group input:disabled {
  background-color: var(--color3);
  cursor: not-allowed;
}

.login-form button {
  padding: 10px 20px;
  background: var(--color8);
  color: var(--color9);
  border: none;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.login-form button:hover:not(:disabled) {
  background: var(--color12);
}

.login-form button:disabled {
  background: var(--color10);
  cursor: not-allowed;
}

.error-message {
  color: var(--color13);
  font-size: 0.9rem;
  margin: 0;
}

.settings-page {
  padding: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: 0;
  display: flex;
  align-items: flex-start;
  gap: 40px;
  justify-content: flex-end;
}

.settings-header {
  margin: 0;
}

.settings-page h1 {
  margin: 0;
  color: #3C3C3C;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  font-weight: bold;
}

.settings-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  margin: 0;
}

.login-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.login-status p {
  margin: 0;
  color: #28a745;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
}

.logout-button {
  padding: 6px 12px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.logout-button:hover {
  background: #c82333;
}

.language-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-selector label {
  font-weight: bold;
  color: #3C3C3C;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
}

.language-selector select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  background-color: white;
}

.language-selector select:focus {
  outline: none;
  border-color: #428BCA;
  box-shadow: 0 0 0 2px rgba(66, 139, 202, 0.2);
}

.text-size-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.text-size-selector label {
  font-weight: bold;
  color: #3C3C3C;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
}

.text-size-buttons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.text-size-multiplier {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  color: #3C3C3C;
  margin-left: 4px;
}

.size-button {
  background: #f0f0f0;
  border: 1px solid #ccc;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #3C3C3C;
  border-radius: 4px;
  transition: background 0.1s ease;
}

.size-button:hover {
  background: #e0e0e0;
  border-color: #999;
}

.size-button:active {
  background: #c0c0c0;
}

.back-button {
  background: #f0f0f0;
  border: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #3C3C3C;
  transition: background 0.1s ease;
}

.back-button:hover {
  box-shadow: 0 4px 16px rgba(60, 60, 60, 0.16);
  background: #e0e0e0;
}

.back-button:active {
  background: #c0c0c0;
}

:root{--color1: #f6f6f6;--color2: #3C3C3C;--color3: #f0f0f0;--color4: #CA6E42;--color7: #deeb34;--color8: #428BCA;--color9: #ffffff;--color10: #cccccc;--color12: #3071a9;--color13: #dc3545;--color14: #a6d54d;--color15: #000000;--color16: #e0e0e0;--alpha1: rgba(0, 0, 0, 0.7);--alpha2: rgba(60, 60, 60, 0.5);--alpha3: rgba(66, 139, 202, 0.2);--alpha4: rgba(60, 60, 60, 0.16)}body{background-color:var(--color1);color:var(--color2);font-family:"Courier New",Courier,monospace;font-weight:600;padding:0;margin:0;font-size:16px;line-height:1.5}.main-container{display:flex;flex-direction:column;width:100vw;height:100vh}.app-container{width:100%;height:90%;overflow:auto}
