// page-home.component.scss

:host {
  --primary: #ff6b6b;
  --primary-light: #ff8e8e;
  --primary-dark: #e55a5a;
  --secondary: #4ecdc4;
  --dark: #333;
  --gray: #666;
  --light-gray: #f5f5f5;
  --white: #fff;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
  --card-radius: 16px;
  --tech-gradient: linear-gradient(135deg, #6e8efb, #a777e3);
  --neon-shadow: 0 0 15px rgba(110, 142, 251, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: linear-gradient(135deg, #f8f9ff 0%, #eef1ff 100%);
  color: var(--dark);
  line-height: 1.6;
  padding-bottom: 80px;
}

.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header Styles */
header {
  background: var(--white);
  padding: 15px 0 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  text-shadow: var(--neon-shadow);
}

.logo i {
  font-size: 22px;
}

.user-actions {
  display: flex;
  gap: 15px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-gray);
  color: var(--gray);
  font-size: 16px;
  border: none;
  transition: var(--transition);
  cursor: pointer;
  
  &:hover {
    background: var(--tech-gradient);
    color: white;
    transform: translateY(-2px);
  }
}

/* Search Bar */
.search-bar {
  background: var(--light-gray);
  border-radius: 25px;
  padding: 10px 20px;
  margin: 12px 15px 0;
  display: flex;
  align-items: center;
  transition: var(--transition);
  border: 1px solid #e0e0e0;
  
  &:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
  }
}

.search-bar i {
  color: var(--gray);
  margin-right: 10px;
}

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 14px;
}

/* Swiper Banner */
.swiper-container {
  height: 180px;
  border-radius: var(--card-radius);
  margin: 15px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.swiper-slide {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 25px;
  color: var(--white);
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,0,0,0.2), rgba(0,0,0,0.1));
    z-index: 1;
  }
}

.slide-1 {
  background: linear-gradient(45deg, #ff9a9e, #fad0c4);
}

.slide-2 {
  background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
}

.slide-3 {
  background: linear-gradient(45deg, #ffecd2, #fcb69f);
}

.swiper-slide h2 {
  font-size: 22px;
  margin-bottom: 8px;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  font-weight: 700;
}

.swiper-slide p {
  font-size: 14px;
  opacity: 0.9;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.swiper-pagination-bullet-active {
  background: var(--primary) !important;
}

/* Category Navigation */
.category-nav {
  background: var(--white);
  border-radius: var(--card-radius);
  margin: 15px;
  padding: 15px 0;
  display: flex;
  justify-content: space-around;
  box-shadow: var(--card-shadow);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(240, 240, 240, 0.8);
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  
  &:hover {
    transform: translateY(-5px);
  }
}

.category-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 20px;
  transition: var(--transition);
  
  &.active {
    background: var(--tech-gradient);
    color: white;
    box-shadow: var(--neon-shadow);
  }
}

.category-text {
  font-size: 13px;
  color: var(--gray);
  font-weight: 500;
}

/* IP Entry */
.ip-entry {
  position: fixed;
  right: 20px;
  bottom: 100px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ip-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--tech-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 15px rgba(110, 142, 251, 0.4);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid white;
  
  &:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(110, 142, 251, 0.6);
  }
}

.ip-circle img {
  width: 40px;
  height: 40px;
}

.ip-text {
  background: var(--white);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Shop Info Card */
.shop-card {
  background: var(--white);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin: 15px;
  padding: 20px;
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(240, 240, 240, 0.8);
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--tech-gradient);
  }
}

.shop-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.shop-logo {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  background: var(--tech-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 24px;
  font-weight: bold;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(110, 142, 251, 0.3);
}

.shop-info {
  flex-grow: 1;
}

.shop-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.shop-name h2 {
  font-size: 18px;
}

.rating {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ff922b;
  font-size: 14px;
}

.shop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.shop-tag {
  background: rgba(255, 107, 107, 0.1);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.shop-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 15px;
  text-align: center;
}

.stat-item {
  padding: 10px;
  background: var(--light-gray);
  border-radius: 10px;
  transition: var(--transition);
  
  &:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  }
}

.stat-value {
  font-weight: bold;
  font-size: 16px;
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  color: var(--gray);
  margin-top: 4px;
}

/* Story Section */
.story-section {
  background: var(--white);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin: 15px;
  padding: 20px;
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(240, 240, 240, 0.8);
}

.story-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.story-header h2 {
  font-size: 18px;
  color: var(--dark);
  position: relative;
  padding-left: 12px;
  
  &::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
  }
}

.story-header .more {
  color: var(--gray);
  font-size: 13px;
  text-decoration: none;
  
  &:hover {
    color: var(--primary);
  }
}

.story-content {
  display: flex;
  gap: 15px;
  align-items: center;
}

.story-image {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  background: linear-gradient(45deg, #ffecd2, #fcb69f);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.story-details {
  flex: 1;
}

.story-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.story-text {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray);
}

.story-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.story-btn {
  flex: 1;
  padding: 10px 0;
  border-radius: 20px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.read-btn {
  background: var(--tech-gradient);
  color: var(--white);
  
  &:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(110, 142, 251, 0.3);
  }
}

.share-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #eee;
  color: var(--primary);
  
  &:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  }
}

/* Menu Section */
.section {
  margin: 20px 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 15px 15px;
}

.section-title h2 {
  font-size: 18px;
  color: var(--dark);
  position: relative;
  padding-left: 12px;
  
  &::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
  }
}

.section-title .more {
  color: var(--gray);
  font-size: 13px;
  text-decoration: none;
  
  &:hover {
    color: var(--primary);
  }
}

/* Menu Item */
.menu-list {
  display: grid;
  gap: 15px;
}

.menu-item {
  background: var(--white);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(240, 240, 240, 0.8);
  
  &:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  }
}

.menu-img {
  width: 100px;
  height: 100px;
  background: linear-gradient(45deg, #ff9a9e, #fad0c4);
  flex-shrink: 0;
  position: relative;
}

.menu-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.menu-info {
  padding: 15px;
  flex-grow: 1;
}

.menu-name {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.menu-name h3 {
  font-size: 16px;
  font-weight: 600;
}

.menu-price {
  color: var(--primary);
  font-weight: 700;
}

.menu-desc {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 10px;
  line-height: 1.5;
}

.menu-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray);
}

.menu-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.add-btn {
  width: 90px;
  height: 36px;
  background: var(--tech-gradient);
  color: var(--white);
  border: none;
  border-radius: 18px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: var(--transition);
  font-weight: 500;
  box-shadow: 0 4px 8px rgba(110, 142, 251, 0.3);
  
  &:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(110, 142, 251, 0.4);
  }
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--white);
  display: flex;
  border-top: 1px solid #eee;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.nav-item {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  color: var(--gray);
  font-size: 12px;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  
  &:hover {
    color: var(--primary);
  }
}

.nav-item.active {
  color: var(--primary);
  
  &::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--tech-gradient);
    border-radius: 3px;
  }
}

.nav-item i {
  font-size: 20px;
  margin-bottom: 4px;
  transition: var(--transition);
}

/* Animation */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

.ip-circle {
  animation: float 3s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 480px) {
  .swiper-container {
    height: 150px;
  }
  
  .category-icon {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
  
  .shop-logo {
    width: 60px;
    height: 60px;
  }
  
  .story-image {
    width: 90px;
    height: 90px;
  }
}