body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
  max-width: 800px;
  margin: 48px auto;
  padding: 0 16px;
  color: #1a1a1a;
  background: #f8f9fa;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-x: hidden;
}

#title, #author, #editor, #publishBtn { display: block; }

#title {
  font-size: 2.25rem;
  font-weight: 500;
  outline: none;
  width: 100%;
  padding: 12px;
  margin: 1.5em 0 0.5em 0;
  border: none;
  background: transparent;
}

#title:focus {
  border: none;
  box-shadow: none;
}

#author {
  font-size: 1rem;
  color: #6b7280;
  outline: none;
  width: 100%;
  padding: 10px;
  margin-bottom: 2em;
  border: none;
  background: transparent;
}

#author:focus {
  border: none;
  box-shadow: none;
}

#editor {
  min-height: 300px;
  font-size: 1.125rem;
  line-height: 1.75;
  border: 1px solid #e5e7eb;
  outline: none;
  padding: 16px;
  background: #fff;
  border-radius: 6px;
}

.ql-toolbar { 
  border: none !important; 
  background: #fff;
  padding: 12px 16px;
  display: block;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 6px 6px 0 0;
}

.ql-container { 
  border: none !important; 
  background: #fff;
  border-radius: 0 0 6px 6px;
}

.ql-code { 
  font-family: 'Courier New', Courier, monospace;
  background: #e5e7eb;
  padding: 3px 6px;
  border-radius: 4px;
}

button#publishBtn {
  margin: 2em 0 4em 0;
  background: #1a1a1a;
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 1.125rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background 0.2s ease, transform 0.1s ease;
}

button#publishBtn:hover:enabled { 
  background: #374151; 
  transform: translateY(-1px);
}

button#publishBtn:disabled { 
  background: #9ca3af; 
  cursor: not-allowed; 
  box-shadow: none;
}

.error {
  color: #ef4444;
  margin-top: 1em;
  font-size: 0.875rem;
}

footer {
  text-align: center;
  padding: 24px 0;
  font-family: inherit;
  font-size: 0.875rem;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  margin-top: 3rem;
}

footer a {
  color: inherit;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
  color: #3b82f6;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
  body {
    margin: 24px auto;
    padding: 0 12px;
  }

  #title {
    font-size: 1.75rem;
    margin-top: 0.5em;
  }

  #author {
    font-size: 0.9rem;
  }

  #editor {
    font-size: 1rem;
    min-height: 250px;
  }

  button#publishBtn {
    padding: 12px;
    font-size: 1rem;
    width: 100%;
    margin: 1.5em 0 3em 0;
  }

  .ql-toolbar {
    padding: 8px 12px;
  }

  .ql-editor {
    overflow-x: auto;
    max-width: 100%;
    padding: 12px;
  }
}

@media (max-width: 400px) {
  #title {
    font-size: 1.5rem;
  }

  #author {
    font-size: 0.8rem;
  }

  #editor {
    font-size: 0.95rem;
    padding: 12px;
  }

  footer {
    padding: 16px 0;
    font-size: 0.8rem;
  }
}
