/* Books Popup Styles */
.books-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.books-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.books-popup-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    height: 85%;
    max-height: 800px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 10001;
}

.books-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid #e1e5e9;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.books-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.books-popup-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.books-font-btn {
    background: #4f46e5;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.books-font-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.books-font-btn:active {
    transform: translateY(0);
}

.books-popup-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.books-popup-close:hover {
    background: #e1e5e9;
    color: #333;
}

.books-popup-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.books-text-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    font-size: 16px;
    line-height: 1.8;
    color: #2c3e50;
    white-space: pre-wrap;
    word-wrap: break-word;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.books-text-content::-webkit-scrollbar {
    width: 10px;
}

.books-text-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.books-text-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.books-text-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Place Button Popup */
.books-place-button {
    position: absolute;
    z-index: 10002;
    pointer-events: none;
}

.books-place-btn {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    transition: all 0.2s ease;
    pointer-events: auto;
}

.books-place-btn:hover {
    background: #4338ca;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.5);
    transform: translateY(-1px);
}

.books-place-btn:active {
    transform: translateY(0);
}

/* Continue Reading Button (now "Read") */
.continue-reading-btn {
    background: #065f46;
    color: white;
    border: 1px solid #065f46;
    padding: 10px 20px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.continue-reading-btn:hover {
    background: #064e3b;
    border-color: #064e3b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.3);
}

.continue-reading-btn:active {
    transform: translateY(0);
}

.continue-reading-btn:disabled {
    background: #9ca3af;
    border-color: #9ca3af;
    color: white;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

