/* Reading Page - Dark theme matching homepage */

.reading-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
}

/* ── Header ── */

.reading-header {
    align-items: center;
    margin-bottom: 0;
}

.reading-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.back-link {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.back-link:hover {
    color: #e0e0e0;
}

.header-sep {
    color: #2a2d3a;
}

.header-page {
    color: #6b7280;
    font-weight: 500;
    letter-spacing: 0.12em;
}

.header-year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #6b7280;
}

/* ── Divider ── */

.divider {
    border: none;
    border-top: 1px solid #1e2130;
    margin: 1.5rem 0;
}

/* ── Loading & Error ── */

.loading-state {
    text-align: center;
    padding: 4rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #6b7280;
}

.error-state {
    text-align: center;
    padding: 2rem;
    color: #ef4444;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    background-color: rgba(239, 68, 68, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── Hero Stat ── */

.hero-stat {
    padding: 2rem 0 3rem;
}

.hero-number {
    font-family: 'Inter', sans-serif;
    font-size: 7rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.04em;
}

.hero-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0.75rem 0 0;
    letter-spacing: 0.02em;
}

/* ── Currently Reading ── */

.currently-reading-section {
    margin-bottom: 2rem;
}

.cr-card {
    background-color: #1a1d27;
    border: 1px solid #2a2d3a;
    border-radius: 10px;
    padding: 1.5rem;
    transition: border-color 0.2s, background-color 0.2s;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.cr-card:hover {
    border-color: #3a3d4a;
    background-color: #1e2130;
}

.cr-cover {
    width: 80px;
    aspect-ratio: 2 / 3;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background-color: #12141c;
}

.cr-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cr-content {
    flex: 1;
    min-width: 0;
}

.cr-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.cr-card-info {
    flex: 1;
    min-width: 0;
}

.cr-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.35rem;
}

.cr-author {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

/* ── Completed Section ── */

.completed-section {
    min-width: 0;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.book-card {
    background-color: #1a1d27;
    border: 1px solid #2a2d3a;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    transition: border-color 0.2s, background-color 0.2s;
    cursor: pointer;
    min-height: 140px;
}

.book-card:hover {
    border-color: #3a3d4a;
    background-color: #1e2130;
}

.book-cover {
    width: 80px;
    aspect-ratio: 2 / 3;
    align-self: flex-start;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background-color: #12141c;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.book-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #2a2d3a;
    background: linear-gradient(135deg, #12141c 0%, #1a1d27 100%);
}

.book-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.book-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.book-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.book-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.book-badge.badge-high {
    background-color: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.book-badge.badge-mid {
    background-color: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.book-badge.badge-low {
    background-color: rgba(244, 63, 94, 0.15);
    color: #fb7185;
}

.book-author {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: auto;
    padding-bottom: 0.75rem;
}

.book-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.book-rating-dots {
    display: flex;
    gap: 3px;
    align-items: center;
}

.rating-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #2a2d3a;
}

.rating-dot.filled {
    background-color: #6366f1;
    box-shadow: 0 0 4px rgba(99, 102, 241, 0.3);
}

.book-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #6b7280;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* ── Ratings Distribution ── */

.ratings-section {
    margin-top: 1.5rem;
}

.ratings-container {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rating-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #9ca3af;
    width: 2rem;
    text-align: right;
    flex-shrink: 0;
}

.rating-bar-track {
    flex: 1;
    height: 6px;
    background-color: #1a1d27;
    border-radius: 3px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    transition: width 0.8s ease-out;
}

.rating-info {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #6b7280;
    width: 3.5rem;
    text-align: right;
    flex-shrink: 0;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .reading-container {
        padding: 2rem 1.25rem;
    }

    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-number {
        font-size: 5rem;
    }
}

@media (max-width: 480px) {
    .hero-number {
        font-size: 4rem;
    }

    .reading-header-left {
        font-size: 0.7rem;
        gap: 0.5rem;
    }

    .cr-card {
        padding: 1.25rem;
    }

    .cr-title {
        font-size: 1rem;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }
}
