body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

header {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    position: relative;
    backdrop-filter: blur(5px);
}

#backBtn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    margin-right: 15px;
}

header h1 {
    margin: 0;
    flex-grow: 1;
    text-align: center;
}

.search-container {
    padding: 15px;
    background-color: white;
    display: flex;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#searchInput {
    flex-grow: 1;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

#searchBtn {
    padding: 8px 15px;
    background-color: #4a76a8;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.novel-table-container {
    margin: 20px;
    overflow-x: auto;
    padding-bottom: 250px; /* 新增：为购物车预留空间 */
}

#novelTable {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

#novelTable th, #novelTable td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#novelTable th {
    background-color: #4a76a8;
    color: white;
}

#novelTable tr:hover {
    background-color: #f1f1f1;
}

.novel-title {
    color: #4a76a8;
    cursor: pointer;
    text-decoration: underline;
}

.novel-title:hover {
    color: #2a5680;
}

.cart-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 15px;
    max-height: 70vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 100;
    border-radius: 10px 10px 0 0;
}

.cart-container.show {
    transform: translateY(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cart-header h3 {
    margin: 0;
}

#clearCart {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-items {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-remove {
    color: #ff6b6b;
    cursor: pointer;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

#checkDiscount {
    background-color: #4a76a8;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.quote-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    padding: 20px;
    z-index: 200;
    overflow-y: auto;
    display: none;
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#closeQuote {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.payment-methods {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.payment-methods label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.quote-summary {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quote-summary div {
    margin-bottom: 8px;
}

.payment-price {
    font-weight: bold;
    font-size: 18px;
    color: #4a76a8;
}

.quote-items {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quote-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.quote-item:last-child {
    border-bottom: none;
}

.quote-form {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

#userEmail {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#generateQuote {
    background-color: #4a76a8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.contact-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    display: none;
}

@media (max-width: 768px) {
    #novelTable th, #novelTable td {
        padding: 8px 10px;
    }
    
    .payment-methods {
        flex-direction: column;
        gap: 8px;
    }
    
    .novel-table-container {
        padding-bottom: 300px; /* 移动端增加更多底部空间 */
    }
}

.discount-tip {
    color: #ff6b6b !important;
    font-size: 14px;
    margin-top: 5px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid #ff6b6b;
}