/* Reset & Fonts */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(to right, #e3e3e3, #ffffff);
  transition: background 0.4s ease;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
  gap: 20px;
  flex: 1;
}

/* Editor Panel */
.editor {
  flex: 1 1 400px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.editor h1 {
  margin-bottom: 20px;
  color: #111;
}

.editor label {
  display: block;
  margin-top: 15px;
  font-weight: 600;
}

.editor input,
.editor textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #aaa;
  border-radius: 8px;
  background: #f9f9f9;
}

.editor button {
  margin-top: 20px;
  padding: 12px;
  width: 100%;
  background: #111;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.editor button:hover {
  background: #333;
}

/* Preview Panel */
.preview {
  flex: 1 1 400px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.preview h2 {
  margin-top: 10px;
  font-size: 24px;
  color: #222;
}

.preview h4 {
  font-size: 18px;
  color: #666;
  margin-bottom: 10px;
}

.preview h3 {
  margin-top: 20px;
  font-size: 18px;
  color: #000;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}

.preview p {
  margin-top: 10px;
  font-size: 15px;
  color: #333;
}

.profile-pic {
  width: 120px;
  height: 120px;
  background: #ccc;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 10px;
  background-size: cover;
  background-position: center;
}

/* Theme Toggle Button */
#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #111;
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 50px;
  cursor: pointer;
  z-index: 1000;
  transition: background 0.3s ease;
}

#theme-toggle:hover {
  background: #444;
}

/* Footer */
.footer {
  text-align: center;
  padding: 15px;
  background: #111;
  color: white;
  margin-top: auto;
}

/* DARK THEME */
body.dark {
  background: linear-gradient(to right, #1a1a1a, #2b2b2b);
  color: #f5f5f5;
}

body.dark .editor,
body.dark .preview {
  background: rgba(30, 30, 30, 0.8);
  color: #fff;
}

body.dark .editor input,
body.dark .editor textarea {
  background: #444;
  color: #f0f0f0;
  border: 1px solid #666;
}

body.dark .editor button {
  background: #f5f5f5;
  color: #111;
}

body.dark .preview h2,
body.dark .preview h4,
body.dark .preview h3,
body.dark .preview p {
  color: #f0f0f0;
}

body.dark .footer {
  background: #000;
  color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
}