.ql-editor {
  min-height: 400px;
}
.ql-font-roboto {
  font-family: 'Roboto', sans-serif;
}
.ql-font-open-sans {
  font-family: 'Open Sans', sans-serif;
}
.ql-font-lato {
  font-family: 'Lato', sans-serif;
}
.ql-font-montserrat {
  font-family: 'Montserrat', sans-serif;
}
.ql-font-poppins {
  font-family: 'Poppins', sans-serif;
}
.ql-font-raleway {
  font-family: 'Raleway', sans-serif;
}
.ql-font-ubuntu {
  font-family: 'Ubuntu', sans-serif;
}
.ql-font-nunito {
  font-family: 'Nunito', sans-serif;
}
.ql-font-merriweather {
  font-family: 'Merriweather', serif;
}
.ql-font-playfair {
  font-family: 'Playfair Display', serif;
}
.ql-font-pt-sans {
  font-family: 'PT Sans', sans-serif;
}
.ql-font-oswald {
  font-family: 'Oswald', sans-serif;
}
.ql-font-inter {
  font-family: 'Inter', sans-serif;
}
.ql-font-source-sans {
  font-family: 'Source Sans Pro', sans-serif;
}
.ql-font-noto-sans {
  font-family: 'Noto Sans', sans-serif;
}
.ql-font-work-sans {
  font-family: 'Work Sans', sans-serif;
}
.ql-font-quicksand {
  font-family: 'Quicksand', sans-serif;
}
.ql-font-crimson {
  font-family: 'Crimson Text', serif;
}
.ql-font-libre {
  font-family: 'Libre Baskerville', serif;
}
.ql-font-rubik {
  font-family: 'Rubik', sans-serif;
}
.ql-font-karla {
  font-family: 'Karla', sans-serif;
}
.ql-font-dosis {
  font-family: 'Dosis', sans-serif;
}
.ql-font-josefin {
  font-family: 'Josefin Sans', sans-serif;
}
.ql-font-cabin {
  font-family: 'Cabin', sans-serif;
}
.ql-font-bitter {
  font-family: 'Bitter', serif;
}
.ql-font-anton {
  font-family: 'Anton', sans-serif;
}
.ql-font-bebas {
  font-family: 'Bebas Neue', sans-serif;
}
.ql-font-pacifico {
  font-family: 'Pacifico', cursive;
}
.ql-font-dancing {
  font-family: 'Dancing Script', cursive;
}
.ql-font-shadows {
  font-family: 'Shadows Into Light', cursive;
}

.book-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-right: 60px;
}

.book-content p {
    position: relative;
    padding: 10px 0;
    line-height: 1.8;
    transition: background-color 0.2s;
}

.book-content p:hover {
    background-color: #f8f9fa;
    border-radius: 4px;
}

.comment-icon {
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 1;
    transition: all 0.2s;
}

.book-content p:hover .comment-icon {
    opacity: 0.7;
}

.comment-icon:hover {
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.1);
}

.comment-icon i {
    font-size: 20px;
    color: #0b005d;
    transition: color 0.2s;
}

.comment-icon:hover i {
    color: #007bff;
}

.comment-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.comment-count.hidden {
    display: none;
}

.book-content p.active {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding-left: 10px;
}

.comment-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    justify-content: center;
    align-items: center;
}

.comment-modal-overlay.open {
    display: flex;
}

.comment-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-modal-header h5 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.comment-modal-header .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s;
}

.comment-modal-header .close-btn:hover {
    color: #dc3545;
}

.comment-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    max-height: 400px;
}

.selected-paragraph {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
    font-style: italic;
    color: #555;
    font-size: 14px;
    max-height: 80px;
    overflow: hidden;
}

.comments-list {
    margin-bottom: 20px;
}

.no-comments {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.comment-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.comment-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: #007bff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.comment-date {
    font-size: 12px;
    color: #999;
}

.comment-text {
    color: #333;
    line-height: 1.6;
}

.comment-modal-footer {
    padding: 20px;
    border-top: 1px solid #dee2e6;
}

.comment-form .form-group {
    margin-bottom: 12px;
}

.comment-form label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #007bff;
}

.comment-form textarea {
    resize: none;
}

.comment-form button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    width: 100%;
}

.comment-form button:hover {
    background: #0056b3;
}

.comment-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading-spinner i {
    font-size: 24px;
    color: #007bff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}