.card {
    box-shadow: none;
    border-radius: 3px;
    border: 1px solid #eee;
    margin-bottom: 2px;
    padding: 2px;
}

.card-title {
    color: #333;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 2px;
    margin-bottom: 3px;
    font-size: 0.75rem;
}

.form-group label {
    font-weight: 500;
    color: #555;
    margin-bottom: 1px;
    display: block;
    font-size: 0.8rem;
}

.progress-container {
    width: 100%;
    height: 40px;
    background-color: #f5f5f5;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.progress-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #333;
    z-index: 10;
}

.progress-bar {
    height: 100%;
    display: flex;
    width: 100%;
}

.lived-age {
    background-color: #28a745; /* 绿色表示已走过的年龄 */
    height: 100%;
    transition: width 0.5s ease;
}

.remaining-age {
    background-color: #dc3545; /* 红色表示剩余的年龄 */
    height: 100%;
    flex-grow: 1;
}

.result-stats {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.stat-item {
    text-align: center;
}

.stat-label {
    color: #666;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    font-weight: 600;
    font-size: 1.1em;
}

.lived {
    color: #28a745;
}

.remaining {
    color: #dc3545;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    transition: all 0.3s ease;
    padding: 6px 12px;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.age-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
    gap: 3px;
    margin: 0;
    width: 100%;
    padding: 5px;
    min-height: calc(100vh - 200px);
    height: 100%;
    overflow: auto;
    box-sizing: border-box;
}

.grid-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1px;
    margin: 2px;
    width: 75px;
    height: 65px;
    border: 1px solid #ddd;
    box-sizing: border-box;
    padding: 1px;
}

.grid-cell {
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
    border: 0.5px solid #eee;
}

.grid-cell.lived {
    background-color: #28a745; /* 已走过的年龄 - 绿色 */
}

.grid-cell.remaining {
    background-color: #dc3545; /* 剩余的年龄 - 红色 */
}

/* 自定义输入框样式 */
#ageForm .form-control {
    height: calc(1.8em + 0.8rem + 2px);
    font-size: 0.8rem;
    line-height: 1.1;
    margin-bottom: 0;
}

/* 自定义按钮样式 */
#ageForm .btn-primary {
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1.9;
}

@media (max-width: 768px) {
    .result-stats {
        flex-direction: column;
    }
    .stat-item {
        margin-bottom: 10px;
    }
}

/* 页面标题样式 */
.container-fluid h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #eee;
}