/* ==========================================
   首页样式 - 商业高端风格
   ========================================== */

/* Banner轮播 */
.banner-swiper {
    margin: 10px 12px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
}

.banner-swiper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    z-index: 1;
    opacity: 0.8;
}

.swiper-container {
    position: relative;
    width: 100%;
    height: 160px;
}

.swiper-wrapper {
    display: flex;
    transition: transform 0.3s ease;
}

.swiper-slide {
    min-width: 100%;
    height: 160px;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-pagination {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.swiper-pagination-bullet.active {
    width: 18px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.5);
}

/* 用户信息卡片 */
.user-card {
    margin: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 4px 20px rgba(102, 126, 234, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    opacity: 0.8;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.4);
    margin-right: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-detail {
    flex: 1;
}

.username {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.user-level {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.balance-info {
    display: flex;
    gap: 10px;
}

.balance-item {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.balance-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.balance-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.balance-value {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Mono', 'Monaco', 'Consolas', monospace;
}

/* 快捷功能 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 12px;
    background: #fff;
    margin: 0 12px 12px;
    border-radius: 14px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 16px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    position: relative;
}

.action-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-item:hover::before {
    opacity: 1;
}

.action-item:hover {
    transform: translateY(-3px);
}

.action-item:active {
    transform: translateY(-1px) scale(0.95);
}

.action-item img {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.action-item:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.2));
}

.action-item span {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.2px;
}

.action-item:hover span {
    color: #667eea;
}

/* 抢单入口 */
.grab-order-section {
    margin: 0 12px 12px;
}

.grab-order-card {
    position: relative;
    height: 140px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 4px 20px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.grab-order-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 28px rgba(102, 126, 234, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.12);
}

.grab-order-card:active {
    transform: translateY(-1px) scale(0.99);
}

.grab-order-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.grab-order-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grab-order-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 24px;
    color: #fff;
    z-index: 1;
}

.grab-order-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    z-index: -1;
}

.grab-order-content h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.grab-order-content p {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.95;
    margin-bottom: 12px;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.grab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border-radius: 20px;
    width: fit-content;
    margin: 0 auto;
    font-weight: 700;
    font-size: 14px;
    border: none;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
    transition: all 0.3s ease;
    color: #fff;
}

.grab-btn:hover {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

.arrow-right {
    width: 0;
    height: 0;
    border-left: 5px solid #fff;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

/* 数据统计 */
.stats-section {
    margin: 0 12px 12px;
    padding: 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 16px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.stats-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a1a;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-item {
    text-align: center;
    padding: 14px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    letter-spacing: 0.2px;
}

/* 公告通知 */
.notice-section {
    margin: 0 12px 12px;
    padding: 14px;
    padding-bottom: calc(14px + 60px + env(safe-area-inset-bottom, 0px) + 10px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 16px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.notice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
    letter-spacing: 0.3px;
}

.notice-header::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.notice-header img {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.notice-list {
    max-height: 400px;
    overflow-y: auto;
    padding-bottom: 10px;
}

.notice-item-wrapper {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.notice-item-wrapper:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.notice-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    transition: all 0.2s;
    border-radius: 8px;
}

.notice-item.clickable {
    cursor: pointer;
}

.notice-item.clickable:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: translateX(4px);
}

.notice-item.clickable:active {
    background-color: rgba(102, 126, 234, 0.1);
}

.notice-icon {
    font-size: 16px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.notice-text {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.1px;
}

.notice-arrow {
    font-size: 14px;
    color: #667eea;
    transition: all 0.2s;
    flex-shrink: 0;
    font-weight: 600;
}

.notice-item.clickable:hover .notice-arrow {
    transform: translateX(4px);
    color: #764ba2;
}

.notice-content {
    padding: 10px 0 12px 26px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 6px;
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

.notice-content.show {
    display: block !important;
}

.notice-content-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 8px 0;
    letter-spacing: 0.1px;
}

/* ==========================================
   响应式设计 - 首页
   ========================================== */

/* 超小屏幕 (320px - 479px) */
@media screen and (max-width: 479px) {
    .banner-swiper {
        margin: 8px 10px;
        border-radius: 12px;
    }
    
    .swiper-container {
        height: 140px;
    }
    
    .swiper-slide {
        height: 140px;
    }
    
    .user-card {
        margin: 10px;
        padding: 12px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 10px;
        margin: 0 10px 10px;
    }
    
    .action-item img {
        width: 40px;
        height: 40px;
    }
    
    .action-item span {
        font-size: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* 小屏幕 (480px - 767px) */
@media screen and (min-width: 480px) and (max-width: 767px) {
    .banner-swiper {
        margin: 10px 12px;
        border-radius: 14px;
    }
    
    .swiper-container {
        height: 160px;
    }
    
    .swiper-slide {
        height: 160px;
    }
    
    .user-card {
        margin: 12px;
        padding: 16px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        padding: 12px;
        margin: 0 12px 12px;
    }
    
    .action-item img {
        width: 48px;
        height: 48px;
    }
    
    .action-item span {
        font-size: 12px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* 平板设备 (768px - 1023px) */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .banner-swiper {
        margin: 15px 20px;
        border-radius: 16px;
    }
    
    .swiper-container {
        height: 200px;
    }
    
    .swiper-slide {
        height: 200px;
    }
    
    .user-card {
        margin: 15px 20px;
        padding: 20px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        padding: 15px 20px;
        margin: 0 20px 15px;
    }
    
    .action-item img {
        width: 52px;
        height: 52px;
    }
    
    .action-item span {
        font-size: 13px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .grab-order-card {
        height: 160px;
    }
}

/* 桌面设备 (1024px - 1439px) */
@media screen and (min-width: 1024px) and (max-width: 1439px) {
    .banner-swiper {
        margin: 20px 25px;
        border-radius: 18px;
    }
    
    .swiper-container {
        height: 240px;
    }
    
    .swiper-slide {
        height: 240px;
    }
    
    .user-card {
        margin: 20px 25px;
        padding: 24px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(6, 1fr);
        gap: 16px;
        padding: 20px 25px;
        margin: 0 25px 20px;
    }
    
    .action-item img {
        width: 56px;
        height: 56px;
    }
    
    .action-item span {
        font-size: 14px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    .grab-order-card {
        height: 180px;
    }
    
    .grab-order-content h2 {
        font-size: 28px;
    }
}

/* 大屏幕 (1440px+) */
@media screen and (min-width: 1440px) {
    .banner-swiper {
        margin: 25px 30px;
        border-radius: 20px;
    }
    
    .swiper-container {
        height: 280px;
    }
    
    .swiper-slide {
        height: 280px;
    }
    
    .user-card {
        margin: 25px 30px;
        padding: 28px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(8, 1fr);
        gap: 18px;
        padding: 24px 30px;
        margin: 0 30px 25px;
    }
    
    .action-item img {
        width: 60px;
        height: 60px;
    }
    
    .action-item span {
        font-size: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
    
    .grab-order-card {
        height: 200px;
    }
    
    .grab-order-content h2 {
        font-size: 32px;
    }
}

/* 横屏模式 */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .banner-swiper {
        margin: 8px 12px;
    }
    
    .swiper-container {
        height: 120px;
    }
    
    .swiper-slide {
        height: 120px;
    }
    
    .user-card {
        margin: 8px 12px;
        padding: 12px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
        padding: 8px 12px;
        margin: 0 12px 8px;
    }
    
    .action-item img {
        width: 36px;
        height: 36px;
    }
    
    .action-item span {
        font-size: 10px;
    }
}

