/* responsive design */
@media (max-width: 768px) {
    .header .container {
        padding: 1.5rem;
    }

    .logo {
        font-size: 1rem;
        margin-right: 1rem;
    }

    .logo img {
        width: auto;
        height: em;
    }
    
    .add-book-btn {
        padding: 1rem;
        font-size: 0.875rem;
    }

    .add-book-btn img {
        width: auto;
        height: 1em;   
    }

    .close-btn img {
        width: auto;
        height: 1em;
    }

    .search-box input {
        padding: 1rem 1rem;
    }

    .search-btn {
        margin-left: 1px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-icon img {
        width: auto;
        height: 1.5em; 
    }
    
    .library-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .books-list .book-card {
        flex-direction: column;
        text-align: center;
    }
    
    .books-list .book-cover {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .books-list .book-actions {
        margin-left: 0;
        margin-top: 1rem;
        flex-direction: row;
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        margin: 1rem;
    }
    
    .main {
        padding: 1.5rem 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .search-result {
        flex-direction: column;
        text-align: center;
    }
    
    .search-result img {
        margin: 0 auto 1rem;
    }
}

/* print styles */
@media print {
    .header,
    .filters,
    .view-toggle,
    .book-actions,
    .modal {
        display: none !important;
    }
    
    .books-container {
        display: block !important;
    }
    
    .book-card {
        break-inside: avoid;
        margin-bottom: 1.5rem;
    }
}