/* 小虎编程主题样式 - 参考小码王风格 */

:root {
  --primary-color: #00aaff;     /* 主色调：亮蓝色 */
  --secondary-color: #ff6600;   /* 辅助色：橙色 */
  --accent-color: #7ed321;      /* 强调色：绿色 */
  --text-color: #333333;        /* 文本颜色 */
  --light-bg: #f2f7ff;          /* 浅色背景 */
  --dark-bg: #363796;           /* 深色背景 */
  --border-radius: 12px;        /* 圆角半径 */
  --card-shadow: 0 8px 16px rgba(53, 98, 243, 0.15);  /* 卡片阴影 */
}

/* 全局样式重置 */
body {
  font-family: "PingFang SC", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  color: var(--text-color);
  background-color: #fafcff;
  margin: 0;
  padding: 0;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar-logo {
  display: flex;
  align-items: center;
}

.navbar-logo img {
  height: 40px;
  border-radius: 8px;
  margin-right: 10px;
}

.navbar-logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-color);
}

.navbar-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-menu li {
  position: relative;
  margin: 0 15px;
}

.navbar-menu li a {
  color: var(--text-color);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  padding: 5px 0;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-menu li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -5px;
  left: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
  border-radius: 3px;
}

.navbar-menu li a:hover {
  color: var(--primary-color);
}

.navbar-menu li a:hover::after,
.navbar-menu li a.active::after {
  width: 100%;
}

.navbar-menu li a.active {
  color: var(--primary-color);
  font-weight: 600;
}

.navbar-right {
  display: flex;
  align-items: center;
}

.navbar-login-btn {
  background: linear-gradient(135deg, var(--secondary-color), #ff9500);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  text-decoration: none;
}

.navbar-login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 102, 0, 0.3);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--primary-color);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.navbar-user {
  display: flex;
  align-items: center;
}

.navbar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
  border: 2px solid var(--primary-color);
}

.navbar-user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--primary-color);
}

/* 响应式导航 */
@media (max-width: 768px) {
  .navbar {
    padding: 0 15px;
  }
  
  .navbar-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-100vh);
    transition: transform 0.4s ease;
    z-index: 999;
  }
  
  .navbar-menu.active {
    transform: translateY(0);
  }
  
  .navbar-menu li {
    margin: 15px 0;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
}

/* 适配导航栏的内容区域样式 */
.with-navbar {
  padding-top: 70px;
}

/* 头部区域样式 */
#top_box {
  background: linear-gradient(135deg, #429dff, #3651f4);
  padding: 40px 0 30px 0;
  box-shadow: 0 4px 20px rgba(54, 81, 244, 0.2);
  position: relative;
  overflow: hidden;
}

#top_box::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

#top_box::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: 10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  z-index: 0;
}

#top_bg {
  background-image: none !important;
}

#top_overlay {
  opacity: 0;
}

/* 标志和头像样式 */
#avatar_img {
  border-radius: 18px;
  border: 4px solid white;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#avatar_img:hover {
  transform: translateY(-5px) rotate(5deg);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

#txt_username {
  font-weight: 800;
  font-size: 2em;
  margin-top: 15px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 按钮样式 */
.layui-btn {
  border-radius: 30px;
  font-weight: bold;
  font-size: 16px;
  padding: 0 25px;
  height: 42px;
  line-height: 42px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border: none;
}

.layui-btn-danger {
  background: linear-gradient(135deg, #ff9500, #ff5e3a) !important;
}

.layui-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.layui-btn-primary {
  border: 1px solid #e2e2e2;
  background-color: white !important;
  color: #333;
}

.layui-btn-primary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* 作品卡片样式 */
.img-slt {
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.txt-project-title {
  background-color: white;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  font-weight: bold;
  font-size: 16px;
  padding: 12px 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  color: #333;
}

.layui-col-md3:hover .img-slt {
  transform: translateY(-8px);
}

/* 搜索框样式 */
.layui-input {
  border-radius: 30px;
  height: 42px;
  border: 2px solid #e8f0fd;
  padding-left: 20px;
  transition: all 0.3s ease;
  font-size: 14px;
  background-color: #f8faff;
}

.layui-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(53, 152, 219, 0.2);
  background-color: white;
}

/* 创作块样式 */
.aspectration {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.4s ease;
  background-color: white;
}

.aspectration:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 15px 30px rgba(53, 98, 243, 0.2);
}

.aspectration > img {
  transition: all 0.5s ease;
}

.aspectration:hover > img {
  transform: scale(1.05);
}

/* 页脚样式 */
.footer-box {
  background: linear-gradient(135deg, #363796, #2c64c6);
  color: white;
  padding: 40px 0;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  position: relative;
  overflow: hidden;
}

.footer-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary-color), var(--accent-color), var(--primary-color));
}

/* 章节标题样式 */
.section-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-left: 15px;
  border-left: 5px solid var(--secondary-color);
  line-height: 1.2;
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatAnimation {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.animate-float {
  animation: floatAnimation 4s ease-in-out infinite;
}

/* 登录注册卡片样式 */
.login-card {
  background-color: white;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.login-card:hover {
  box-shadow: 0 12px 24px rgba(53, 98, 243, 0.2);
}

.login-card .title {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-color);
}

.login-card .title:after {
  background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
  height: 4px;
  width: 60px;
  border-radius: 2px;
}

/* 404页面样式 */
#err-box {
  background: linear-gradient(135deg, #429dff, #3651f4);
}

#err-code {
  font-size: 150px;
  font-weight: 900;
  color: white;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  opacity: 0.8;
}

#err-info {
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
} 