@charset "utf-8";
@import url('https://fonts.loli.net/css?family=Poppins:100,200,300,400,500,600,700,800,900');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  min-height: 100vh;
  background: url(./background.jpg) center no-repeat fixed;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  padding: 20px;
}

/* 卡片容器样式 */
.card {
  position: relative; /* 相对定位，作为内部绝对定位元素的基准 */
  width: 350px;
  height: 200px; /* 卡片初始高度 */
  background: #fff; /* 白色背景 */
  border-radius: 20px; /* 圆角 */
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.15); /* 阴影效果 */
  transition: height 0.5s; /* 高度变化时的过渡动画 */
  margin-top: 70px; /* 为头像图片区域留出空间，因为头像向上偏移 */
}

/* 卡片悬停时的高度变化 */
.card:hover {
  height: 450px; /* 卡片展开后的高度 */
}

/* 头像图片容器样式 */
.imgBx {
  position: absolute; /* 绝对定位 */
  left: 50%; /* 水平居中 */
  top: -50px; /* 向上偏移，部分悬浮在卡片外 */
  transform: translateX(-50%); /* 精确水平居中 */
  width: 150px; /* 初始宽度 */
  height: 150px; /* 初始高度 */
  background: #fff; /* 白色背景，覆盖卡片 */
  border-radius: 20px; /* 圆角 */
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.35); /* 阴影效果 */
  overflow: hidden; /* 超出部分隐藏 */
  transition: width 0.6s, height 0.6s; /* 宽高变化的过渡动画 */
  z-index: 10; /* 确保头像在内容之上 */
}

/* 卡片悬停时头像容器的样式变化 */
.card:hover .imgBx {
  width: 250px; /* 展开后的宽度 */
  height: 250px; /* 展开后的高度 */
}

.imgBx img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card .content {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: hidden; 
}

.card .content .details {
  padding: 40px;
  padding-top: 80px;
  text-align: center;
  width: 100%;
  transition: transform 0.5s;
  transform: translateY(150px);
}

.card:hover .content .details {
  transform: translateY(0px);
}

.card .content .details h2 {
  font-size: 1.25em;
  font-weight: 600;
  color: #555;
  line-height: 1.2em;
}

.card .content .details h2 span {
  font-size: 0.75em;
  font-weight: 500;
  opacity: 0.5;
}

.card .content .details .data {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
}

.card .content .details .data h3 {
  font-size: 1em;
  color: #555;
  line-height: 1.2em;
  font-weight: 600;
}

.card .content .details .data h3 span {
  font-size: 0.85em;
  font-weight: 400;
  opacity: 0.5;
}

.card .content .details .actionBtn {
  display: flex;
  justify-content: space-around;
}

.card .content .details .actionBtn button {
  padding: 10px 30px;
  border-radius: 5px;
  border: none;
  outline: none;
  font-size: 1em;
  font-weight: 500;
  background: #ff5f95;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.card .content .details .actionBtn button:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.card .content .details .actionBtn button:nth-child(2) {
  border: 1px solid #999;
  color: #999;
  background: #fff;
}
.card .content .details .actionBtn button:nth-child(2):hover {
  background: #f0f0f0;
  color: #555;
}

.contact-link {
  font-size: 0.85em;
  font-weight: 400;
  opacity: 0.5;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s;
}

.contact-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* 一言 */
.hitokoto-fullpage {
  color: white; /* 文字颜色 */
  margin-top: 20px;
  margin-bottom: 20px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 80%;
  padding: 10px;
  background-color: rgba(0,0,0,0.3);
  border-radius: 8px;
}

.hitokoto-fullpage p {
  margin: 5px 0; /* 段落间距 */
}

#hitokoto_text {
  font-size: 1.1em;
  font-weight: 500;
}

#hitokoto_author {
  font-size: 0.9em;
  font-style: italic;
  opacity: 0.8;
}

#footer {
  text-align: center;
  width: 100%;
  color: white;
  font-size: 12px;
  line-height: 24px;
  margin-top: auto;
}

.beian-link {
    color: #00BFFF;
    text-decoration: none;
}

.beian-link:hover {
    text-decoration: underline;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url(./background.jpg) center no-repeat fixed;
    background-size: cover;
  }

  .card {
    background: #2d2d2d;
    box-shadow: 0 35px 80px rgba(255, 255, 255, 0.1);
  }

  .card .content .details h2 {
    color: #e0e0e0;
  }

  .card .content .details h2 span {
    opacity: 0.8;
  }

  .card .content .details .data h3 {
    color: #e0e0e0;
  }

  .card .content .details .data h3 span {
    color: rgba(224, 224, 224, 0.7);
  }

  .actionBtn button {
    background: #4a90e2 !important;
  }

  .actionBtn button:nth-child(2) {
    border-color: #666 !important;
    color: #e0e0e0 !important;
    background: #404040 !important;
  }

  .hitokoto-fullpage {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
  }

  #footer {
    color: rgba(224, 224, 224, 0.8);
  }

  /* 头像容器适配 */
  .imgBx {
    background: #404040;
    box-shadow: 0 15px 50px rgba(255, 255, 255, 0.1);
  }

  /* 按钮悬停状态 */
  .actionBtn button:hover {
    background: #357abd !important;
  }
  
  .actionBtn button:nth-child(2):hover {
    background: #505050 !important;
  }

  .contact-link {
    color: rgba(224, 224, 224, 0.7);
  }

  .beian-link {
    color: #87CEFA;
  }
}