/* =========================================
   哲哲数码商城 H5样式
   ========================================= */

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    padding-top: 56px;
    padding-bottom: 60px;
    -webkit-font-smoothing: antialiased;
}

/* 顶部导航 */
.navbar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 主内容区域 */
.main-content {
    padding: 15px;
    min-height: calc(100vh - 120px);
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 15px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* 余额卡片 */
.balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
}

.balance-card .amount {
    font-size: 32px;
    font-weight: 700;
}

.balance-card .label {
    font-size: 14px;
    opacity: 0.9;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 30px;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    border-radius: 25px;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: #fff;
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 25px;
    background: transparent;
}

/* 签到按钮 */
.signin-btn {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s;
}

.signin-btn:active {
    transform: scale(0.95);
}

.signin-btn .icon {
    font-size: 40px;
    margin-bottom: 5px;
}

.signin-btn.signed {
    background: #ccc;
    box-shadow: none;
}

/* 列表样式 */
.list-group-item {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 0;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 100;
}

.bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    color: #999;
    text-decoration: none;
    font-size: 12px;
    padding: 5px 0;
}

.bottom-nav .nav-item i {
    font-size: 22px;
    display: block;
    margin-bottom: 2px;
}

.bottom-nav .nav-item.active {
    color: #667eea;
}

.bottom-nav .nav-item.active i {
    color: #667eea;
}

/* 悬浮宠物 */
.floating-pet {
    position: fixed;
    z-index: 9999;
    cursor: pointer;
    transition: transform 0.2s;
}

.floating-pet img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: petBreath 3s ease-in-out infinite;
}

.floating-pet.dragging img {
    animation: none;
    transform: scale(1.1);
}

@keyframes petBreath {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pet-menu {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    display: none;
}

.pet-menu-item {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.pet-menu-item:last-child {
    border-bottom: none;
}

.pet-menu-item:hover {
    background: #f5f5f5;
}

/* 公告 */
.announcement-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-item .title {
    font-weight: 600;
    color: #333;
}

.announcement-item .time {
    font-size: 12px;
    color: #999;
}

/* 表单样式 */
.form-control {
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 订单列表 */
.order-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
}

.order-item .order-no {
    font-size: 12px;
    color: #999;
}

.order-item .order-amount {
    font-size: 18px;
    font-weight: 600;
    color: #e74c3c;
}

/* 状态标签 */
.badge-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
}

.badge-pending { background: #fff3cd; color: #856404; }
.badge-completed { background: #d4edda; color: #155724; }
.badge-refunded { background: #f8f9fa; color: #6c757d; }

/* 宠物页面 */
.pet-main-image {
    width: 200px;
    height: 200px;
    margin: 20px auto;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-main-image img {
    max-width: 100%;
    max-height: 100%;
}

.pet-attr {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.pet-attr .label {
    width: 80px;
    color: #666;
}

.pet-attr .progress {
    flex: 1;
    height: 20px;
    border-radius: 10px;
}

.pet-action-btn {
    flex: 1;
    padding: 15px;
    text-align: center;
    border-radius: 12px;
    margin: 0 5px;
}

.pet-action-btn i {
    font-size: 30px;
    display: block;
    margin-bottom: 5px;
}

/* 红包 */
.redpacket-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.redpacket-card .amount {
    font-size: 48px;
    font-weight: 700;
}

.redpacket-card .open-btn {
    background: #fff;
    color: #f5576c;
    border: none;
    border-radius: 25px;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    display: inline-block;
    cursor: pointer;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 15px;
    color: #999;
}

/* 工具类 */
.text-primary { color: #667eea !important; }
.text-danger { color: #e74c3c !important; }
.text-success { color: #27ae60 !important; }
.bg-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; }

/* 页面切换动画 */
.page-enter {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式 */
@media (max-width: 375px) {
    .card-body { padding: 15px; }
    .balance-card { padding: 20px; }
    .balance-card .amount { font-size: 28px; }
}
