/**
 * 前台样式
 * Auto Card System - 自动发卡系统
 */

:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --info-color: #36b9cc;
}

/* 基础样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* 导航栏 */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
}

/* 公告栏 */
.announcement-bar {
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* 商品卡片 */
.product-card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
}

.product-card .price {
    font-weight: 700;
}

/* 表单样式 */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #224abe 0%, #1a3a9e 100%);
}

.btn-success {
    background: linear-gradient(135deg, #1cc88a 0%, #13855c 100%);
    border: none;
}

/* 支付方式选择 */
.btn-check:checked + .btn-outline-secondary {
    background-color: rgba(78, 115, 223, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 订单卡片 */
.order-card {
    border-radius: 15px;
    overflow: hidden;
}

/* 页脚 */
.footer {
    margin-top: auto;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 1rem;
    }
    
    .btn-group-vertical {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 加载状态 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 复制按钮反馈 */
.copy-success {
    background-color: var(--success-color) !important;
    color: #fff !important;
}

/* 表格优化 */
.table > tbody > tr > td {
    vertical-align: middle;
}

/* Badge 样式 */
.badge {
    font-weight: 500;
}

/* 卡密显示 */
pre {
    white-space: pre-wrap;
    word-break: break-all;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Toast 动画 */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.front-toast {
    animation: toastSlideIn 0.3s ease forwards;
}

/* 链接样式统一 */
a {
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: none;
}

.breadcrumb a {
    text-decoration: none;
}
