<template>
  <div class="profile-detail-page">
    <!-- 页面头部 -->
    <div class="page-header">
      <div class="header-content">
        <div class="back-btn" @click="goBack">
          <div class="back-icon">
            <svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor">
              <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/>
            </svg>
          </div>
        </div>
        <h1 class="page-title">个人详情</h1>
        <div class="header-placeholder"></div>
      </div>
    </div>

    <!-- 个人信息卡片 -->
    <div class="info-section">
      <div class="info-card">
        <div class="card-header">
          <h3 class="card-title">基本信息</h3>
        </div>
        <div class="card-body">
          <div class="info-item">
            <div class="info-label">
              <span class="label-text">用户名</span>
            </div>
            <span class="info-value">张三</span>
          </div>
          <div class="info-item">
            <div class="info-label">
              <span class="label-text">手机号</span>
            </div>
            <span class="info-value">138****8888</span>
          </div>
          <div class="info-item">
            <div class="info-label">
              <span class="label-text">注册时间</span>
            </div>
            <span class="info-value">2024-03-20</span>
          </div>
          <div class="info-item">
            <div class="info-label">
              <span class="label-text">账户余额</span>
            </div>
            <span class="info-value balance">¥ 1,000.00</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ProfileDetail',
  methods: {
    goBack() {
      this.$router.go(-1)
    }
  }
}
</script>

<style lang="scss" scoped>
.profile-detail-page {
  min-height: 100vh;
  background: linear-gradient(to bottom, #2f9580 0%, #4fb3a1 100%);
  padding-bottom: 80px;
}

/* 页面头部 */
.page-header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 0 16px;
}

.page-header .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.page-header .header-content .back-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-header .header-content .back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.page-header .header-content .back-btn .back-icon {
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-header .header-content .page-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  text-align: center;
  flex: 1;
}

.page-header .header-content .header-placeholder {
  width: 40px;
}

/* 信息区域 */
.info-section {
  padding: 20px 16px;
}

.info-section .info-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-section .info-card .card-header {
  background: linear-gradient(135deg, #f8fffe 0%, #f0fdfb 100%);
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.info-section .info-card .card-header .card-title {
  font-size: 18px;
  font-weight: 600;
  color: #2f9580;
  margin: 0;
}

.info-section .info-card .card-body {
  padding: 0;
}

.info-section .info-card .card-body .info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f3f4f6;
  transition: all 0.3s ease;
}

.info-section .info-card .card-body .info-item:last-child {
  border-bottom: none;
}

.info-section .info-card .card-body .info-item:hover {
  background: rgba(47, 149, 128, 0.02);
}

.info-section .info-card .card-body .info-item .info-label {
  display: flex;
  align-items: center;
}

.info-section .info-card .card-body .info-item .info-label .label-text {
  font-size: 15px;
  color: #6b7280;
  font-weight: 500;
}

.info-section .info-card .card-body .info-item .info-value {
  font-size: 15px;
  color: #374151;
  font-weight: 600;
}

.info-section .info-card .card-body .info-item .info-value.balance {
  color: #2f9580;
  font-weight: 700;
  font-size: 16px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .profile-detail-page {
    background: linear-gradient(to bottom, #2f9580 0%, #4fb3a1 100%);
  }
  
  .page-header {
    padding: 0 12px;
  }
  
  .page-header .header-content {
    height: 50px;
  }
  
  .page-header .header-content .back-btn {
    width: 36px;
    height: 36px;
  }
  
  .page-header .header-content .back-btn .back-icon svg {
    width: 18px;
    height: 18px;
  }
  
  .page-header .header-content .page-title {
    font-size: 16px;
  }
  
  .page-header .header-content .header-placeholder {
    width: 36px;
  }
  
  .info-section {
    padding: 16px 12px;
  }
  
  .info-section .info-card .card-header {
    padding: 16px 20px;
  }
  
  .info-section .info-card .card-header .card-title {
    font-size: 16px;
  }
  
  .info-section .info-card .card-body .info-item {
    padding: 16px 20px;
  }
  
  .info-section .info-card .card-body .info-item .info-label .label-text {
    font-size: 14px;
  }
  
  .info-section .info-card .card-body .info-item .info-value {
    font-size: 14px;
  }
  
  .info-section .info-card .card-body .info-item .info-value.balance {
    font-size: 15px;
  }
}

/* 状态栏适配 */
@media screen and (max-width: 414px) {
  .page-header {
    padding-top: env(safe-area-inset-top);
  }
}
</style> 