/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f7fa;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 标题样式 */
h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2em;
}

/* 搜索表单样式 */
#searchForm {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.search-bar {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    width: 300px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-bar:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

button[onclick="searchDebt()"] {
    background-color: #3498db;
}

button[onclick="searchDebt()"]:hover {
    background-color: #2980b9;
}

#addRecordBtn {
    background-color: #2ecc71;
}

#addRecordBtn:hover {
    background-color: #27ae60;
}

/* 搜索结果样式 */
.search-result {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.result-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.debtor-name {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.remaining-debt {
    font-size: 1.2em;
    color: #7f8c8d;
}

.amount {
    color: #e74c3c;
    font-weight: bold;
}

/* 还款记录样式 */
.repayment-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.repayment-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.repayment-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.repayment-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.repayment-date {
    color: #34495e;
    font-weight: bold;
    margin-bottom: 10px;
}

.repayment-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.label {
    color: #7f8c8d;
    margin-right: 5px;
}

/* 错误提示样式 */
.no-result, .no-input {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    font-size: 1.1em;
}

.no-result i, .no-input i {
    font-size: 2em;
    margin-bottom: 10px;
    color: #e74c3c;
}

/* 新增记录表单样式 */
form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

form label {
    display: block;
    margin-bottom: 25px;
}

form label span {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 16px;
}

form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

form input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

form button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

form button[type="submit"]:hover {
    background-color: #2980b9;
}

/* 添加返回按钮样式 */
a.button {
    display: inline-block;
    background-color: #95a5a6;
    text-decoration: none;
}

a.button:hover {
    background-color: #7f8c8d;
}

/* 针对不同类型输入框的特殊样式 */
input[type="date"] {
    font-family: inherit;
    color: #2c3e50;
}

input[type="number"] {
    text-align: right;
    padding-right: 25px;
}

input[name="repaymentMethod"] {
    color: #666;
}

/* 提交按钮容器 */
.form-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

.form-buttons button,
.form-buttons a.button {
    min-width: 120px;
    padding: 12px 25px;
} 