:root {
  --primary-color: #2196f3;
  --success-color: #4caf50;
  --error-color: #f44336;
  --text-color: #333;
  --bg-color: #f5f5f5;
  --border-color: #ddd;
}

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

body {
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

#app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 100px 20px;
}

@media (max-width: 768px) {


  .headText {
    font-size: 20px;
  }

  .btn {
    font-size: 9px;
    padding: 8px 12px;
    /* white-space: nowrap; */
  }

}







header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
  font-size: 24px;
  color: var(--primary-color);
}

.controls {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
}

.btn.primary {
  background-color: var(--primary-color);
  color: white;
}

.btn.success {
  background-color: var(--success-color);
  color: white;
}

.btn:hover {
  opacity: 0.9;
}

.ad-sidebar-left {
  position: fixed;
  left: 20px;
  top: 100px;
  width: 140px;
  /* Slimmer for the gutter */
  min-width: 140px;
  background: transparent;
  /* No white box if ad fails to load */
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  z-index: 500;
}

@media (max-width: 1440px) {

  /* Hide if screen is too small to show it in the gutter without overlap */
  .ad-sidebar-left {
    display: none;
  }
}

.editor-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.main-content-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}


@media (max-width: 1200px) {
  #app {
    max-width: 100%;
  }
}

@media (max-width: 1024px) {
  /* The ad-sidebar-left media query was moved above */
}

textarea {
  width: 100%;
  min-height: 400px;
  padding: 20px;
  border: none;
  border-radius: 8px;
  resize: vertical;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
}

textarea:focus {
  outline: none;
}

.note-options {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.option-group {
  margin-bottom: 15px;
}

.option-group:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px;
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
}


.status {
  position: fixed;
  top: 20px;
  right: 20px;
  left: auto;
  bottom: auto;
  transform: none;
  min-width: 250px;
  /* Increased from 200px */
  max-width: 350px;
  /* Increased from 300px */
  background: #323232;
  color: #fff;
  padding: 10px 20px;
  /* Increased from 8px 16px */
  border-radius: 6px;
  /* Increased from 4px */
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  /* Slightly stronger shadow */
  text-align: center;
  font-size: 15px;
  /* Increased from 14px */
  line-height: 1.4;
  /* Increased from 1.2 */
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.4s, transform 0.4s;
  height: auto;
}

.status.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.status.success {
  background-color: #e8f5e9;
  color: var(--success-color);
}

.status.error {
  background-color: #ffebee;
  color: var(--error-color);
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .controls {
    width: 100%;
    justify-content: center;
  }

  textarea {
    min-height: 300px;
  }
}

.line-count {
  font-size: 13px;
  color: #888;
  padding-right: 4px;
}


/* .line-count {
  font-size: 14px;
  color: #888;
  margin-bottom: 5px;
  text-align: right;
  padding-right: 10px;
} */

.sub-header {
  font-size: 0.8rem;
  /* Reduced from 1.5rem */
  color: #666;
  /* Changed to grey */
  margin: 8px 0;
  /* Reduced margin */
  font-weight: 300;
  /* Reduced from 500 for lighter weight */
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeInDown 0.5s ease forwards;
  text-align: center;
  letter-spacing: 0.3px;
  /* Reduced letter spacing */
}

@keyframes fadeInDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.modal.show {
  opacity: 1;
}

.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-20px);
  transition: transform 0.3s ease-in-out;
}

.modal.show .modal-content {
  transform: translateY(0);
}

.close {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  transition: color 0.2s;
}

.close:hover {
  color: #333;
}

.settings-section {
  display: none;
  margin-top: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.settings-section.active {
  display: flex;
  flex-direction: column;
  gap: 15px;
  opacity: 1;
  transform: translateY(0);
}

.settings-section input {
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.settings-section input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
  outline: none;
}

.settings-section .btn {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s;
}

.settings-section .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.settings-section .btn:active {
  transform: translateY(0);
}

/* Password strength indicator */
.password-strength {
  margin-top: 8px;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0;
  transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.password-strength-bar.weak {
  width: 33.33%;
  background-color: #f44336;
}

.password-strength-bar.medium {
  width: 66.66%;
  background-color: #ff9800;
}

.password-strength-bar.strong {
  width: 100%;
  background-color: #4caf50;
}

.password-strength-text {
  margin-top: 4px;
  font-size: 12px;
  color: #666;
}

/* Error message styling */
/* Add or update error message styling */
.error-message {
  color: var(--error-color);
  font-size: 14px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 4px;
  background-color: rgba(244, 67, 54, 0.1);
  display: none;
}

.error-message.show {
  display: block;
  animation: shake 0.5s ease-in-out;
}

/* Add password strength indicator styles */
.password-strength {
  margin: 8px 0;
}

.password-strength-bar {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}

.password-strength-text {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.password-prompt-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px 0;
}

.password-input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s;
}

.password-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
  outline: none;
}

.password-input.error {
  border-color: var(--error-color);
  background-color: rgba(244, 67, 54, 0.05);
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-2px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(2px);
  }
}

/* Button loading state */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Add these styles for the password prompt modal */
#passwordPromptModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

#passwordPromptModal.show {
  display: flex !important;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

#passwordPromptModal .modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-20px);
  transition: transform 0.3s ease-in-out;
}

#passwordPromptModal.show .modal-content {
  transform: translateY(0);
}

#passwordPromptModal h3 {
  margin-bottom: 20px;
  color: var(--text-color);
  font-size: 18px;
  font-weight: 500;
}

#passwordPromptModal .password-prompt-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#passwordPromptModal .password-input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s;
}

#passwordPromptModal .password-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
  outline: none;
}

#passwordPromptModal .password-input.error {
  border-color: var(--error-color);
  background-color: rgba(244, 67, 54, 0.05);
}

#passwordPromptModal .modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

#passwordPromptModal .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

#passwordPromptModal .btn.primary {
  background-color: var(--primary-color);
  color: white;
}

#passwordPromptModal .btn.secondary {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

#passwordPromptModal .error-message {
  color: var(--error-color);
  font-size: 14px;
  padding: 8px;
  border-radius: 4px;
  background-color: rgba(244, 67, 54, 0.1);
  display: none;
}

#passwordPromptModal .error-message.show {
  display: block;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  /* Prevent line breaks */
  border: 0;
}





.site-footer {
  width: 100%;
  padding: 15px 0;
  background-color: #f9f9f9;
  /* light background */
  text-align: center;
  position: fixed;
  bottom: 0;
  left: 0;
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  color: #888888;
  /* grey color */
  border-top: 1px solid #ddd;
  z-index: 1000;
}

.footer-nav a {
  color: #c5c3c3;
  text-decoration: none;
  margin: 0 8px;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #7e7d7d;
}

.footer-nav span {
  color: #bebdbd;
}


.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}





.coffee-float-btn {
  position: fixed;
  right: 30px;
  bottom: 60px;
  z-index: 9999;
  transform: scale(0.7);
  transform-origin: bottom right;
  opacity: 0;
  animation: coffee-fade-in 0.5s ease-out forwards 0.4s;
}

/* Mobile: smaller & slightly lower */
@media (max-width: 600px) {
  .coffee-float-btn {
    right: 15px;
    bottom: 58px;
    /* 8px lower than before */
    transform: scale(0.56);
    /* smaller */
  }
}


@keyframes coffee-fade-in {
  to {
    opacity: 5;
  }
}

.seo-h1 {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 1px;
  width: 1px;
  overflow: hidden;
  white-space: nowrap;
}