:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --light-color: #f8f9fa;
    --dark-color: #333;
    --border-color: #e1e8ed;
    --text-light: #666;
    --error-color: #c53030;
    --success-color: #28a745;
}

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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    padding: 15px;
}

.top-nav {
    position: absolute;
    top: 20px;
    left: 20px;
}

.back-button {
    display: inline-block;
    padding: 8px 15px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.back-button:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(-2px);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5em;
    padding: 30px 20px 10px;
}

h1, h2 {
    font-weight: normal;
}

p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1.1em;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

input[type="text"],
input[type="date"],
input[type="time"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.result-container {
    display: none;
    padding: 30px 40px;
    border-top: 1px solid #eee;
}

.result-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.name-card {
    background: var(--light-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.name-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.name-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
}

.name-score {
    font-size: 1.2em;
    color: var(--primary-color);
    font-weight: bold;
}

.name-details, .name-description {
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    margin-bottom: 8px;
    line-height: 1.5;
}

.detail-label {
    font-weight: 500;
    color: #555;
    min-width: 80px;
}

.detail-value {
    color: #333;
    flex: 1;
}

.name-description {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.loading {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1em;
    padding: 40px;
}

.error-message {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: var(--error-color);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.back-link {
    text-align: center;
    padding: 20px 40px 40px;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: var(--secondary-color);
}

.history-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: var(--text-light);
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 10px;
    }
    
    h1 {
        font-size: 2em;
        padding: 20px 15px 10px;
    }
    
    form, .result-container, .history-container {
        padding: 0 20px 20px;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .name-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .name-score {
        margin-top: 10px;
    }
    
    .top-nav {
        position: static;
        text-align: left;
        padding: 15px 20px 0;
    }
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px;
    color:#faf9f9;
    font-size: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.footer p {
    margin: 0;
    text-align: center;
}