/* Author page styles (UnQbdWeb2) */

/* ==============================================
   NOT FOUND STATE
   ============================================== */

.author-not-found {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7rem 2rem 3rem 2rem;
    background-color: var(--bg-color, #ffffff);
}

.author-not-found-container {
    text-align: center;
    max-width: 500px;
}

.author-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;
}

.author-not-found-title {
    margin: 0 0 1rem 0;
    color: #0f172a;
    font-weight: 900;
    font-size: 2rem;
}

.author-not-found-text {
    margin: 0 0 2rem 0;
    color: #64748b;
    font-size: 1.1rem;
}

.author-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;
}

.author-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
   ============================================== */

.author-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);
}

.author-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: author-spin 0.8s linear infinite;
}

@keyframes author-spin {
    to { transform: rotate(360deg); }
}

.author-loading-text {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
}

/* ==============================================
   PAGE LAYOUT
   ============================================== */

.author-page {
    min-height: 100vh;
    background-color: var(--bg-color, #ffffff);
    padding: 8rem 2rem 4rem 2rem;
}

/* ==============================================
   PROFILE SECTION
   ============================================== */

.author-profile-section {
    max-width: 1400px;
    margin: 0 auto;
}

.author-profile-container {
    display: grid;
    grid-template-columns: 370px 1fr;
    gap: 3.5rem;
    align-items: start;
}

.author-info-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    text-align: center;
    position: sticky;
    top: 6rem;
}

.author-profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.2rem auto;
    display: block;
    box-shadow: 0 4px 16px rgba(0, 180, 255, 0.2);
}

.author-profile-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00b4ff 0%, #0174B1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem auto;
    color: white;
    font-size: 3rem;
}

.author-name {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color, #00b4ff);
    margin: 0 0 1rem 0;
}

.author-social-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.author-social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 180, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color, #00b4ff);
    text-decoration: none;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.author-social-link:hover {
    background: var(--primary-color, #00b4ff);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 180, 255, 0.3);
}

.author-follower-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 180, 255, 0.08);
    border-radius: 20px;
    color: var(--primary-color, #00b4ff);
    font-weight: 600;
    font-size: 0.95rem;
}

.author-follower-count i {
    font-size: 1.1rem;
}

.author-bio {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.6;
    text-align: left;
}

.author-bio p {
    margin-bottom: 0.75rem;
}

.author-bio p:last-child {
    margin-bottom: 0;
}

/* ==============================================
   BOOKS SECTION
   ============================================== */

.author-books-section {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.author-books-title {
    margin: 0 0 2rem 0;
    color: var(--primary-color, #00b4ff);
    font-weight: 900;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-books-title i {
    font-size: 2rem;
}

.author-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.author-book-card {
    cursor: pointer;
    transition: all 0.2s ease-out;
    overflow: visible;
}

.author-book-card:hover {
    transform: translateY(-2px);
}

.author-book-cover-container {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.author-book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.author-book-cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.author-book-hover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    background: linear-gradient(135deg, rgba(0, 180, 255, 0.78), rgba(0, 86, 179, 0.78));
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 10;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.author-book-card:hover .author-book-hover-overlay {
    opacity: 1;
}

.author-book-hover-content {
    width: 100%;
    padding: 1rem;
    color: #fff;
    pointer-events: none;
}

.author-book-hover-title {
    font-weight: 900;
    font-size: 1rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.author-book-hover-category {
    opacity: 0.9;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-book-audio-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 11;
}

.audiobook-badge {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.author-books-empty {
    text-align: center;
    color: #64748b;
    font-size: 1rem;
    padding: 3rem 0;
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */

@media (max-width: 1024px) {
    .author-profile-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .author-info-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .author-page {
        padding: 7rem 1.5rem 3rem 1.5rem;
    }

    .author-books-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .author-page {
        padding: 6.5rem 1rem 2rem 1rem;
    }

    .author-info-card,
    .author-books-section {
        padding: 2rem 1.5rem;
    }

    .author-books-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
}

/* ==============================================
   DARK MODE
   ============================================== */

body.dark-mode .author-page,
body.dark-mode .author-loading,
body.dark-mode .author-not-found {
    background-color: var(--bg-color, #121212);
}

body.dark-mode .author-not-found-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

body.dark-mode .author-not-found-title {
    color: #e2e8f0;
}

body.dark-mode .author-not-found-text,
body.dark-mode .author-loading-text {
    color: #94a3b8;
}

body.dark-mode .author-info-card,
body.dark-mode .author-books-section {
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .author-name,
body.dark-mode .author-books-title {
    color: #4fc3f7;
}

body.dark-mode .author-social-link {
    background: rgba(79, 195, 247, 0.15);
    color: #4fc3f7;
}

body.dark-mode .author-social-link:hover {
    background: #4fc3f7;
    color: #0f172a;
}

body.dark-mode .author-follower-count {
    background: rgba(79, 195, 247, 0.15);
    color: #4fc3f7;
}

body.dark-mode .author-bio {
    color: #b0bec5;
}

body.dark-mode .author-books-empty {
    color: #94a3b8;
}
