/* style.css */
body {
    /* 移除原有的背景色 */
    /* background-color: #f8f9fa; */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 添加背景图片 */
    background-image: url('https://img.kexig.cn/bing/api.php?random=1');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.card {
    border: none;
    border-radius: 20px; /* 增加圆角 */
    transition: all 0.3s ease;
    overflow: hidden;
    /* 降低透明度 */
    background-color: rgba(255, 255, 255, 0.7);
    /* 添加 backdrop-filter 增强效果 */
    backdrop-filter: blur(5px);
}

.card:hover {
    transform: translateY(-5px); /* 卡片悬停上浮效果 */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); /* 增强阴影 */
}

.card-header {
    border-radius: 20px 20px 0 0 !important;
    background: linear-gradient(135deg, #007bff, #0056b3); /* 渐变背景 */
    padding: 1.5rem;
    border: none;
}

.card-header h2 {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 2rem;
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border-radius: 12px; /* 增加输入框圆角 */
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1); /* 焦点发光效果 */
    outline: none;
}

.form-control:hover {
    border-color: #007bff;
}

.btn {
    border-radius: 12px; /* 增加按钮圆角 */
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(108, 117, 125, 0.3);
}

/* 按钮点击波纹效果 */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* 统计区样式 */
.stat-container {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 25%, #fad0c4 50%, #a18cd1 75%, #fbc2eb 100%);
    background-size: 400% 400%;
    color: #333;
    text-align: center;
    border-radius: 50px; /* 高圆润度 */
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
    width: fit-content;
    padding: 0.5rem 1.5rem; /* 垂直内边距减少，仅比文字高度多一点 */
    animation: gradientMove 8s ease infinite, pulse 3s infinite;
    margin: 0 auto; /* 左右居中 */
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
}

.stat-container:hover {
    transform: scale(1.05); /* 鼠标悬停放大 */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    animation: gradientMove 8s ease infinite; /* 悬停时保留渐变动画 */
}

.stat-text {
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
}

/* 确保form-label的for属性正确关联input元素 */