/**
 * 전자도서관 스타일
 * 세련된 도록/자료 열람 UI
 */

/* Hero Section */
.library-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.library-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(201,169,98,0.1)" stroke-width="0.5"/></svg>') repeat;
    background-size: 100px 100px;
    animation: float 20s linear infinite;
}

@keyframes float {
    from { background-position: 0 0; }
    to { background-position: 100px 100px; }
}

.library-hero .hero-content {
    position: relative;
    z-index: 1;
}

.library-hero h1 {
    font-size: 2.8rem;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 700;
}

.library-hero h1 i {
    color: #c9a962;
    margin-right: 15px;
}

.library-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* Search Section */
.library-search {
    background: #f8f9fa;
    padding: 40px 0;
    border-bottom: 1px solid #e9ecef;
}

.search-form {
    max-width: 600px;
    margin: 0 auto 20px;
}

.search-box {
    display: flex;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: #c9a962;
    box-shadow: 0 5px 30px rgba(201,169,98,0.15);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 18px 30px;
    font-size: 1rem;
    outline: none;
}

.search-box button {
    background: linear-gradient(135deg, #c9a962 0%, #a68b4a 100%);
    border: none;
    color: #fff;
    padding: 0 30px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.search-box button:hover {
    background: linear-gradient(135deg, #a68b4a 0%, #8a7340 100%);
}

.search-info {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

.search-info strong {
    color: #1a1a2e;
}

.search-result {
    margin-right: 15px;
}

.clear-search {
    color: #c9a962;
    text-decoration: none;
    font-size: 0.9rem;
}

.clear-search:hover {
    text-decoration: underline;
}

/* Library Grid */
.library-grid {
    padding: 60px 0;
    background: #fff;
    min-height: 500px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

/* Book Card */
.book-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.book-cover {
    position: relative;
    padding-top: 140%;
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%);
    overflow: hidden;
}

.book-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

.book-cover .no-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.book-cover .no-cover i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.book-cover .no-cover span {
    font-size: 0.9rem;
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.view-btn {
    background: linear-gradient(135deg, #c9a962 0%, #a68b4a 100%);
    color: #fff;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(20px);
    transition: all 0.3s;
}

.book-card:hover .view-btn {
    transform: translateY(0);
}

.book-info {
    padding: 20px;
}

.book-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-date {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.book-date i {
    color: #c9a962;
}

/* Pagination */
.library-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
}

.page-btn:hover {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}

.page-btn.active {
    background: linear-gradient(135deg, #c9a962 0%, #a68b4a 100%);
    color: #fff;
    border-color: #c9a962;
}

.page-btn.first,
.page-btn.prev,
.page-btn.next,
.page-btn.last {
    background: transparent;
}

/* No Books */
.no-books {
    text-align: center;
    padding: 100px 20px;
    color: #888;
}

.no-books i {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: 20px;
}

.no-books h3 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 10px;
}

.no-books p {
    font-size: 1rem;
}

/* Info Section */
.library-info {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 60px 0;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.info-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 35px 30px;
    text-align: center;
    transition: all 0.3s;
}

.info-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-5px);
}

.info-card i {
    font-size: 2.5rem;
    color: #c9a962;
    margin-bottom: 20px;
}

.info-card h4 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 12px;
}

.info-card p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .library-hero {
        padding: 60px 0;
    }
    
    .library-hero h1 {
        font-size: 2rem;
    }
    
    .library-hero p {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .search-box input {
        padding: 15px 20px;
    }
    
    .search-box button {
        padding: 0 20px;
    }
    
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }
    
    .book-info {
        padding: 15px;
    }
    
    .book-title {
        font-size: 0.9rem;
    }
    
    .library-pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}


