/* ============================================
   年龄计算器专用样式
   ============================================ */

/* 计算区域 */
.calculator-section {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calculator-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.input-group label {
    font-weight: 600;
    color: #555;
    min-width: 80px;
}

.input-control {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-control:focus {
    outline: none;
    border-color: #4285f4;
}

.calculate-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.quick-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.quick-btn {
    padding: 8px 20px;
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.quick-btn:hover {
    background-color: #e0e0e0;
}

/* 结果展示区域 */
.result-section {
    margin-bottom: 30px;
}

.result-container {
    background-color: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 结果卡片网格 */
.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.result-card:hover::before {
    opacity: 1;
}

.result-card.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.result-card i {
    font-size: 2.5rem;
    opacity: 0.9;
}

.result-card.primary i {
    color: white;
}

.card-content {
    text-align: center;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.card-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* 详细信息 */
.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.detail-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    transition: background-color 0.2s;
}

.detail-item:hover {
    background-color: #f0f0f0;
}

.detail-item h5 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.detail-item p {
    margin: 0;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .calculator-section {
        padding: 20px;
    }

    .input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group label {
        min-width: auto;
    }

    .input-control {
        width: 100%;
        min-width: auto;
    }

    .calculate-btn {
        width: 100%;
    }

    .result-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .result-card {
        padding: 20px 15px;
    }

    .card-value {
        font-size: 1.5rem;
    }

    .result-card i {
        font-size: 2rem;
    }

    .result-details {
        grid-template-columns: 1fr;
    }

    .result-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .result-cards {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-btn {
        width: 100%;
    }
}
