/* page-crm-system.scss */
/* 全局样式 - 添加平滑滚动和字体定义 */
:host {
  display: block;
  font-family: "阿里巴巴普惠体", "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: #f8f4e8;
  color: #333;
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* 主色调定义 - 扩展调色板 */
:host {
  --primary-blue: #2F7DAD;
  --primary-green: #5B8C5A;
  --primary-gold: #D4B16A;
  --secondary-gray: #6D6D6D;
  --secondary-red: #C53D43;
  --light-bg: #f9f9f9;
  --card-shadow: 0 8px 24px rgba(0,0,0,0.1);
  --section-padding: 4rem 10%;
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* 导航栏 - 添加logo和搜索框样式 */
.navbar {
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  
  .logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    
    .logo-img {
      height: 50px;
      width: auto;
    }
    
    .logo-text {
      font-size: 1.5rem;
      color: white;
      font-weight: bold;
      text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    }
  }
  
  .nav-links {
    display: flex;
    gap: 1.5rem;
    
    a {
      color: white;
      text-decoration: none;
      padding: 0.5rem 1rem;
      transition: var(--transition);
      position: relative;
      font-size: 1.1rem;
      
      &:hover, &.active {
        background-color: rgba(255,255,255,0.2);
        border-radius: var(--border-radius);
      }
      
      &::after {
        content: "";
        position: absolute;
        bottom: -5px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background-color: var(--primary-gold);
        transition: width 0.3s;
      }
      
      &:hover::after, &.active::after {
        width: 70%;
      }
    }
  }
  
  .search-box {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    border-radius: 30px;
    padding: 0.5rem 1rem;
    
    input {
      background: transparent;
      border: none;
      color: white;
      padding: 0.3rem 0.5rem;
      width: 200px;
      
      &::placeholder {
        color: rgba(255,255,255,0.7);
      }
      
      &:focus {
        outline: none;
      }
    }
    
    .search-btn {
      background: none;
      border: none;
      color: white;
      cursor: pointer;
      font-size: 1.2rem;
    }
  }
}

/* Banner区域 - 增强视觉效果 */
.support-banner {
  height: 500px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
  
  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="rgba(255,255,255,0.05)"><path d="M30,30 Q50,10 70,30 T90,50 T70,70 T50,90 T30,70 T10,50 T30,30 Z"></path></svg>');
    background-size: 80px;
    animation: movePattern 60s linear infinite;
  }
  
  .banner-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    .banner-title {
      font-size: 3.5rem;
      margin-bottom: 1.5rem;
      text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
      font-weight: bold;
      animation: fadeInUp 1s ease-out;
    }
    
    .banner-subtitle {
      font-size: 1.5rem;
      margin-bottom: 2.5rem;
      line-height: 1.8;
      max-width: 800px;
      animation: fadeInUp 1s ease-out 0.2s forwards;
      opacity: 0;
    }
    
    .banner-buttons {
      display: flex;
      gap: 1.5rem;
      margin-bottom: 3rem;
      animation: fadeInUp 1s ease-out 0.4s forwards;
      opacity: 0;
      
      .btn-primary {
        background-color: var(--primary-gold);
        color: #333;
        border: none;
        padding: 0.8rem 2rem;
        border-radius: 30px;
        font-size: 1.1rem;
        font-weight: bold;
        cursor: pointer;
        transition: var(--transition);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        
        &:hover {
          transform: translateY(-3px);
          box-shadow: 0 6px 16px rgba(0,0,0,0.2);
        }
      }
      
      .btn-outline {
        background: transparent;
        color: white;
        border: 2px solid white;
        padding: 0.8rem 2rem;
        border-radius: 30px;
        font-size: 1.1rem;
        font-weight: bold;
        cursor: pointer;
        transition: var(--transition);
        
        &:hover {
          background: rgba(255,255,255,0.1);
          transform: translateY(-3px);
        }
      }
    }
    
    .banner-image {
      width: 80%;
      max-width: 900px;
      animation: fadeInUp 1s ease-out 0.6s forwards;
      opacity: 0;
      
      img {
        width: 100%;
        height: auto;
        border-radius: var(--border-radius);
        box-shadow: 0 20px 40px rgba(0,0,0,0.2);
      }
    }
  }
}

/* 主内容区 - 增强版式设计 */
.section {
  padding: var(--section-padding);
  
  .section-header {
    text-align: center;
    margin-bottom: 3rem;
    
    .section-title {
      font-size: 2.5rem;
      color: var(--primary-blue);
      margin-bottom: 1rem;
      position: relative;
      display: inline-block;
      
      &::after {
        content: "";
        display: block;
        width: 80px;
        height: 4px;
        background: linear-gradient(to right, var(--primary-blue), var(--primary-green));
        margin: 1rem auto 0;
        border-radius: 2px;
      }
    }
    
    .section-description {
      font-size: 1.2rem;
      color: var(--secondary-gray);
      max-width: 800px;
      margin: 0 auto;
      line-height: 1.8;
    }
  }
}

/* 模块卡片 - 增强交互效果 */
.module-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  justify-content: center;
}

/* 模块卡片 - 增强交互效果 */
.module-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  
  &:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  }
  
  .module-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    
    &::before {
      content: "";
      position: absolute;
      top: -50%;
      right: -50%;
      width: 100%;
      height: 200%;
      background: rgba(255,255,255,0.1);
      transform: rotate(30deg);
      transition: var(--transition);
    }
    
    &:hover::before {
      right: 100%;
    }
    
    .module-icon {
      width: 60px;
      height: 60px;
      margin: 0 auto 1rem;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(255,255,255,0.2);
      border-radius: 50%;
      
      img {
        width: 60%;
        height: auto;
      }
    }
    
    .module-title {
      font-size: 1.5rem;
      margin-bottom: 0.5rem;
      font-weight: bold;
    }
    
    .module-subtitle {
      font-size: 0.9rem;
      opacity: 0.9;
    }
  }
  
  .module-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    
    .feature-list {
      list-style: none;
      margin-bottom: 1.5rem;
      
      .feature-item {
        display: flex;
        align-items: flex-start;
        margin-bottom: 1rem;
        padding: 0.8rem;
        border-radius: 6px;
        transition: var(--transition);
        background: rgba(47, 125, 173, 0.05);
        
        &:hover {
          background: rgba(47, 125, 173, 0.1);
          transform: translateX(5px);
        }
        
        .feature-icon {
          width: 36px;
          height: 36px;
          background-color: rgba(47, 125, 173, 0.1);
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          margin-right: 1rem;
          color: var(--primary-blue);
          font-size: 1rem;
          flex-shrink: 0;
        }
        
        h4 {
          margin: 0 0 0.3rem;
          font-size: 1rem;
          color: var(--primary-blue);
        }
        
        .feature-desc {
          font-size: 0.9rem;
          color: var(--secondary-gray);
          line-height: 1.5;
        }
      }
    }
    
    .module-stats {
      display: flex;
      justify-content: space-around;
      margin-top: auto;
      padding-top: 1rem;
      border-top: 1px solid rgba(0,0,0,0.05);
      
      .stat-item {
        text-align: center;
        
        .stat-value {
          font-size: 1.8rem;
          font-weight: bold;
          color: var(--primary-blue);
          line-height: 1;
        }
        
        .stat-label {
          font-size: 0.8rem;
          color: var(--secondary-gray);
        }
      }
    }
    
    .knowledge-graph-preview,
    .device-showcase,
    .data-cleaning-demo,
    .blockchain-explainer,
    .filter-dashboard {
      margin: 1rem 0;
      border-radius: var(--border-radius);
      overflow: hidden;
      box-shadow: 0 4px 12px rgba(0,0,0,0.08);
      
      img {
        width: 100%;
        height: auto;
        display: block;
        transition: var(--transition);
        
        &:hover {
          transform: scale(1.02);
        }
      }
      
      .preview-caption,
      .explainer-text,
      .dashboard-stats {
        text-align: center;
        font-size: 0.8rem;
        color: var(--secondary-gray);
        padding: 0.5rem;
        background: var(--light-bg);
      }
    }
  }
}

/* 权限管理 - 增强标签页效果 */
.permission-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
  
  .tab-btn {
    padding: 0.8rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1.1rem;
    color: var(--secondary-gray);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    
    img {
      width: 20px;
      height: auto;
    }
    
    &.active {
      color: var(--primary-blue);
      border-bottom-color: var(--primary-blue);
      font-weight: bold;
      background: rgba(47, 125, 173, 0.05);
    }
    
    &:hover:not(.active) {
      background: rgba(47, 125, 173, 0.1);
    }
  }
}

.tab-content {
  display: none;
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  
  &.active {
    display: block;
    animation: fadeIn 0.5s;
  }
  
  .tab-header {
    margin-bottom: 2rem;
    text-align: center;
    
    h3 {
      font-size: 1.8rem;
      color: var(--primary-blue);
      margin-bottom: 0.5rem;
    }
    
    .tab-desc {
      font-size: 1.1rem;
      color: var(--secondary-gray);
      max-width: 800px;
      margin: 0 auto;
    }
  }
  
  .permission-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    
    .permission-feature {
      background-color: white;
      padding: 1.5rem;
      border-radius: var(--border-radius);
      box-shadow: 0 4px 12px rgba(0,0,0,0.05);
      transition: var(--transition);
      border-top: 4px solid var(--primary-blue);
      
      &:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
      }
      
      .feature-image {
        margin-bottom: 1rem;
        border-radius: var(--border-radius);
        overflow: hidden;
        
        img {
          width: 100%;
          height: auto;
          display: block;
          transition: var(--transition);
          
          &:hover {
            transform: scale(1.05);
          }
        }
      }
      
      h4 {
        font-size: 1.2rem;
        color: var(--primary-blue);
        margin-bottom: 0.8rem;
      }
      
      .feature-desc {
        font-size: 0.95rem;
        color: var(--secondary-gray);
        margin-bottom: 1.2rem;
        line-height: 1.6;
      }
      
      .feature-link {
        display: inline-block;
        color: var(--primary-blue);
        font-size: 0.9rem;
        text-decoration: none;
        font-weight: bold;
        transition: var(--transition);
        
        &:hover {
          color: var(--primary-green);
          transform: translateX(5px);
        }
      }
    }
  }
}

/* 客户案例 - 新增样式 */
.case-studies {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  
  .case-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    
    &:hover {
      transform: translateY(-10px);
      box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    }
    
    .case-image {
      position: relative;
      height: 200px;
      overflow: hidden;
      
      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: var(--transition);
      }
      
      &:hover img {
        transform: scale(1.1);
      }
      
      .case-tag {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: var(--primary-gold);
        color: #333;
        padding: 0.3rem 0.8rem;
        border-radius: 30px;
        font-size: 0.8rem;
        font-weight: bold;
      }
    }
    
    .case-content {
      padding: 1.5rem;
      
      h3 {
        font-size: 1.3rem;
        color: var(--primary-blue);
        margin-bottom: 0.8rem;
      }
      
      .case-desc {
        font-size: 0.95rem;
        color: var(--secondary-gray);
        margin-bottom: 1.5rem;
        line-height: 1.6;
      }
      
      .case-stats {
        display: flex;
        justify-content: space-around;
        margin-bottom: 1.5rem;
        
        .stat-item {
          text-align: center;
          
          .stat-value {
            font-size: 1.8rem;
            font-weight: bold;
            color: var(--primary-blue);
            line-height: 1;
          }
          
          .stat-label {
            font-size: 0.8rem;
            color: var(--secondary-gray);
          }
        }
      }
      
      .case-link {
        display: inline-block;
        color: var(--primary-blue);
        font-weight: bold;
        text-decoration: none;
        transition: var(--transition);
        
        &:hover {
          color: var(--primary-green);
          transform: translateX(5px);
        }
      }
    }
  }
}

/* 联系我们 - 新增样式 */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  
  .contact-info {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(47, 125, 173, 0.1), rgba(91, 140, 90, 0.1));
    
    h2 {
      font-size: 2rem;
      color: var(--primary-blue);
      margin-bottom: 1.5rem;
    }
    
    .contact-description {
      font-size: 1.1rem;
      color: var(--secondary-gray);
      margin-bottom: 2rem;
      line-height: 1.8;
    }
    
    .contact-methods {
      .contact-method {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
        
        img {
          width: 40px;
          height: auto;
        }
        
        h4 {
          font-size: 1.1rem;
          color: var(--primary-blue);
          margin-bottom: 0.3rem;
        }
        
        p {
          font-size: 0.95rem;
          color: var(--secondary-gray);
          margin: 0;
          line-height: 1.6;
        }
      }
    }
  }
  
  .contact-form {
    padding: 2rem;
    
    h3 {
      font-size: 1.5rem;
      color: var(--primary-blue);
      margin-bottom: 1.5rem;
    }
    
    .form-group {
      margin-bottom: 1.2rem;
      
      label {
        display: block;
        font-size: 0.9rem;
        color: var(--secondary-gray);
        margin-bottom: 0.5rem;
      }
      
      input, textarea {
        width: 100%;
        padding: 0.8rem;
        border: 1px solid #ddd;
        border-radius: var(--border-radius);
        font-size: 1rem;
        transition: var(--transition);
        
        &:focus {
          outline: none;
          border-color: var(--primary-blue);
          box-shadow: 0 0 0 2px rgba(47, 125, 173, 0.2);
        }
      }
      
      textarea {
        resize: vertical;
        min-height: 100px;
      }
    }
    
    .submit-btn {
      background: var(--primary-blue);
      color: white;
      border: none;
      padding: 0.8rem 2rem;
      border-radius: var(--border-radius);
      font-size: 1rem;
      font-weight: bold;
      cursor: pointer;
      transition: var(--transition);
      width: 100%;
      
      &:hover {
        background: var(--primary-green);
        transform: translateY(-2px);
      }
    }
  }
}

/* 页脚 - 增强样式 */
.footer {
  background-color: #2a2a2a;
  color: white;
  padding: 3rem 10% 0;
  
  .footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
    
    .footer-about {
      .footer-logo {
        width: 150px;
        height: auto;
        margin-bottom: 1.5rem;
      }
      
      .about-text {
        font-size: 0.95rem;
        color: #ccc;
        line-height: 1.8;
        margin-bottom: 1.5rem;
      }
      
      .qrcode {
        text-align: center;
        
        img {
          width: 120px;
          height: auto;
          margin-bottom: 0.5rem;
        }
        
        p {
          font-size: 0.8rem;
          color: #999;
        }
      }
    }
    
    .footer-links {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 2rem;
      
      .link-group {
        h4 {
          font-size: 1.1rem;
          color: white;
          margin-bottom: 1.2rem;
          position: relative;
          padding-bottom: 0.5rem;
          
          &::after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 40px;
            height: 2px;
            background: var(--primary-gold);
          }
        }
        
        ul {
          list-style: none;
          
          li {
            margin-bottom: 0.8rem;
            
            a {
              color: #ccc;
              text-decoration: none;
              font-size: 0.9rem;
              transition: var(--transition);
              
              &:hover {
                color: var(--primary-gold);
                padding-left: 5px;
              }
            }
          }
        }
      }
    }
  }
  
  .footer-bottom {
    padding: 2rem 0;
    border-top: 1px solid #444;
    
    .social-media {
      display: flex;
      justify-content: center;
      gap: 1.5rem;
      margin-bottom: 1.5rem;
      
      .social-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        text-decoration: none;
        font-size: 0.8rem;
        transition: var(--transition);
        
        &.wechat { background-color: #07C160; }
        &.weibo { background-color: #E6162D; }
        &.douyin { background-color: #000; }
        &.toutiao { background-color: #FF4D4F; }
        
        &:hover {
          transform: translateY(-5px);
          box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }
      }
    }
    
    .copyright {
      text-align: center;
      font-size: 0.8rem;
      color: #999;
      line-height: 1.6;
    }
  }
}

/* 动画效果 */
@keyframes movePattern {
  0% { background-position: 0 0; }
  100% { background-position: 1000px 1000px; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .navbar {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    
    .nav-links {
      margin: 1rem 0;
      flex-wrap: wrap;
      justify-content: center;
    }
    
    .search-box {
      margin-top: 1rem;
      width: 100%;
      
      input {
        width: 100%;
      }
    }
  }
  
  .support-banner {
    height: auto;
    padding: 4rem 1rem;
    
    .banner-image {
      width: 100%;
    }
  }
  
  .footer-links {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .module-container,
  .case-studies {
    grid-template-columns: 1fr;
  }
  
  .permission-tabs {
    flex-direction: column;
    
    .tab-btn {
      width: 100%;
      justify-content: center;
    }
  }
  
  .footer-links {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 576px) {
  :host {
    --section-padding: 3rem 5%;
  }
  
  .banner-title {
    font-size: 2.5rem !important;
  }
  
  .banner-subtitle {
    font-size: 1.2rem !important;
  }
  
  .banner-buttons {
    flex-direction: column;
    gap: 1rem !important;
  }
  
  .section-title {
    font-size: 2rem !important;
  }
}