/* General Body & Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.main-header {
    padding: 20px 0;
    border-bottom: 1px solid #eaeaea;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: #4a4a4a;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #007aff;
}

/* Profile Section */
.profile-section {
    padding: 60px 0;
    text-align: center;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid #eaeaea;
}

.profile-section h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.tagline {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

.bio {
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-link:hover {
    color: #007aff;
}

.social-link svg {
    width: 24px;
    height: 24px;
}

/* Featured Links / Content Section */
.content-section {
    padding: 40px 0;
    border-top: 1px solid #eaeaea;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

.featured-links-grid {
    display: grid;
    gap: 25px;
}

.featured-link-card {
    background-color: #f9f9f9;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.featured-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.featured-link-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007aff;
}

.featured-link-icon svg {
    width: 28px;
    height: 28px;
}

.featured-link-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.featured-link-desc {
    font-size: 0.95rem;
    color: #666;
}

/* Footer */
.main-footer {
    padding: 40px 0;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid #eaeaea;
    margin-top: 40px;
}

/* Books Page Specific Styles */
.page-header {
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header .subtitle {
    font-size: 1.2rem;
    color: #666;
}

/* Book Controls */
.book-controls {
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
}

.search-container {
    flex-grow: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.filter-sort-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-buttons button,
.sort-select {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.filter-buttons button.active {
    background-color: #007aff;
    color: #fff;
    border-color: #007aff;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.book-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid #eaeaea;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.book-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.book-info {
    padding: 15px;
}

.book-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
}

.book-author {
    font-size: 0.9rem;
    color: #666;
}

.book-category {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
}

.book-category.read { background-color: #34c759; }
.book-category.want-to-read { background-color: #ff9500; }

/* Loading, Empty, Error States */
.loading-indicator, .empty-state, .error-message {
    text-align: center;
    padding: 50px 20px;
    color: #666;
}

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #007aff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 15px;
    }

    .profile-section h1, .page-header h1 {
        font-size: 2rem;
    }

    .book-controls {
        flex-direction: column;
        align-items: stretch;
    }
}