/* Theme CSS Variables */
:root {
  --bg-primary: #181818;
  --bg-secondary: #303030;
  --bg-tertiary: #0a0a0a;
  --bg-input: #1e1e1e;
  --text-primary: #fff;
  --text-secondary: #ccc;
  --text-muted: #888;
  --border-color: #555;
  --border-light: #333;
  --accent-color: gold;
  --accent-hover: #ffe780;
  --link-color: #1890ff;
  --link-hover: #68c0ff;
  --success-color: #4CAF50;
  --error-color: #f44336;
  --warning-color: #ff9800;
  
  --bg-primary-alt: #f5f5f5;
  --bg-secondary-alt: #e0e0e0;
  --bg-tertiary-alt: #ffffff;
  --bg-input-alt: #ffffff;
  --text-primary-alt: #1a1a1a;
  --text-secondary-alt: #444;
  --text-muted-alt: #666;
  --border-color-alt: #ccc;
  --border-light-alt: #ddd;
  --accent-color-alt: #b8860b;
  --accent-hover-alt: #996515;
  --link-color-alt: #0066cc;
  --link-hover-alt: #004499;
}

/* Light mode overrides */
body.light-mode {
  --bg-primary: #f5f5f5;
  --bg-secondary: #e0e0e0;
  --bg-tertiary: #ffffff;
  --bg-input: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #444;
  --text-muted: #666;
  --border-color: #ccc;
  --border-light: #ddd;
  --accent-color: #b8860b;
  --accent-hover: #996515;
  --link-color: #0066cc;
  --link-hover: #004499;

  --bg-primary-alt: #181818;
  --bg-secondary-alt: #303030;
  --bg-tertiary-alt: #0a0a0a;
  --bg-input-alt: #1e1e1e;
  --text-primary-alt: #fff;
  --text-secondary-alt: #ccc;
  --text-muted-alt: #888;
  --border-color-alt: #555;
  --border-light-alt: #333;
  --accent-color-alt: gold;
  --accent-hover-alt: #ffe780;
  --link-color-alt: #1890ff;
  --link-hover-alt: #68c0ff;
  --success-color-alt: #4CAF50;
  --error-color-alt: #f44336;
  --warning-color-alt: #ff9800;
}

html,
body {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  margin: 0 0 120px 0;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  font-family: Arial, Helvetica, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0 20px 0 20px;
}

#mainContent {
  flex: 1;
  display: flex;
  overflow: hidden;
}

#userMenuContainer {
  position: fixed;
  top: 10px;
  right: 20px;
  z-index: 10001;
}

#sites-list-panel {
  text-align: center;
  min-width: 40%;
  max-width: 80%;
  width: 100%;
  margin: 0 auto 0 auto;
  padding: 20px;
  max-height: 100vh;
  overflow-y: auto;
}

.site-button {
  width: 100%;
  height: auto;
}

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  cursor: pointer;
}

footer a {
  color: var(--accent-color);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

nav {
  background-color: var(--bg-secondary);
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.menu-link {
  display: inline-block;
  color: var(--text-primary);
  text-decoration: none;
  padding: 15px 20px;
  font-size: 20pt;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.menu-link:hover {
  background-color: var(--border-color);
}

.menu-link:active {
  background-color: #1890ff;
}

.h-entry {
  margin-left: 10%;
  margin-right: 10%;
  margin-bottom: 20px;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  padding: 20px;
  transition: background-color 0.3s ease;
}

.h-entry h1 {
  text-align: center;
  font-size: 24pt;
}

.h-entry h2 {
  text-align: center;
  font-size: 20pt;
}

.h-entry h3,
.h-entry h4,
.h-entry h5,
.h-entry h6 {
  text-align: center;
  font-size: 18pt;
}

.h-entry p {
  font-size: 16pt;
}

.form-control {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.input-group-addon {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.dropdown-menu {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dropdown-menu li a {
  color: var(--text-primary);
}

.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.dropdown-menu .divider {
  background-color: var(--border-color);
}

#commitModal {
  z-index: 10003;
}

.modal-content {
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.modal-content,
.modal-header,
.modal-body,
.modal-footer {
  border-color: var(--border-color);
}

.modal-header .close {
  color: #ff4444;
  opacity: 1;
  text-shadow: none;
}

.modal-header .close:hover {
  color: #ff0000;
}

/* List group styles */
.list-group {
  margin-bottom: 0;
  padding-left: 0;
  background-color: transparent;
}

.list-group-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 15px;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.list-group-item:first-child {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.list-group-item:last-child {
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.list-group-item + .list-group-item {
  border-top-width: 0;
}

.list-group-item:hover {
  background-color: var(--border-color);
}

/* Fix input-group button alignment */
.input-group .input-group-btn .btn {
  margin: 0;
  height: 34px;
  padding: 6px 12px;
}

#sidebar {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#editorSection {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  max-height: 100%;
}

#editorContainer {
  display: flex;
  flex-direction: column;
}

#editor {
  flex: 1;
}

#editor-topbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: block;
  text-align: center;
  background-color: var(--bg-tertiary);
  width: 100%;
  padding: 10px 0 5px 0;
}

.publish-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin: 10px 20px;
  vertical-align: middle;
}

.publish-status.pending-changes {
  background-color: #ffc107;
  color: #212529;
}

.publish-status.published {
  background-color: #28a745;
  color: white;
}

#pageMenubar {
  display: flex;
  align-items: center;
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 5px 10px;
  /* margin-top is set dynamically by JavaScript based on editor-topbar position */
  overflow-x: auto;
  flex-shrink: 0;
  gap: 5px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

#pageMenubarContent {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  overflow-x: auto;
}

.menubar-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px;
  border-radius: 3px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 14px;
  height: 50px;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.menubar-item:hover {
  background-color: #1890ff;
  border-color: #68c0ff;
}

.menubar-item.active {
  background-color: #1890ff;
  color: white;
  border-color: #68c0ff;
}

.menubar-item-text {
  cursor: pointer;
}

.menubar-item button {
  background: transparent;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  padding: 0 5px;
  margin: 0;
}

.menubar-item button:hover {
  background: transparent;
  color: #68c0ff;
  margin: 0;
  padding: 0 5px;
}

.menubar-item.dragging {
  opacity: 0.5;
  border: 2px dashed #1890ff;
}

.menubar-item.drag-over {
  border: 2px solid #68c0ff;
  background-color: rgba(24, 144, 255, 0.2);
}

#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 20px;
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border-light);
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.toastui-editor-popup,
.toastui-editor-popup-add-link {
  position: relative !important;
  max-width: 90% !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%,0%) !important;
  margin: 0 !important;
}

.toastui-editor-toolbar-item-wrapper {
  margin: 0 !important;
}

.btn {
  padding: 10px 20px;
  font-size: 16px;
  margin: 5px;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  display: inline-block;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.btn.loading {
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

.alert-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 15px 20px;
  text-align: center;
  font-size: 16px;
  z-index: 10005;
  display: none;
  animation: slideDown 0.3s ease-out;
}

.alert-bar.show {
  display: block;
}

.alert-bar.success {
  background-color: #4CAF50;
  color: white;
}

.alert-bar.error {
  background-color: #f44336;
  color: white;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sidebar-file-item {
  margin: auto;
  border-radius: 3px;
  background-color: var(--bg-tertiary);
  cursor: pointer;
  font-size: 14px;
  border: 1px solid var(--border-light);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.sidebar-file-item:hover {
  background-color: var(--link-color);
  border-color: var(--link-hover);
}

.sidebar-file-item.active {
  background-color: #1890ff;
  color: white;
  border-color: #68c0ff;
}

.sidebar-file-text {
  flex: 1;
  cursor: pointer;
  padding: 5px 10px;
}

#sidebar {
  display: flex;
  min-width: 120px;
  max-width: 20%;
  border-right: 1px solid rgb(204, 204, 204);
}

#sidebarContentWrapper {
  margin-right: 20px;
}

#footer p {
  margin: 0 !important;
}

/* Image upload popup styles */
.image-upload-popup {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background-color: #1e1e1e;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10001 !important;
}

.image-upload-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.image-upload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.image-upload-header h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
}

.image-upload-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  line-height: 1;
}

.image-upload-close:hover {
  color: #ff4444;
}

.image-upload-dropzone {
  border: 2px dashed #555;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: transparent;
}

.image-upload-dropzone:hover {
  border-color: #1890ff;
  background-color: rgba(24, 144, 255, 0.05);
}

.dropzone-content {
  color: #fff;
}

.dropzone-icon {
  font-size: 48px;
  margin: 0 0 10px 0;
}

.dropzone-content p {
  margin: 5px 0;
  color: #ccc;
}

.dropzone-hint {
  font-size: 12px;
  color: #888;
  font-style: italic;
}

.image-upload-progress {
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #333;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  width: 100%;
  height: 100%;
  background-color: #1890ff;
  animation: progressPulse 1.5s ease-in-out infinite;
}

.progress-text {
  color: #ccc;
  font-size: 14px;
  margin: 0;
}

@keyframes progressPulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

.image-caption-section {
  margin-top: 15px;
}

.image-caption-section label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-secondary);
  font-size: 14px;
}

.image-caption-section input {
  width: 100%;
  padding: 10px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 14px;
  box-sizing: border-box;
}

.image-caption-section input:focus {
  outline: none;
  border-color: var(--link-color);
}

.image-caption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  font-style: italic;
}

.image-gallery-section {
  margin-top: 20px;
}

.image-gallery-section h4 {
  margin: 0 0 10px 0;
  color: #fff;
  font-size: 16px;
}

.image-gallery {
  max-height: 300px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  padding: 10px;
  background-color: #0a0a0a;
  border-radius: 8px;
  border: 1px solid #333;
}

.image-gallery:empty::before {
  content: "No images uploaded yet";
  color: #888;
  font-size: 14px;
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px;
}

.image-gallery-item {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.image-gallery-item:hover {
  border-color: #1890ff;
  transform: scale(1.05);
}

.image-gallery-item.selected {
  border-color: var(--link-color);
  box-shadow: 0 0 0 2px var(--link-color);
  transform: scale(1.05);
}

.image-gallery-item.selected::after {
  content: '✓';
  position: absolute;
  bottom: 4px;
  left: 4px;
  background-color: var(--link-color);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.image-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-delete-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: rgba(255, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.image-gallery-item:hover .image-delete-btn {
  opacity: 1;
}

.image-delete-btn:hover {
  background-color: rgba(255, 0, 0, 1);
}

/* HTML embed popup styles */
.html-embed-popup {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background-color: #1e1e1e;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10001 !important;
}

.html-embed-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.html-embed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.html-embed-header h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
}

.html-embed-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  line-height: 1;
}

.html-embed-close:hover {
  color: #ff4444;
}

.html-embed-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.html-embed-form label {
  color: #ccc;
  font-size: 14px;
  margin-bottom: 5px;
}

.html-embed-form textarea {
  width: 100%;
  padding: 10px;
  background-color: #0a0a0a;
  border: 1px solid #555;
  border-radius: 4px;
  color: #fff;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  resize: vertical;
  min-height: 150px;
}

.html-embed-form textarea:focus {
  outline: none;
  border-color: #1890ff;
}

.html-embed-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}

.html-embed-insert-btn,
.html-embed-cancel-btn {
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
}

/* PDF upload popup styles */
.pdf-upload-popup {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background-color: #1e1e1e;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10001 !important;
}

.pdf-upload-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.pdf-upload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.pdf-upload-header h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
}

.pdf-upload-close {
  background: transparent;
  border: 1px solid #555;
  border-radius: 4px;
  color: #ff4444;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pdf-upload-close:hover {
  background-color: #ff4444;
  border-color: #ff4444;
  color: #fff;
}

.pdf-upload-dropzone {
  border: 2px dashed #555;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: transparent;
}

.pdf-upload-dropzone:hover {
  border-color: #1890ff;
  background-color: rgba(24, 144, 255, 0.05);
}

.pdf-upload-progress {
  text-align: center;
}

/* Document list section */
.document-list-section {
  margin-top: 20px;
}

.document-list-section h4 {
  margin: 0 0 10px 0;
  color: #fff;
  font-size: 16px;
}

.document-list {
  max-height: 200px;
  overflow-y: auto;
  background-color: #0a0a0a;
  border-radius: 8px;
  border: 1px solid #333;
  padding: 8px;
}

.document-list-empty {
  color: #888;
  font-size: 14px;
  text-align: center;
  padding: 20px;
  font-style: italic;
}

.document-list-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background-color: #1e1e1e;
  border-radius: 4px;
  margin-bottom: 5px;
  transition: background-color 0.2s ease;
}

.document-list-item:last-child {
  margin-bottom: 0;
}

.document-list-item:hover {
  background-color: #2a2a2a;
}

.document-icon {
  font-size: 18px;
  margin-right: 10px;
  flex-shrink: 0;
}

.document-name {
  flex: 1;
  color: #fff;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.document-insert-btn {
  background-color: #1890ff;
  border: none;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s ease;
}

.document-insert-btn:hover {
  background-color: #40a9ff;
}

.document-delete-btn {
  background-color: transparent;
  border: 1px solid #ff4444;
  color: #ff4444;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.document-delete-btn:hover {
  background-color: #ff4444;
  color: #fff;
}

/* Theme toggle button */
.theme-toggle {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle:hover {
    background-color: var(--bg-primary-alt);
    color: var(--text-primary-alt);
}

.theme-toggle-icon {
  font-size: 14px;
}

/* Deploy overlay styles */
.deploy-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 10005;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deploy-overlay-content {
  text-align: center;
  color: #fff;
}

.deploy-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #1890ff;
  animation: spinner 0.8s linear infinite;
  margin: 0 auto 20px auto;
}

.deploy-message {
  font-size: 20px;
  font-weight: 500;
}

/* Mode Selection Panel */
#modeSelectionPanel {
  text-align: center;
  min-width: 40%;
  max-width: 80%;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
}

#modeSelectionHeader {
  text-align: left;
  margin-bottom: 30px;
}

#modeSelectionContent {
  padding: 20px;
}

#modeSelectionContent p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

#modeSelectionButtons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.mode-button {
  width: 250px;
  height: auto;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.mode-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.mode-button-icon {
  font-size: 48px;
}

.mode-button-title {
  font-size: 18px;
  font-weight: bold;
}

.mode-button-subtitle {
  font-size: 14px;
  font-weight: bold;
}

.mode-button-desc {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
}

/* File Manager */
#fileManagerContainer {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
}

#fileManagerTopbar {
  margin-bottom: 20px;
}

#fileManagerTopbar h3 {
  margin: 0;
  vertical-align: middle;
}

#fileManagerContent {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#fileListSection {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  padding: 20px;
  border: 2px dashed var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#fileListSection.dragover {
  border-color: var(--link-color);
  background-color: rgba(24, 144, 255, 0.1);
}

#fileListHeader {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

#fileBreadcrumbs {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-primary);
  font-size: 14px;
}

.breadcrumb-up-btn {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.breadcrumb-up-btn:hover:not(:disabled) {
  background-color: var(--bg-primary);
  border-color: var(--link-color);
}

.breadcrumb-up-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.breadcrumb-item {
  cursor: pointer;
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 13px;
}

.breadcrumb-item:hover {
  background-color: var(--bg-primary);
  border-color: var(--link-color);
}

.breadcrumb-item.active {
  background-color: var(--link-color);
  border-color: var(--link-color);
  color: white;
  cursor: default;
}

.breadcrumb-item.active:hover {
  background-color: var(--link-color);
}

.breadcrumb-separator {
  color: var(--text-muted);
  font-size: 12px;
}

#fileDropzoneOverlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(24, 144, 255, 0.15);
  border-radius: 6px;
  z-index: 10;
  pointer-events: none;
}

#fileListSection.dragover #fileDropzoneOverlay {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-overlay-content {
  text-align: center;
}

.dropzone-overlay-content .dropzone-icon {
  font-size: 64px;
  margin-bottom: 10px;
}

.dropzone-overlay-content p {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 500;
}

#fileList {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 400px;
  overflow-y: auto;
}

.file-list-loading {
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: var(--bg-tertiary);
  border-radius: 4px;
  border: 1px solid var(--border-light);
  transition: background-color 0.2s ease;
}

.file-item:hover {
  background-color: var(--bg-primary);
}

.file-item-icon {
  font-size: 20px;
  margin-right: 10px;
  width: 24px;
  text-align: center;
}

.file-item-name {
  flex: 1;
  color: var(--text-primary);
  word-break: break-all;
}

.file-item-size {
  color: var(--text-muted);
  font-size: 12px;
  margin-right: 15px;
}

.file-item-actions {
  display: flex;
  gap: 5px;
}

.file-item-download,
.file-item-delete {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 5px 8px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  border-radius: 4px;
}

.file-item-download {
  color: var(--link-color);
}

.file-item-delete {
  color: var(--error-color);
}

.file-item-download:hover,
.file-item-delete:hover {
  opacity: 1;
  background-color: var(--bg-secondary);
}

.file-item.folder-item {
  cursor: pointer;
}

.file-item.folder-item:hover {
  background-color: rgba(24, 144, 255, 0.1);
}

.file-list-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 30px;
  font-style: italic;
}

/* Block Editor Styles */
.block-editor {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 20px;
  height: 100%;
  overflow-y: auto;
  background-color: var(--bg-primary);
}

.block-item {
  position: relative;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.block-item:hover {
  border-color: var(--link-color);
}

.block-item.dragging {
  opacity: 0.5;
  border-color: var(--link-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.block-item.drag-over {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-color);
}

.block-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-light);
  border-radius: 8px 8px 0 0;
}

.block-controls-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.block-controls-right {
  display: flex;
  align-items: center;
  gap: 5px;
}

.block-type-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.block-drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.block-drag-handle:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.block-drag-handle:active {
  cursor: grabbing;
}

.block-edit-btn,
.block-delete-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.block-edit-btn:hover {
  background-color: var(--link-color);
  border-color: var(--link-color);
  color: white;
}

.block-delete-btn:hover {
  background-color: var(--error-color);
  border-color: var(--error-color);
  color: white;
}

.block-preview {
  padding: 15px;
  min-height: 50px;
}

/* Block preview content styling - match owo-template */
.block-preview .h-entry {
  margin: 0;
  background-color: transparent;
  border: none;
  padding: 0;
}

.block-preview .h-entry h1,
.block-preview .h-entry h2,
.block-preview .h-entry h3,
.block-preview .h-entry h4,
.block-preview .h-entry h5,
.block-preview .h-entry h6 {
  margin-top: 0;
}

.block-preview .embed-container {
  text-align: center;
}

.block-preview .embed-container iframe {
  max-width: 100%;
  border-radius: 8px;
}

.block-preview .embed-container img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.block-preview .pdf-download-container {
  text-align: center;
  padding: 20px 0;
}

.block-preview .pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 25px;
  background-color: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 16px;
  transition: all 0.2s ease;
}

.block-preview .pdf-download-btn:hover {
  border-color: var(--link-color);
  background-color: var(--bg-secondary);
}

.block-preview .pdf-icon {
  font-size: 24px;
}

/* Link Button Block Preview */
.block-preview .link-button-container {
  text-align: center;
  padding: 20px 0;
}

.block-preview .link-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 25px;
  background-color: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 16px;
  transition: all 0.2s ease;
}

.block-preview .link-button:hover {
  border-color: var(--border-color);
  background-color: var(--bg-secondary);
}

.block-preview .link-icon {
  font-size: 24px;
}

/* Link Button Popup */
.link-button-form .form-group {
  margin-bottom: 16px;
}

.link-button-form .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-primary);
}

.link-button-form .form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
}

.link-button-form .form-group input:focus {
  outline: none;
  border-color: var(--link-color);
}

.link-button-form .form-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Add Block Button */
.add-block-wrapper {
  position: relative;
  width: 100%;
}

.add-block-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px;
  margin: 8px 0;
  background: transparent;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-block-btn:hover {
  border-color: var(--link-color);
  color: var(--link-color);
  background-color: rgba(24, 144, 255, 0.05);
}

/* Add Block Menu */
.add-block-menu {
  position: relative;
  z-index: 10001;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  padding: 8px 0;
  width: 180px;
  margin: 0 auto;
}


.add-block-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  color: var(--text-primary);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.add-block-menu-item:hover {
  background-color: var(--link-color);
  color: white;
}

.add-block-menu-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.add-block-menu-label {
  font-size: 14px;
}

/* Panel Edit Modal */
.panel-edit-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-edit-modal-content {
  position: relative;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 90%;
  max-width: 900px;
  max-height: 700px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-light);
}

.panel-edit-modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
}

.panel-edit-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--error-color);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.panel-edit-modal-close:hover {
  background-color: var(--error-color);
  border-color: var(--error-color);
  color: white;
}

.panel-edit-modal-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-edit-modal-body #panelEditor {
  flex: 1;
}

.panel-edit-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 20px;
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border-light);
}

.panel-edit-confirm-btn,
.panel-edit-cancel-btn {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.panel-edit-confirm-btn {
  background-color: var(--link-color);
  border: 1px solid var(--link-color);
  color: white;
}

.panel-edit-confirm-btn:hover {
  background-color: var(--link-hover);
  border-color: var(--link-hover);
}

.panel-edit-cancel-btn {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.panel-edit-cancel-btn:hover {
  background-color: var(--bg-secondary);
}

/* Empty state for block editor */
.block-editor-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.block-editor-empty p {
  margin: 10px 0;
  font-size: 16px;
}

/* Popup overlay for block editor */
.block-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9999;
}

/* Block popup styles (reused by image, embed, document popups) */
.block-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10001;
}

.block-popup .popup-content {
  padding: 20px;
}

.block-popup .popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-light);
}

.block-popup .popup-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
}

.block-popup .popup-close {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--error-color);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.block-popup .popup-close:hover {
  background-color: var(--error-color);
  border-color: var(--error-color);
  color: white;
}

.block-popup .popup-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-light);
}

.block-popup .popup-cancel,
.block-popup .popup-confirm {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.block-popup .popup-cancel {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.block-popup .popup-cancel:hover {
  background-color: var(--bg-tertiary);
}

.block-popup .popup-confirm {
  background-color: var(--link-color);
  border: 1px solid var(--link-color);
  color: white;
}

.block-popup .popup-confirm:hover {
  background-color: var(--link-hover);
  border-color: var(--link-hover);
}

.block-popup .popup-confirm:disabled {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-muted);
  cursor: not-allowed;
}

.block-popup .popup-confirm:disabled:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
}

/* Embed popup specific styles */
.embed-popup .embed-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.embed-popup .embed-type-selector {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.embed-popup .embed-type-selector label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-primary);
  cursor: pointer;
}

.embed-popup input[type="text"],
.embed-popup textarea {
  width: 100%;
  padding: 10px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 14px;
  box-sizing: border-box;
}

.embed-popup input[type="text"]:focus,
.embed-popup textarea:focus {
  outline: none;
  border-color: var(--link-color);
}

.embed-popup textarea {
  min-height: 100px;
  resize: vertical;
  font-family: 'Courier New', monospace;
}

.embed-popup label {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 5px;
  display: block;
}

/* Document popup specific styles */
.document-upload-popup .document-upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 15px;
}

.document-upload-popup .document-upload-dropzone:hover,
.document-upload-popup .document-upload-dropzone.dragover {
  border-color: var(--link-color);
  background-color: rgba(24, 144, 255, 0.05);
}

.document-upload-popup .document-list-section h4 {
  margin: 0 0 10px 0;
  color: var(--text-primary);
  font-size: 14px;
}

.document-upload-popup .document-list {
  background-color: var(--bg-tertiary);
  border-radius: 4px;
  padding: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.document-upload-popup .document-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.document-upload-popup .document-list-item:hover {
  background-color: var(--bg-secondary);
}

.document-upload-popup .document-icon {
  font-size: 18px;
}

.document-upload-popup .document-name {
  flex: 1;
  color: var(--text-primary);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-upload-popup .document-select-btn {
  background-color: var(--link-color);
  border: none;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s ease;
}

.document-upload-popup .document-select-btn:hover {
  background-color: var(--link-hover);
}

.document-upload-popup .list-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 15px;
  font-style: italic;
}

/* Panel edit modal overlay */
.panel-edit-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-edit-modal-overlay .panel-edit-modal {
  position: relative;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 90%;
  max-width: 900px;
  max-height: 700px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-edit-modal .panel-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-light);
  width: 100%;
}

.panel-edit-modal .panel-edit-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
}

.panel-edit-modal .panel-edit-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--error-color);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.panel-edit-modal .panel-edit-close:hover {
  background-color: var(--error-color);
  border-color: var(--error-color);
  color: white;
}

.panel-edit-modal .panel-edit-body {
  flex: 1;
  overflow: hidden;
  padding: 0;
  max-width: 100vw;
  width: 100%;
  overflow-x: hidden;
}

.panel-edit-modal .panel-edit-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 20px;
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border-light);
}

.panel-edit-modal .panel-edit-cancel,
.panel-edit-modal .panel-edit-confirm {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.panel-edit-modal .panel-edit-cancel {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.panel-edit-modal .panel-edit-cancel:hover {
  background-color: var(--bg-secondary);
}

.panel-edit-modal .panel-edit-confirm {
  background-color: var(--link-color);
  border: 1px solid var(--link-color);
  color: white;
}

.panel-edit-modal .panel-edit-confirm:hover {
  background-color: var(--link-hover);
  border-color: var(--link-hover);
}

/* Gallery empty state in block popup */
.block-popup .gallery-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
  font-style: italic;
}

@media (max-width: 768px) {

  #main {
    margin: 0;
    /* padding-top handled by pageMenubar margin-top set via JavaScript */
  }

  #userMenuContainer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    text-align: right;
    background-color: var(--bg-tertiary);
    z-index: 10002;
  }

  .dropdown {
    display: inline-block;
  }

  #sites-list-panel {
    min-width: 80%;
    max-width: 95%;
  }
  
  .toastui-editor-tooltip {
    display: none !important;
  }

  .toastui-editor-dropdown-toolbar {
    left: auto !important;
    right: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    flex-wrap: wrap !important;
    height: auto !important;
    overflow: visible !important;
    white-space: normal !important;
  }

  .menu-link {
    font-size: 14pt;
  }

  .h-entry h1 {
    font-size: 16pt;
  }

  .h-entry h2 {
    font-size: 14pt;
  }

  .h-entry h3,
  .h-entry h4,
  .h-entry h5,
  .h-entry h6 {
    font-size: 12pt;
  }

  .h-entry p {
    font-size: 10pt;
  }

  .image-upload-popup {
    width: 95%;
    max-width: none;
    padding: 15px;
  }

  .html-embed-popup {
    width: 95%;
    max-width: none;
    padding: 15px;
  }

  .dropzone-icon {
    font-size: 24px;
  }

  /* Block editor responsive */
  .block-editor {
    padding: 10px;
  }

  .block-controls {
    flex-wrap: wrap;
    gap: 5px;
  }

  .block-popup {
    width: 95%;
    max-width: none;
  }

  .panel-edit-modal-overlay .panel-edit-modal {
    width: 95%;
    max-height: none;
  }

  .add-block-menu {
    min-width: 150px;
  }
}