/* Demo page specific styles */

body {
    background: linear-gradient(to bottom, #EBEDFF 0%, #EBEDFF 10%, #ffffff 70%);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 220px;
    background-image: url('image/radial_image_login_top_left.svg');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: -20px;
    right: 0;
    width: 240px;
    height: 240px;
    background-image: url('image/radial_image_login_top_right.svg');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

/* Header */
header {
    background-color: #ffffff;
    background-image:
        radial-gradient(circle at top left, #C5E67380 0%, transparent 20%),
        radial-gradient(circle at top right, #D4B9FB80 0%, transparent 50%);
    padding: 1rem 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    margin-top: 4px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #3C4BFB;
}

.get-started-btn {
    background: linear-gradient(135deg, #3C4BFB 0%, #667eea 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(60, 75, 251, 0.3);
}

.get-started-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(60, 75, 251, 0.4);
}

/* Search Container */
.search-container {
    position: relative;
    flex: 1;
    margin: 0 1rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid rgba(60, 75, 251, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: #3C4BFB;
    box-shadow: 0 4px 12px rgba(60, 75, 251, 0.2);
    background: rgba(255, 255, 255, 1);
}

.search-input::placeholder {
    color: #999;
}

.search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.search-clear:hover {
    background: rgba(60, 75, 251, 0.1);
    color: #3C4BFB;
}

/* No results message */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.no-results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.no-results-text {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

/* Category chips horizontal scroll section */
.category-scroll-section {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-scroll-section::-webkit-scrollbar {
    display: none;
}

.category-chips {
    display: flex;
    gap: 0.75rem;
    padding: 0 1rem;
    white-space: nowrap;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(60, 75, 251, 0.2);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.category-chip:hover {
    border-color: #3C4BFB;
    background: rgba(60, 75, 251, 0.05);
}

.category-chip.active {
    background: linear-gradient(135deg, #3C4BFB 0%, #667eea 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(60, 75, 251, 0.3);
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem 1rem;
}

.book-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    backdrop-filter: blur(10px);
    touch-action: auto;
}

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

.book-cover {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.book-cover.no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.9rem;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
}

.book-info {
    padding: 0.75rem;
}

.book-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.book-author {
    font-size: 0.8rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-meta {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

/* Footer styles */
.app-footer {
    background-color: #ffffff;
    background-image:
        radial-gradient(circle at top left, #3C4BFB4D 0%, transparent 30%),
        radial-gradient(circle at top right, #C5E67380 0%, transparent 50%),
        radial-gradient(circle at bottom left, #D4B9FB80 0%, transparent 50%);
    color: #333;
    padding: 1rem 1rem;
    text-align: center;
    margin-top: 2rem;
    border-radius: 16px;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.app-store-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.store-link {
    display: inline-block;
    transition: transform 0.2s;
}

.store-link:hover {
    transform: scale(1.05);
}

.store-badge {
    height: 50px;
    width: auto;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        /* gap: 0.75rem; */
        padding-left: 0.5rem;
        padding-right: 0;
        max-width: 100%;
        width: 100%;
    }

    .books-grid .book-card {
        min-width: 0;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .header-content {
        gap: 0.75rem;
    }

    .search-container {
        flex: 1;
        margin: 0 0.75rem 0 0rem;
        min-width: 0;
    }

    .search-input {
        font-size: 0.9rem;
        padding: 0.6rem 2rem 0.6rem 0.75rem;
    }

    .get-started-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .header-logo {
        width: 48px;
        height: 48px;
    }
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .category-chip {
        font-size: 1.1rem;
        padding: 0.5rem 1.5rem;
    }

    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 2rem;
    }

    header {
        padding: 1.25rem 1rem;
    }

    .header-logo {
        width: 72px;
        height: 72px;
    }

    .no-results-title {
        font-size: 1.75rem;
    }

    .no-results-text {
        font-size: 1.1rem;
    }

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

    .book-author {
        font-size: 0.85rem;
    }

    .footer-text {
        font-size: 1.4rem;
    }

    .store-badge {
        height: 60px;
    }
}

/* Desktop screens */
@media (min-width: 1024px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 2.5rem;
    }
}
