/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

header {
    background-color: #4a6fa5;
    color: white;
    padding: 1rem;
    text-align: center;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #4a6fa5;
}

main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.test-selection {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.test-selection h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.test-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.test-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.test-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.test-card h3 {
    color: #4a6fa5;
    margin-bottom: 0.5rem;
}

.test-card p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.start-btn {
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.start-btn:hover {
    background-color: #3a5a80;
}

.history-container {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.history-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.history-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 5px;
}

.history-item-content h4 {
    color: #4a6fa5;
    margin-bottom: 0.5rem;
}

.history-item-content p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.view-result-btn {
    background-color: #5cb85c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.view-result-btn:hover {
    background-color: #4cae4c;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.9rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    main {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .test-selection {
        padding: 1rem;
    }
    
    .test-list {
        grid-template-columns: 1fr;
    }
    
    .history-list {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
}