/* 按钮样式 */

/* 基础按钮样式 */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn:focus, .btn:hover {
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 按钮尺寸 */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    line-height: 1.5;
    border-radius: 0.3rem;
}

/* 主要按钮 */
.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-primary:active {
    background-color: #0062cc;
    border-color: #005cbf;
}

/* 次要按钮 */
.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-secondary:active {
    background-color: #545b62;
    border-color: #4e555b;
}

/* 成功按钮 */
.btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover, .btn-success:focus {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-success:active {
    background-color: #1e7e34;
    border-color: #1c7430;
}

/* 轮廓按钮 */
.btn-outline {
    background-color: transparent;
    color: #007bff;
    border-color: #007bff;
}

.btn-outline:hover, .btn-outline:focus {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-outline:active {
    color: #fff;
    background-color: #0062cc;
    border-color: #005cbf;
}

/* 文本按钮 */
.btn-text {
    background-color: transparent;
    color: #007bff;
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
}

.btn-text:hover, .btn-text:focus {
    color: #0056b3;
    text-decoration: underline;
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
    transform: none;
}

/* 按钮图标 */
.btn i {
    margin-left: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* 按钮组 */
.btn-group {
    display: inline-flex;
    position: relative;
}

.btn-group .btn {
    position: relative;
    flex: 1 1 auto;
}

.btn-group .btn:not(:first-child) {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn-group .btn:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* 按钮波纹效果 */
.btn-ripple:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.btn-ripple:active:after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* 渐变按钮 */
.btn-gradient {
    background-image: linear-gradient(to right, #007bff, #00c6ff);
    border: none;
    color: white;
}

.btn-gradient:hover, .btn-gradient:focus {
    background-image: linear-gradient(to right, #0062cc, #0097c4);
}

/* 动画按钮 */
.btn-animated {
    position: relative;
    overflow: hidden;
}

.btn-animated:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-animated:hover:before {
    left: 100%;
}