/* ===================================
   TAC-GIA.CSS - Trang Tác Giả
   =================================== */

/* ========== PAGE HERO ========== */
.page-hero {
    position: relative;
    min-height: 400px;
    background: linear-gradient(135deg, #6B4423 0%, #8B4513 50%, #A0522D 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMzAgMzBMMCA2MGw2MC02MHoiIGZpbGw9IiNmZmYiIG9wYWNpdHk9IjAuMDUiLz48L3N2Zz4=');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 20px;
    width: 100%;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.page-subtitle {
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    color: #FFF8DC;
    margin-bottom: 30px;
}

/* Search Box */
.search-box {
    max-width: 600px;
    margin: 0 auto 20px;
}

.search-container {
    display: flex;
    background: #fff;
    border-radius: 50px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-family: 'Merriweather', serif;
}

.search-btn {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #6B3410, #B5551E);
    transform: scale(1.05);
}

.hero-stats {
    font-size: 1.1rem;
    color: #FFD700;
    font-weight: 600;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    padding: 60px 20px;
    background: #f8f8f8;
    min-height: 60vh;
}

/* Loading */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #8B4513;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== AUTHORS GRID ========== */
.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.author-card {
    background: #fff;
    border-radius: 15px;
    padding: 30px 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(139, 69, 19, 0.15);
    border-color: #D2691E;
}

.author-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 20px;
    font-family: 'Playfair Display', serif;
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.author-name {
    font-family: 'Crimson Text', serif;
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.author-years {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.author-location {
    color: #8B4513;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.author-style {
    color: #D2691E;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.author-bio {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.author-works-count {
    background: #f0f0f0;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
    display: inline-block;
    margin-top: 10px;
}

/* ========== SEARCH RESULTS ========== */
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

.search-header h3 {
    font-family: 'Playfair Display', serif;
    color: #8B4513;
    font-size: 1.8rem;
}

.btn-back {
    background: #8B4513;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #6B3410;
    transform: translateX(-3px);
}

/* ========== MODAL ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #d9534f;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #c9302c;
    transform: rotate(90deg);
}

/* Modal Body */
.modal-header {
    margin-bottom: 30px;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #8B4513;
    margin-bottom: 15px;
}

.modal-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 1.05rem;
    color: #333;
    font-weight: 600;
}

.modal-section {
    margin: 30px 0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #8B4513;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-bio {
    line-height: 1.8;
    color: #444;
    font-size: 1.05rem;
}

.works-list {
    list-style: none;
    padding: 0;
}

.works-list li {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-left: 4px solid #D2691E;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.works-list li:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.works-list a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.works-list a:hover {
    color: #8B4513;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .search-container {
        flex-direction: column;
        border-radius: 15px;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
        border-radius: 10px;
    }
    
    .authors-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 25px;
    }
    
    .modal-title {
        font-size: 1.8rem;
    }
    
    .modal-meta {
        grid-template-columns: 1fr;
    }
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 10px;
}

.empty-state-hint {
    font-size: 0.95rem;
    color: #999;
}
/* ========================================
   PAGINATION
   ======================================== */

   .authors-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.authors-grid-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--brown-dark, #8B4513);
    background: white;
    color: var(--brown-dark, #8B4513);
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Merriweather', serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    min-width: 40px;
}

.page-btn:hover:not(.active) {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.page-btn.active {
    background: var(--brown-dark, #8B4513);
    color: white;
    font-weight: bold;
}

.page-dots {
    padding: 0.5rem;
    color: #999;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .page-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        min-width: 35px;
    }
}
