* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background: linear-gradient(to right, #e0f7fa, #b5ffb0);
    color: #333;
}

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

header {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e88e5;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 14px;
    font-style: italic;
    color: #546e7a;
    margin-bottom: 15px;
}

.return-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(45deg, #ef5350, #e53935);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.return-btn:hover {
    background: linear-gradient(45deg, #e53935, #b71c1c);
}

.search-section {
    display: flex;
    margin-bottom: 20px;
}

#searchInput {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

#searchInput:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 5px rgba(30,136,229,0.5);
}

#searchButton {
    padding: 10px 20px;
    background: linear-gradient(45deg, #42a5f5, #1e88e5);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s;
}

#searchButton:hover {
    background: linear-gradient(45deg, #1e88e5, #1565c0);
}

.results-section {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    min-height: 300px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.book-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.book-item:last-child {
    border-bottom: none;
}

.book-info {
    flex: 1;
}

.book-id {
    font-weight: bold;
    color: #7f8c8d;
    margin-right: 10px;
}

.book-title {
    font-weight: bold;
}

.borrow-btn {
    background: linear-gradient(45deg, #66bb6a, #43a047);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.borrow-btn:hover {
    background: linear-gradient(45deg, #43a047, #2e7d32);
}

.borrow-btn.borrowed {
    background: linear-gradient(45deg, #ef5350, #e53935);
    cursor: not-allowed;
}

.borrow-btn.borrowed:hover {
    background: linear-gradient(45deg, #e53935, #b71c1c);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.select-container {
    margin: 20px 0;
}

.select-container select,
.select-container input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.select-container input:focus,
.select-container select:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 5px rgba(30,136,229,0.5);
}

.select-container input::placeholder {
    color: #95a5a6;
    opacity: 1;
}

.select-container select:disabled,
.select-container input:disabled {
    background-color: #f5f5f5;
    color: #bdc3c7;
    cursor: not-allowed;
}

.select-container select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237f8c8d'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

#confirmBorrow {
    background: linear-gradient(45deg, #42a5f5, #1e88e5);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
}

#confirmBorrow:hover {
    background: linear-gradient(45deg, #1e88e5, #1565c0);
}

#confirmBorrow:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

#confirmReturn {
    background: linear-gradient(45deg, #ef5350, #e53935);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
}

#confirmReturn:hover {
    background: linear-gradient(45deg, #e53935, #b71c1c);
}

#confirmReturn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.borrow-records {
    max-height: 400px;
    overflow-y: auto;
}

.record-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.3s;
}

.record-item:hover {
    background-color: #f9f9f9;
}

.record-item:last-child {
    border-bottom: none;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .book-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .borrow-btn {
        margin-top: 10px;
        align-self: flex-end;
    }
    
    .select-container select,
    .select-container input {
        padding: 10px 12px;
        font-size: 15px;
    }
    .highlight{
        color:#ff0000;
    }
}