/* 基础样式重置与配置 */
:root {
    --primary-color: #2c6ecb;
    --secondary-color: #f0f5ff;
    --accent-color: #4285f4;
    --text-dark: #1a202c;
    --text-light: #4a5568;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.07);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f8fafc;
    padding-bottom: 80px;
}

/* 导航栏样式 */
.topnav {
    background-color: white;
    padding: 1rem 5%;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topnav .logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.topnav .nav-links {
    display: flex;
    gap: 1.5rem;
}

.topnav a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.topnav a:hover {
    color: var(--primary-color);
}

.topnav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.topnav a:hover:after {
    width: 100%;
}

/* 容器样式 */
.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 5%;
}

/* 卡片组件样式 */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* 标题样式 */
h2, h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.25rem;
}

h2:after, h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.shuru {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background-color: white;
}

.shuru:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 110, 203, 0.1);
}

/* 按钮样式 */
.button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.button:hover {
    background-color: #1e5bb8;
    transform: translateY(-2px);
}

.button:active {
    transform: translateY(0);
}

.button-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.button-secondary:hover {
    background-color: var(--secondary-color);
}

/* 结果展示区 */
.result-section {
    background-color: var(--secondary-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.result-item {
    margin-bottom: 1rem;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item h3 {
    margin-bottom: 0.5rem;
}

/* 借条案例区 */
.iou-example {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    font-family: "SimSun", serif;
    position: relative;
}

.iou-example:before {
    content: '借条模板';
    position: absolute;
    top: -12px;
    left: 2rem;
    background-color: #f8fafc;
    padding: 0 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.iou-content {
    line-height: 2;
    margin: 1rem 0;
    font-size: 1.1rem;
}

.iou-content p {
    margin-bottom: 1rem;
}

.iou-content p:last-child {
    margin-bottom: 0;
}

.iou-content u {
    text-decoration: none;
    border-bottom: 1px solid #333;
    padding: 0 0.25rem;
    margin: 0 0.25rem;
}

/* 示例区 */
.example-section {
    background-color: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--accent-color);
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 1.5rem 5%;
    background-color: white;
    position: fixed;
    bottom: 0;
    width: 100%;
    font-size: 0.875rem;
    color: var(--text-light);
    box-shadow: 0 -2px 4px rgba(0,0,0,0.03);
}

/* 成功页面样式 */
.success-container {
    text-align: center;
    padding: 3rem 5%;
}

.success-icon {
    font-size: 4rem;
    color: #38a169;
    margin-bottom: 1.5rem;
}

.success-message {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .topnav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 5%;
    }
    
    .topnav .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .card, .result-section, .iou-example, .example-section {
        padding: 1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .iou-content {
        font-size: 1rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button {
        width: 100%;
        justify-content: center;
    }
}
