/* 组件样式 */

/* 卡片组件 */
.card {
    background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f0f0;
}

.card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
    border-color: #c41e3a;
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 28px;
}

.card-title {
    font-size: 22px;
    margin-bottom: 12px;
    color: #2c3e50;
    font-weight: 600;
    transition: color 0.3s ease;
}

.card:hover .card-title {
    color: #c41e3a;
}

.card-description {
    font-size: 15px;
    color: #7f8c8d;
    line-height: 1.7;
}

/* 按钮组件 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #c41e3a 0%, #a3162d 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a3162d 0%, #8b0000 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.4);
}

.btn-outline {
    border: 2px solid #c41e3a;
    color: #c41e3a;
    background: transparent;
    box-shadow: 0 2px 10px rgba(196, 30, 58, 0.1);
}

.btn-outline:hover {
    background: linear-gradient(135deg, #c41e3a 0%, #a3162d 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

/* 表单组件 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #c41e3a;
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* 徽章组件 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background-color: #c41e3a;
    color: #fff;
}

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

.badge-success {
    background-color: #28a745;
    color: #fff;
}

.badge-warning {
    background-color: #ffc107;
    color: #333;
}

.badge-info {
    background-color: #17a2b8;
    color: #fff;
}

/* 标签页组件 */
.tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.tab-item {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    color: #666;
    position: relative;
    transition: color 0.3s ease;
}

.tab-item:hover {
    color: #c41e3a;
}

.tab-item.active {
    color: #c41e3a;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #c41e3a;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 分页组件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.page-btn {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 0 5px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background-color: #f8f9fa;
    border-color: #c41e3a;
}

.page-btn.active {
    background-color: #c41e3a;
    color: #fff;
    border-color: #c41e3a;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 搜索框组件 */
.search-box {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 14px;
    outline: none;
}

.search-btn {
    padding: 12px 20px;
    background-color: #c41e3a;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #a3162d;
}

/* 进度条组件 */
.progress-bar {
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #c41e3a;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* 模态框组件 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background-color: #fff;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

.modal-footer .btn {
    margin-left: 10px;
}

/* 卡片悬停效果 */
.card-hover {
    position: relative;
    overflow: hidden;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.1), transparent);
    transition: left 0.5s ease;
}

.card-hover:hover::before {
    left: 100%;
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
}

.gradient-bg-light {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.1) 0%, rgba(139, 0, 0, 0.1) 100%);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.6s ease forwards;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* 分隔线 */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
    margin: 40px 0;
}

/* 阴影效果 */
.shadow-sm {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* 圆角 */
.rounded-sm {
    border-radius: 4px;
}

.rounded-md {
    border-radius: 8px;
}

.rounded-lg {
    border-radius: 12px;
}

.rounded-full {
    border-radius: 50%;
}

/* 文本样式 */
.text-primary {
    color: #c41e3a;
}

.text-secondary {
    color: #6c757d;
}

.text-success {
    color: #28a745;
}

.text-warning {
    color: #ffc107;
}

.text-info {
    color: #17a2b8;
}

.text-muted {
    color: #999;
}

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

.text-right {
    text-align: right;
}

.text-uppercase {
    text-transform: uppercase;
}

.text-capitalize {
    text-transform: capitalize;
}

.font-weight-bold {
    font-weight: 700;
}

.font-weight-medium {
    font-weight: 500;
}

.font-italic {
    font-style: italic;
}

/* 间距 */
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 30px; }

.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 30px; }

.ml-1 { margin-left: 5px; }
.ml-2 { margin-left: 10px; }
.ml-3 { margin-left: 15px; }
.ml-4 { margin-left: 20px; }
.ml-5 { margin-left: 30px; }

.mr-1 { margin-right: 5px; }
.mr-2 { margin-right: 10px; }
.mr-3 { margin-right: 15px; }
.mr-4 { margin-right: 20px; }
.mr-5 { margin-right: 30px; }

.p-1 { padding: 5px; }
.p-2 { padding: 10px; }
.p-3 { padding: 15px; }
.p-4 { padding: 20px; }
.p-5 { padding: 30px; }

.pt-1 { padding-top: 5px; }
.pt-2 { padding-top: 10px; }
.pt-3 { padding-top: 15px; }
.pt-4 { padding-top: 20px; }
.pt-5 { padding-top: 30px; }

.pb-1 { padding-bottom: 5px; }
.pb-2 { padding-bottom: 10px; }
.pb-3 { padding-bottom: 15px; }
.pb-4 { padding-bottom: 20px; }
.pb-5 { padding-bottom: 30px; }

/* 布局 */
.d-flex {
    display: flex;
}

.d-block {
    display: block;
}

.d-inline {
    display: inline;
}

.d-inline-block {
    display: inline-block;
}

.d-none {
    display: none;
}

.flex-column {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.align-center {
    align-items: center;
}

.align-start {
    align-items: flex-start;
}

.align-end {
    align-items: flex-end;
}

.flex-1 {
    flex: 1;
}

.gap-1 { gap: 5px; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 15px; }
.gap-4 { gap: 20px; }
.gap-5 { gap: 30px; }

/* 响应式工具 */
@media (max-width: 768px) {
    .d-md-none {
        display: none;
    }
}

@media (min-width: 769px) {
    .d-md-block {
        display: block;
    }
}
