/* Index Page Specific Styles */

.chapter-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.chapter-list li {
    border: none;
    padding: 0;
}

.chapter-link {
    display: block;
    padding: 1rem;
    background: var(--header-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.chapter-link:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
}

/* Local Bookshelf Styles */
.local-shelf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}

.import-btn {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.import-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.import-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.local-bookshelf {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.book-card {
    background: var(--header-bg);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    box-shadow: var(--shadow);
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.book-cover.placeholder {
    height: 200px;
    background: linear-gradient(135deg, var(--accent-color), #2c3e50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 3rem;
    font-weight: bold;
    font-family: "Noto Serif SC", serif;
}

.book-info {
    padding: 0.8rem;
}

.book-title {
    font-weight: bold;
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.book-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: none;
    gap: 5px;
}

.book-card:hover .book-actions {
    display: flex;
}

.action-btn {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.refresh-btn:hover {
    background: #3498db;
}

.delete-btn:hover {
    background: #e74c3c;
}

/* View Section Styles (Extracted from index.html) */
.view-section {
    display: none;
}

.view-section.active {
    display: block;
}

@media (max-width: 768px) {
    .book-actions {
        display: flex;
        background: rgba(0, 0, 0, 0.3);
        padding: 2px;
        border-radius: 15px;
    }
}