
.quill-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.02),
    0 8px 32px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.quill-wrapper:focus-within {
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.02),
    0 12px 48px rgba(88, 130, 255, 0.10),
    0 0 0 2px rgba(88, 130, 255, 0.15);
}

.ql-toolbar.ql-snow {
  background: transparent !important;
  padding: 0;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid #ebebeb !important;
}

.ql-toolbar.ql-snow .ql-formats {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-right: 4px;
  padding: 4px 6px;
  border-radius: 12px;
}

.ql-toolbar.ql-snow button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #3d4a5c;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.ql-toolbar.ql-snow button svg {
  width: 18px;
  height: 18px;
}

.ql-toolbar.ql-snow button:hover {
  background: rgba(88, 130, 255, 0.08);
  color: #4a7aff;
  transform: translateY(-1px);
}

.ql-toolbar.ql-snow button:active {
  transform: scale(0.94);
}

.ql-toolbar.ql-snow button.ql-active {
  background: linear-gradient(135deg, #587aff, #4a6cf7);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(88, 130, 255, 0.30);
}

.ql-toolbar.ql-snow button.ql-active .ql-stroke {
  stroke: #ffffff;
}

.ql-toolbar.ql-snow button.ql-active .ql-fill {
  fill: #ffffff;
}

.ql-toolbar.ql-snow select {
  height: 34px;
  padding: 0 32px 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.02) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 4.5L11 1' stroke='%236b7b8f' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size: 12px 7px;
  font-size: 13px;
  font-weight: 450;
  color: #1e293b;
  appearance: none;
  -webkit-appearance: none;
  transition: all 0.2s ease;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.ql-toolbar.ql-snow select:hover {
  background-color: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.10);
}

.ql-toolbar.ql-snow select:focus {
  border-color: #587aff;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(88, 130, 255, 0.10);
  outline: none;
}

.ql-toolbar.ql-snow .ql-color-picker,
.ql-toolbar.ql-snow .ql-icon-picker {
    width: 35px;
    height: 30px;
}

.ql-toolbar.ql-snow .ql-color-picker .ql-picker-label,
.ql-toolbar.ql-snow .ql-icon-picker .ql-picker-label {
  border-radius: 10px;
  padding: 0 5px !important; 
  min-width: 30px !important;  
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.ql-toolbar.ql-snow .ql-color-picker .ql-picker-label:hover,
.ql-toolbar.ql-snow .ql-icon-picker .ql-picker-label:hover {
  background: rgba(88, 130, 255, 0.08);
  border-color: rgba(88, 130, 255, 0.20);
}
.ql-toolbar.ql-snow .ql-color-picker.ql-expanded .ql-picker-label,
.ql-toolbar.ql-snow .ql-icon-picker.ql-expanded .ql-picker-label {
  border-color: #587aff;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(88, 130, 255, 0.10);
}

.ql-toolbar.ql-snow .ql-color-picker .ql-picker-label .ql-color-label {
  width: 20px !important;   
  height: 20px !important;  
  border-radius: 6px !important;
  border: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.ql-toolbar.ql-snow .ql-color-picker .ql-picker-options,
.ql-toolbar.ql-snow .ql-icon-picker .ql-picker-options {
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  background: #ffffff !important;
  padding: 12px 14px !important;  
  -webkit-backdrop-filter: blur(12px);
  min-width: 220px !important;    
  max-height: 320px !important;  
  overflow-y: auto;
}

.ql-toolbar.ql-snow .ql-color-picker .ql-picker-options .ql-picker-item {
  width: 28px !important;    
  height: 28px !important;   
  border-radius: 8px !important;
  margin: 4px !important;    
  border: 2px solid transparent !important;
  transition: all 0.15s ease;
  display: inline-block;
  cursor: pointer;
}

.ql-toolbar.ql-snow .ql-color-picker .ql-picker-options .ql-picker-item:hover {
  transform: scale(1.12);
  border-color: rgba(88, 130, 255, 0.30) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ql-toolbar.ql-snow .ql-color-picker .ql-picker-options .ql-picker-item.ql-selected {
  border-color: #587aff !important;
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(88, 130, 255, 0.15);
}

.ql-toolbar.ql-snow .ql-icon-picker .ql-picker-options .ql-picker-item {
  padding: 8px 14px !important;  
  border-radius: 8px !important;
  font-size: 14px !important;
  transition: all 0.15s ease;
}

.ql-toolbar.ql-snow .ql-icon-picker .ql-picker-options .ql-picker-item:hover {
  background: rgba(88, 130, 255, 0.08);
}

.ql-toolbar.ql-snow .ql-color-picker .ql-picker-options::-webkit-scrollbar,
.ql-toolbar.ql-snow .ql-icon-picker .ql-picker-options::-webkit-scrollbar {
  width: 4px;
}

.ql-toolbar.ql-snow .ql-color-picker .ql-picker-options::-webkit-scrollbar-track {
  background: transparent;
}

.ql-toolbar.ql-snow .ql-color-picker .ql-picker-options::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
}

.ql-toolbar.ql-snow .ql-color-picker .ql-picker-label::after,
.ql-toolbar.ql-snow .ql-icon-picker .ql-picker-label::after {
  font-size: 14px !important;  
  color: #8a9aa8;
  margin-left: 2px;
}


.ql-toolbar.ql-snow .ql-separator {
  width: 1px;
  height: 28px;
  background: rgba(0, 0, 0, 0.06);
  margin: 0 4px;
}

.ql-container.ql-snow {
  border: none !important;
  border-radius: 0 0 20px 20px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: #0f172a;
  background: #ffffff;
}

.ql-editor {
  padding: 10px;
  min-height: 280px;
  outline: none;
  overflow-y: auto;
}

.ql-editor::-webkit-scrollbar {
  width: 4px;
}

.ql-editor::-webkit-scrollbar-track {
  background: transparent;
}

.ql-editor::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.10);
  border-radius: 10px;
}

.ql-editor::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.18);
}

.ql-editor h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 1.4em 0 0.5em;
  color: #0a0f1a;
  background: linear-gradient(135deg, #0a0f1a 60%, #2d3a52);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ql-editor h2 {
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 1.2em 0 0.4em;
  color: #0f1a2e;
}

.ql-editor h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin: 1em 0 0.35em;
  color: #172338;
}

.ql-editor p {
  margin: 0 0 0.75em 0;
}

.ql-editor p:last-child {
  margin-bottom: 0;
}

.ql-editor ul,
.ql-editor ol {
  padding-left: 1.8em;
  margin: 0.4em 0 0.8em;
}

.ql-editor li {
  margin-bottom: 0.2em;
  padding-left: 0.2em;
}

.ql-editor li::marker {
  color: #587aff;
}

.ql-editor blockquote {
  border-left: 4px solid #587aff;
  background: linear-gradient(135deg, rgba(88, 130, 255, 0.04), rgba(88, 130, 255, 0.01));
  padding: 0.8em 1.6em;
  margin: 1em 0;
  border-radius: 0 12px 12px 0;
  color: #1e2a44;
  font-style: italic;
}

.ql-editor pre {
  background: #f1f4f9;
  border-radius: 14px;
  padding: 1.2em 1.6em;
  font-family: "SF Mono", "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.88em;
  line-height: 1.7;
  overflow-x: auto;
  margin: 1em 0;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.ql-editor code {
  font-family: "SF Mono", "JetBrains Mono", monospace;
  background: rgba(88, 130, 255, 0.06);
  padding: 0.1em 0.5em;
  border-radius: 6px;
  font-size: 0.85em;
  color: #c7254e;
}

.ql-editor pre code {
  background: transparent;
  padding: 0;
  color: #1e293b;
  font-size: 0.95em;
}

.ql-editor a {
  color: #4a6cf7;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 2px solid rgba(74, 108, 247, 0.15);
  transition: border-color 0.2s ease;
}

.ql-editor a:hover {
  border-bottom-color: #4a6cf7;
}

.ql-editor img {
  max-width: 100%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  margin: 0.6em 0;
}

.ql-editor table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  font-size: 0.92em;
  border-radius: 12px;
  overflow: hidden;
}

.ql-editor td,
.ql-editor th {
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 10px 16px;
  text-align: left;
}

.ql-editor th {
  background: rgba(0, 0, 0, 0.02);
  font-weight: 600;
}

.ql-editor.ql-blank::before {
  color: rgba(0, 0, 0, 0.20);
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.01em;
  left: 24px;
  right: 24px;
}

.ql-editor ::selection {
  background: rgba(88, 130, 255, 0.18);
  color: #0a0f1a;
}

@media (max-width: 640px) {
  .ql-toolbar.ql-snow {
    padding: 0;
  }
  
  .ql-toolbar.ql-snow button {
    width: 35px;
    height: 30px;
    padding: 0;
  }
  
  .ql-toolbar.ql-snow button svg {
    width: 16px;
    height: 16px;
  }
  
  .ql-toolbar.ql-snow .ql-color-picker .ql-picker-label,
  .ql-toolbar.ql-snow .ql-icon-picker .ql-picker-label {
    min-width: 30px !important;
    padding: 0 5px !important;
  }
  
  .ql-toolbar.ql-snow .ql-color-picker .ql-picker-label .ql-color-label {
    width: 18px !important;
    height: 18px !important;
  }
  
  .ql-toolbar.ql-snow .ql-color-picker .ql-picker-options {
    min-width: 180px !important;
    padding: 10px 10px !important;
  }
  
  .ql-toolbar.ql-snow .ql-color-picker .ql-picker-options .ql-picker-item {
    width: 24px !important;
    height: 24px !important;
    margin: 3px !important;
  }
  
  .ql-editor {
    padding: 12px 10px 10px 10px;
    min-height: 200px;
    font-size: 15px;
  }
  
  .ql-editor.ql-blank::before {
    left: 16px;
    right: 16px;
  }
  
  .ql-editor h1 {
    font-size: 1.6rem;
  }
  
  .ql-editor h2 {
    font-size: 1.3rem;
  }
}