/* Book page styles (UnQbdWeb2) */

/* ==============================================
   NOT FOUND STATE
   ============================================== */

.book-not-found {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7rem 2rem 3rem 2rem;
    background-color: var(--bg-color, #ffffff);
}

.book-not-found-container {
    text-align: center;
    max-width: 500px;
}

.book-not-found-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    color: #ef4444;
    font-size: 3rem;
}

.book-not-found-title {
    margin: 0 0 1rem 0;
    color: #0f172a;
    font-weight: 900;
    font-size: 2rem;
}

.book-not-found-text {
    margin: 0 0 2rem 0;
    color: #64748b;
    font-size: 1.1rem;
}

.book-not-found-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: var(--primary-color, #00b4ff);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.book-not-found-button:hover {
    background: var(--secondary-color, #0174B1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 180, 255, 0.3);
}

/* ==============================================
   LOADING STATE
   ============================================== */

.book-loading {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 7rem 2rem 3rem 2rem;
    background-color: var(--bg-color, #ffffff);
}

.book-loading-spinner {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    border: 5px solid rgba(0, 180, 255, 0.2);
    border-top-color: var(--primary-color, #00b4ff);
    border-radius: 50%;
    animation: book-spin 0.8s linear infinite;
}

@keyframes book-spin {
    to { transform: rotate(360deg); }
}

/* Subtle background zoom for hero (matches HeroBillboard) */
@keyframes heroZoomSlow {
    0% { transform: scale(1.06); }
    100% { transform: scale(1.10); }
}

.book-loading-text {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
}

/* ==============================================
   PAGE LAYOUT
   ============================================== */

.book-page {
    min-height: 100vh;
    background-color: var(--bg-color, #ffffff);
}

/* ==============================================
   HERO SECTION
   ============================================== */

.book-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem 2rem;
    overflow: hidden;
    /* Background will be set via inline style on .book-hero-background */
}

.book-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Lighter gradient overlay for text readability without being too dark */
    background: linear-gradient(90deg,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.15) 45%,
        rgba(0, 0, 0, 0.05) 100%);
    z-index: 1;
}

/* Blurred background image - styled like HeroBillboard */
.book-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* No blur by default - promotional images should be sharp */
    filter: none;
    transform: scale(1.02);
    z-index: 0;
}

/* Only blur if we're showing the cover image as fallback (no promo image) */
.book-hero-background.use-blur {
    filter: blur(30px) saturate(1.3);
    transform: scale(1.08);
    animation: heroZoomSlow 14s ease-in-out both;
}

.book-hero-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    z-index: 2;
}

.book-hero-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
    position: relative;
    z-index: 2;
}

.book-hero-cover {
    position: relative;
}

.book-cover-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.book-hero-details {
    color: white;
}

.book-title {
    margin: 0 0 0.5rem 0;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
}

.book-author {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 0.95;
}

.book-author .author-link {
    color: white;
    text-decoration: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
    padding-bottom: 2px;
}

.book-author .author-link:hover {
    border-bottom-color: white;
    opacity: 1;
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.book-rating-stars {
    display: flex;
    gap: 0.25rem;
    color: #fbbf24;
    font-size: 1.25rem;
}

.book-rating-text {
    font-size: 0.95rem;
    opacity: 0.9;
}

.book-hero-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.book-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
}

.book-stat i.bi {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Icon colors for different stat types - more specific selectors */
.book-stat i.bi-people-fill {
    color: #60a5fa !important; /* Blue for followers */
}

.book-stat i.bi-star-fill {
    color: #fbbf24 !important; /* Gold for reviews */
}

.book-stat i.bi-clock-fill {
    color: #a78bfa !important; /* Purple for audiobook time */
}

.book-description-short {
    margin: 0 0 2rem 0;
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.95;
}

.book-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.book-action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.book-action-primary {
    background: white;
    color: var(--primary-color, #00b4ff);
}

.book-action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

.book-action-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.book-action-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.book-action-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.book-action-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.book-info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.book-info-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* ==============================================
   CONTENT SECTIONS
   ============================================== */

.book-content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.book-section {
    margin-bottom: 2rem;
}

.book-section-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    border: 1px solid rgba(2, 6, 23, 0.08);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.08);
    padding: 2.5rem 2rem;
}

.book-section-title {
    margin: 0 0 1.5rem 0;
    color: var(--primary-color, #00b4ff);
    font-weight: 900;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.book-section-title i {
    font-size: 2rem;
}

/* ==============================================
   DESCRIPTION
   ============================================== */

.book-description-full {
    color: #334155;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.book-description-full p {
    margin-bottom: 1rem;
}

.book-description-full p:last-child {
    margin-bottom: 0;
}

/* ==============================================
   METADATA
   ============================================== */

.book-metadata {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(2, 6, 23, 0.08);
}

.book-metadata-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.book-metadata-item i {
    color: var(--primary-color, #00b4ff);
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.book-metadata-label {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-metadata-value {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 600;
}

/* ==============================================
   REVIEWS
   ============================================== */

.book-reviews {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.book-review-button {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #fbbf24;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.book-review-button:hover {
    background: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.book-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.book-review-item {
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(2, 6, 23, 0.06);
}

.book-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.book-review-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.book-review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color, #00b4ff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.book-review-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.book-review-username {
    color: #0f172a;
    font-weight: 700;
    font-size: 0.95rem;
}

.book-review-date {
    color: #64748b;
    font-size: 0.85rem;
}

.book-review-rating {
    display: flex;
    gap: 0.25rem;
    color: #fbbf24;
    font-size: 1rem;
}

.book-review-text {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

.book-reviews-empty {
    text-align: center;
    color: #64748b;
    font-size: 1rem;
    padding: 2rem 0;
}

/* ==============================================
   ACCESS CARD
   ============================================== */

.book-access-card {
    background: linear-gradient(135deg, var(--primary-color, #00b4ff) 0%, var(--secondary-color, #0174B1) 100%);
    color: white;
    text-align: center;
}

.book-access-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
}

.book-access-content i {
    font-size: 3rem;
    opacity: 0.9;
}

.book-access-title {
    margin: 0;
    color: white;
    font-weight: 900;
    font-size: 2rem;
}

.book-access-text {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
}

.book-access-button {
    margin-top: 1rem;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--primary-color, #00b4ff);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.book-access-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

/* ==============================================
   PURCHASE LINKS
   ============================================== */

.book-purchase-divider {
    margin: 2rem 0 1.5rem 0;
    text-align: center;
    position: relative;
}

.book-purchase-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.book-purchase-divider span {
    position: relative;
    background: var(--primary-color, #00b4ff);
    padding: 0 1rem;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

.book-purchase-title {
    margin: 0 0 1rem 0;
    color: white;
    font-weight: 800;
    font-size: 1.3rem;
    text-align: center;
}

.book-purchase-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    justify-items: center;
}

.book-purchase-link {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 60px;
    max-width: 600px;
    width: 100%;
}

.book-purchase-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.purchase-retailer {
    font-weight: 700;
}

.purchase-format {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.9;
}

.purchase-price {
    text-align: right;
    font-weight: 700;
    font-size: 1.1rem;
}

.book-purchase-link i {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* ==============================================
   NOTICE
   ============================================== */

.book-notice {
    margin: 2rem auto 0 auto;
    max-width: 800px;
    padding: 1rem 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.book-notice i {
    color: #3b82f6;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.book-notice p {
    margin: 0;
    color: #1e40af;
    font-size: 0.9rem;
    line-height: 1.5;
}

.book-notice strong {
    font-weight: 700;
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */

@media (max-width: 900px) {
    .book-hero {
        padding: 7rem 1.5rem 3rem 1.5rem;
    }

    .book-hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .book-hero-cover {
        max-width: 250px;
        margin: 0 auto;
    }

    .book-hero-details {
        text-align: center;
    }

    .book-hero-actions {
        justify-content: center;
    }

    .book-info-pills {
        justify-content: center;
    }

    .book-content-container {
        padding: 2rem 1.5rem;
    }

    .book-section-card {
        padding: 2rem 1.5rem;
    }

    .book-metadata {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .book-hero {
        padding: 6.5rem 1rem 2rem 1rem;
        min-height: auto;
    }

    .book-content-container {
        padding: 2rem 1rem;
    }

    .book-section-card {
        padding: 1.5rem 1rem;
    }

    .book-title {
        font-size: 1.75rem;
    }

    .book-author {
        font-size: 1.1rem;
    }

    .book-action-button {
        width: 100%;
        justify-content: center;
    }

    .book-hero-actions {
        width: 100%;
    }

    .book-purchase-links {
        grid-template-columns: 1fr;
    }

    .book-purchase-link {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }

    .purchase-retailer,
    .purchase-format,
    .purchase-price {
        text-align: center;
    }
}

/* ==============================================
   DARK MODE
   ============================================== */

/* Page background */
body.dark-mode .book-page,
body.dark-mode .book-loading,
body.dark-mode .book-not-found {
    background-color: var(--bg-color, #121212);
}

/* Not found */
body.dark-mode .book-not-found-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

body.dark-mode .book-not-found-title {
    color: #e2e8f0;
}

body.dark-mode .book-not-found-text,
body.dark-mode .book-loading-text {
    color: #94a3b8;
}

/* Hero section - keep gradient vibrant */
body.dark-mode .book-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
}

body.dark-mode .book-hero-overlay {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9) 0%, rgba(49, 46, 129, 0.85) 100%);
}

/* Cards */
body.dark-mode .book-section-card {
    background: rgba(30, 41, 59, 0.72);
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}

/* Text colors */
body.dark-mode .book-section-title {
    color: #4fc3f7;
}

body.dark-mode .book-description-full,
body.dark-mode .book-review-text {
    color: #b0bec5;
}

body.dark-mode .book-metadata-value,
body.dark-mode .book-review-username {
    color: #e2e8f0;
}

body.dark-mode .book-metadata-label,
body.dark-mode .book-review-date,
body.dark-mode .book-reviews-empty {
    color: #94a3b8;
}

/* Buttons */
body.dark-mode .book-action-primary {
    background: #4fc3f7;
    color: #0f172a;
}

body.dark-mode .book-action-primary:hover {
    box-shadow: 0 8px 20px rgba(79, 195, 247, 0.3);
}

body.dark-mode .book-review-button {
    background: #fbbf24;
}

body.dark-mode .book-review-button:hover {
    background: #f59e0b;
}

/* Review items */
body.dark-mode .book-review-item {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .book-review-avatar {
    background: #4fc3f7;
    color: #0f172a;
}

/* Access card - keep gradient vibrant */
body.dark-mode .book-access-card {
    background: linear-gradient(135deg, #4fc3f7 0%, #2196f3 100%);
}

body.dark-mode .book-access-button {
    background: #0f172a;
    color: #4fc3f7;
}

body.dark-mode .book-access-button:hover {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.5);
}

/* Purchase section */
body.dark-mode .book-purchase-divider::before {

    background: rgba(79, 195, 247, 0.3);
}

body.dark-mode .book-purchase-divider span {
    background: #0f172a;
    color: #4fc3f7;
}

body.dark-mode .book-purchase-title {
    color: #e2e8f0;
}

body.dark-mode .book-purchase-link {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .book-purchase-link:hover {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(79, 195, 247, 0.4);
}

/* Dark mode for hero stats icons */
body.dark-mode .book-stat i.bi-people-fill {
    color: #93c5fd !important; /* Lighter blue for dark mode */
}

body.dark-mode .book-stat i.bi-star-fill {
    color: #fcd34d !important; /* Lighter gold for dark mode */
}

body.dark-mode .book-stat i.bi-clock-fill {
    color: #c4b5fd !important; /* Lighter purple for dark mode */
}

/* Notice */
body.dark-mode .book-notice {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

body.dark-mode .book-notice i {
    color: #60a5fa;
}

body.dark-mode .book-notice p {
    color: #93c5fd;
}

/* Follow button states */
.book-action-following {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    border: 2px solid #16a34a;
}

.book-action-following:hover {
    background: rgba(34, 197, 94, 0.3);
}

/* Step 3: Follow Author button */
.book-author-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.book-follow-author-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.book-follow-author-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.book-follow-author-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.book-follow-author-button.following {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
    color: #22c55e;
}

.book-follow-author-button.following:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.7);
}

/* Step 3: Dark mode for follow author button */
body.dark-mode .book-follow-author-button {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .book-follow-author-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .book-follow-author-button.following {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
}

body.dark-mode .book-follow-author-button.following:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.6);
}

/* Reading Progress Bar */
.book-reading-progress {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin-bottom: 1rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-label {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.progress-percentage {
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    transition: width 0.3s ease;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.5);
}

.progress-text {
    margin: 0;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-text i {
    font-size: 1rem;
    color: #22c55e;
}

/* Rating Form */
.book-rating-form {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.book-rating-form h3 {
    margin: 0 0 1.25rem 0;
    color: #0f172a;
    font-weight: 800;
    font-size: 1.5rem;
}

.rating-stars-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: flex-start;
}

.rating-stars-input i {
    cursor: pointer;
    transition: all 0.2s ease;
}

.rating-stars-input i:hover {
    transform: scale(1.2);
}

.rating-review-text {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 1rem;
}

.rating-review-text:focus {
    outline: none;
    border-color: var(--primary-color, #00b4ff);
    box-shadow: 0 0 0 3px rgba(0, 180, 255, 0.1);
}

.rating-form-actions {
    display: flex;
    gap: 1rem;
}

.btn-submit-rating,
.btn-cancel-rating {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit-rating {
    background: #fbbf24;
    color: white;
}

.btn-submit-rating:hover:not(:disabled) {
    background: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.btn-submit-rating:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-cancel-rating {
    background: transparent;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.btn-cancel-rating:hover {
    background: rgba(0, 0, 0, 0.05);
}

.user-rated-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    color: #16a34a;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.user-rated-message i {
    font-size: 1.5rem;
}

/* Step 5: User's existing rating display */
.user-existing-rating {
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    border: 2px solid rgba(0, 180, 255, 0.2);
    margin-bottom: 1.5rem;
}

.existing-rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.existing-rating-header h4 {
    margin: 0;
    color: #0f172a;
    font-weight: 700;
    font-size: 1.1rem;
}

.btn-edit-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color, #00b4ff);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit-rating:hover {
    background: var(--secondary-color, #0174B1);
    transform: translateY(-1px);
}

.existing-rating-stars {
    display: flex;
    gap: 0.25rem;
    color: #fbbf24;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.existing-rating-text {
    margin: 0 0 0.5rem 0;
    color: #334155;
    font-size: 1rem;
    line-height: 1.6;
}

.existing-rating-date {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
}

body.dark-mode .user-rated-message {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

/* Step 5: Dark mode for existing rating display */
body.dark-mode .user-existing-rating {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(79, 195, 247, 0.3);
}

body.dark-mode .existing-rating-header h4 {
    color: #e2e8f0;
}

body.dark-mode .btn-edit-rating {
    background: #4fc3f7;
    color: #0f172a;
}

body.dark-mode .btn-edit-rating:hover {
    background: #29b6f6;
}

body.dark-mode .existing-rating-text {
    color: #cbd5e1;
}

body.dark-mode .existing-rating-date {
    color: #94a3b8;
}

/* Step 6: Dark mode for reading progress */
body.dark-mode .book-reading-progress {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(79, 195, 247, 0.3);
}

body.dark-mode .progress-bar-container {
    background: rgba(0, 0, 0, 0.5);
}

body.dark-mode .progress-bar {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.6);
}

body.dark-mode .progress-text i {
    color: #22c55e;
}
