:root {
  --ql-toolbar_bg: #fafbfc;
  --ql-toolbar_border-color: #fafbfc;
  --ql-picker-strok-color: #444444;
  --ql-blank-color: rgba(0, 0, 0, 0.6);

  /* Preview Theme */
  --preview-bg: #f8fafc;
  --preview-card-bg: #ffffff;
  --preview-border: #e5e7eb;
  --preview-text: #1e293b;
  --preview-blockquote-bg: #f8fafc;
  --preview-blockquote-text: #475569;
  --preview-inline-code-bg: #f1f5f9;
}

[data-style="dark"] {
  --ql-toolbar_border-color: #334155;
  --ql-toolbar_bg: #1e293b;
  --ql-picker-strok-color: #cbd5e1;
  --ql-blank-color: #94a3b8;

  /* Preview Theme */
  --preview-bg: #21232c;
  --preview-card-bg: #2a2d3a;
  --preview-border: #374151;
  --preview-text: #e2e8f0;
  --preview-blockquote-bg: #1e293b;
  --preview-blockquote-text: #cbd5e1;
  --preview-inline-code-bg: #334155;
}

.hide {
  display: none !important;
}

.topbar,
.filter-card,
.empty-card,
.update-card {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.update-card {
  transition: all 0.2s ease;
}

.update-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.tag {
  font-size: 11px;
  border-radius: 30px;
  padding: 5px 10px;
}

.meta {
  font-size: 13px;
  color: #6c757d;
}

.actions .btn {
  border-radius: 10px;
}

.filter-item {
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
}

.filter-item.active {
  background: #eef2ff;
  color: #4f46e5;
}

.filter-item:hover {
  background: #eef2ff;
  color: #4f46e5;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4f46e5;
  display: inline-block;
}

.sticky-card {
  position: sticky;
  top: 20px;
}

@media (max-width: 768px) {
  .sticky-card {
    position: relative;
    top: auto;
  }
}

.custom-modal {
  max-width: 95vw;
  height: 92vh;
}

.custom-modal .modal-content {
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
}

.custom-modal .modal-body {
  overflow-y: auto;
}

/* Quill Editor */
.ql-snow.ql-toolbar,
.ql-snow .ql-toolbar {
  border: none !important;
  background: var(--ql-toolbar_bg);
  padding: 12px !important;
}

.ql-container {
  border: none !important;
  font-size: 16px;
  font-family: "Inter", sans-serif !important;
  height: calc(100vh - 280px);
  min-height: 500px;
}

.ql-editor.ql-blank::before {
  color: var(--ql-blank-color);
}

.ql-snow .ql-stroke,
.ql-snow .ql-stroke-miter {
  stroke: var(--ql-picker-strok-color);
}

.ql-snow .ql-fill,
.ql-snow .ql-stroke.ql-fill {
  fill: var(--ql-picker-strok-color);
}

.ql-snow .ql-picker {
  color: var(--ql-picker-strok-color);
}

.ql-editor {
  line-height: 1.8 !important;
  font-size: 16px;
}

/* Preview Content */
.preview-content {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  height: calc(100vh - 280px);
  overflow-y: auto;
  color: var(--preview-text);
}

/* Preview Header */
.preview-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 10px;
  background: var(--ql-toolbar_bg);
  backdrop-filter: blur(10px);
}

#previewMediaSection {
  margin: 20px 15px 0;
  padding: 10px;
  border-radius: 24px;
  background: var(--preview-bg);
  border: 2px dashed var(--preview-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-media-wrapper {
  position: relative;
  margin-bottom: 30px;
}

/* Hero Image */
.preview-cover-image {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

/* Gallery */
.preview-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.preview-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.preview-gallery img:hover {
  transform: scale(1.02);
}

/* Videos */
.preview-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.preview-video-card {
  overflow: hidden;
  border-radius: 16px;
  background: var(--preview-card-bg);
  border: 1px solid var(--preview-border);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.preview-video-frame {
  width: 100%;
  height: 200px;
  border: 0;
}

/* Typography*/
.preview-content h1 {
  font-family: "Playfair Display", serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.preview-content h2 {
  font-family: "Playfair Display", serif;
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.015em;
}

.preview-content h3 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.preview-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.preview-content p {
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.9;
}

.preview-content p:first-child {
  font-size: 1.125rem;
}

/* Blockquote */
.preview-content blockquote {
  border-left: 4px solid #8b5cf6;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--preview-blockquote-text);
  background: var(--preview-blockquote-bg);
  padding: 1rem 1rem 1rem 1.5rem;
  border-radius: 0 8px 8px 0;
}

/* Lists */
.preview-content ul {
  margin: 1rem 0 1rem 1.5rem;
  list-style-type: disc;
}

.preview-content ol {
  margin: 1rem 0 1rem 1.5rem;
  list-style-type: decimal;
}

.preview-content li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.preview-content li > ul,
.preview-content li > ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Code Blocks */
.preview-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

.preview-content code {
  background: var(--preview-inline-code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  font-size: 0.875rem;
  color: #d946ef;
}

.preview-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Links */
.preview-content a {
  color: #8b5cf6;
  text-decoration: none;
  border-bottom: 1px solid #c4b5fd;
  transition: all 0.2s ease;
}

.preview-content a:hover {
  color: #7c3aed;
  border-bottom-color: #7c3aed;
}

/** Scrollbar*/
.preview-content::-webkit-scrollbar {
  width: 8px;
}

.preview-content::-webkit-scrollbar-track {
  background: transparent;
}

.preview-content::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 50px;
}

.preview-content::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/** Release Note Preview */
#releaseNotePreviewOffcanvas {
  width: 550px;
  right: 20px;
  top: 20px;
  bottom: 20px;
  height: auto;
  border-radius: 16px;
  overflow: hidden;
}

#releaseNotePreviewOffcanvas .offcanvas-body {
  overflow: hidden !important;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#releaseNotePreviewBody {
  min-height: 100%;
  overflow: hidden;
}

#releaseNotePreviewBody .ql-editor {
  padding: 0 !important;
}
