/* ============================================
   易捷加油风格 - 首页样式优化版 v2
   ============================================ */

/* 引入CSS变量 */
:root {
  --primary: #E60012;
  --primary-dark: #C4000F;
  --primary-light: #FF3344;
  --accent: #FF6B35;
  --bg-primary: #F5F5F7;
  --bg-card: #FFFFFF;
  --bg-gradient: linear-gradient(135deg, #E60012 0%, #FF3344 60%, #FF6B35 100%);
  --bg-gradient-soft: linear-gradient(135deg, #FFF5F5 0%, #FFFAF8 100%);
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-light: #AEAEB2;
  --text-white: #FFFFFF;
  --border: #E5E5EA;
  --border-light: #F2F2F7;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
}

/* 顶部导航 - 增强版 */
.app-header {
  background: var(--bg-gradient);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(230, 0, 18, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-text {
  color: #fff;
}

.header-text .title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.header-text .subtitle {
  font-size: 12px;
  opacity: 0.92;
  margin-top: 3px;
  font-weight: 500;
}

.settings-btn {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.settings-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

/* 快速加油区 - 大图标卡片 */
.refuel-section {
  padding: 16px;
}

.refuel-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.refuel-btn {
  padding: 24px 16px;
  background: var(--bg-gradient);
  border: none;
  border-radius: var(--radius-lg);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(230, 0, 18, 0.3);
  position: relative;
  overflow: hidden;
}

.refuel-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.refuel-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(230, 0, 18, 0.4);
}

.refuel-btn:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 36px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

/* 优惠信息条 */
.promo-bar {
  margin: 0 16px 12px;
  padding: 12px 16px;
  background: var(--bg-gradient-soft);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(230, 0, 18, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.promo-bar:hover {
  border-color: rgba(230, 0, 18, 0.2);
  transform: translateX(2px);
}

.promo-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(230, 0, 18, 0.1);
  padding: 4px 8px;
  border-radius: 12px;
  flex-shrink: 0;
}

.promo-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-arrow {
  font-size: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

/* 服务网格 - 统一展示 */
.services-all {
  padding: 0 16px 16px;
}

.service-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  padding: 16px 8px;
  border-radius: var(--radius-md);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  position: relative;
}

.service-item:hover {
  background: var(--bg-gradient-soft);
  border-color: rgba(230, 0, 18, 0.15);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.service-item:active {
  transform: scale(0.96);
  background: rgba(230, 0, 18, 0.05);
}

.service-item.highlight {
  background: var(--bg-gradient-soft);
  border-color: rgba(230, 0, 18, 0.2);
}

.service-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.service-item:hover .service-icon {
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}

.service-item span:not(.badge) {
  font-size: 12px;
  text-align: center;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text-primary);
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(230, 0, 18, 0.4);
  animation: pulse 2s infinite;
}

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

/* 底部导航 - iOS风格 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: space-around;
  padding: 10px 0 env(safe-area-inset-bottom, 10px);
  border-top: 1px solid var(--border-light);
  z-index: 1000;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 11px;
  position: relative;
  padding: 6px 16px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-icon {
  font-size: 26px;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.nav-item:active .nav-icon {
  transform: scale(0.92);
}

.nav-item .badge {
  position: absolute;
  top: 0;
  right: 8px;
  font-size: 9px;
  padding: 1px 5px;
}

/* 提示信息 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-xl);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* 内容区底部padding */
.container {
  padding-bottom: 80px;
}

/* ===== 响应式优化 ===== */
@media (max-width: 375px) {
  .refuel-btn {
    padding: 20px 12px;
  }
  
  .btn-icon {
    font-size: 28px;
  }
  
  .service-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
  }
  
  .service-row {
    gap: 8px;
  }
}