/* 全局样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  line-height: 1.6;
}

/* 主页面布局样式 */
/* 头部标题 - 可折叠 */
.header {
  padding: 5%;
  text-align: center;
  background: rgba(30, 30, 30, 0.7);
  color: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.5s ease;
  overflow: hidden;
  position: relative;
}

.header.collapsed {
  padding: 1% 5%;
  max-height: 60px;
}

.header.collapsed h1 {
  font-size: 1.5rem;
  animation: none;
  text-shadow: none;
}

.header.collapsed p {
  display: none;
}

/* 最小化按钮 */
.minimize-btn {
  position: absolute;
  right: 20px;
  top: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  z-index: 10;
}

.minimize-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

/* 标题样式 */
.header h1 {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 0;
  background: linear-gradient(45deg, #4CAF50, #8BC34A, #CDDC39, #FFEB3B);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 
    3px 3px 0 #333,
    6px 6px 0 rgba(0,0,0,0.1);
  animation: 
    gradientShift 8s ease infinite,
    float 3s ease-in-out infinite alternate;
  display: inline-block;
  padding: 0 20px;
  position: relative;
  transition: all 0.5s ease;
}

.header h1:hover {
  transform: scale(1.05);
  text-shadow: 
    4px 4px 0 #333,
    8px 8px 0 rgba(0,0,0,0.1);
}

.header h1::before,
.header h1::after {
  content: "";
  position: absolute;
  height: 4px;
  width: 50%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  top: 100%;
  left: 25%;
  border-radius: 100%;
  filter: blur(1px);
}

.header h1::after {
  top: auto;
  bottom: 100%;
}

.header p {
  font-size: 1.5rem;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.8);
  animation: fadeIn 2s ease-in-out;
}

/* 导航条 */
.topnav {
  display: flex;
  justify-content: center;
  background-color: rgba(30, 30, 30, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
}

/* 导航链接 */
.topnav a {
  color: #f2f2f2;
  text-align: center;
  padding: 1.2rem 2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 1px;
  position: relative;
}

.topnav a:hover {
  background-color: rgba(76, 175, 80, 0.5);
  color: white;
}

.topnav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #4CAF50;
  transition: width 0.3s ease;
}

.topnav a:hover::after {
  width: 60%;
}

/* 内容区域 */
#content-container {
  min-height: 70vh;
  position: relative;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  padding: 20px;
}

#content-iframe {
  width: 100%;
  height: 100%;
  border: none;
  min-height: 70vh;
}

/* 内容页面样式 */
.row {  
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

/* 左侧列 (主要内容) */
.leftcolumn {   
  flex: 75%;
  padding: 0 10px;
}

/* 右侧列 (侧边栏) */
.rightcolumn {
  flex: 25%;
  padding: 0 10px;
}

/* 卡片效果 */
.card {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
  transition: 0.3s;
}

.card:hover {
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}

/* 底部 */
.footer {
  padding: 2rem;
  text-align: center;
  background-color: rgba(30, 30, 30, 0.9);
  color: white;
  margin-top: 2rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
}

.footer h5 {
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 1px;
}

/* 活动菜单项 */
.topnav a.active {
  background-color: rgba(76, 175, 80, 0.7);
}

.topnav a.active::after {
  width: 60%;
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

/* 响应式设计 */
@media screen and (max-width: 800px) {
  .header h1 {
    font-size: 2.5rem;
  }
  
  .header p {
    font-size: 1.2rem;
  }
  
  .leftcolumn, .rightcolumn {   
    flex: 100%;
    padding: 0;
  }
}

@media screen and (max-width: 400px) {
  .topnav {
    flex-direction: column;
  }
  
  .topnav a {
    width: 100%;
    padding: 1rem;
  }
  
  .header h1 {
    font-size: 2rem;
  }
}
/* 设置按钮样式 */
.settings-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: rgba(76, 175, 80, 0.8);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.settings-btn:hover {
  background: rgba(76, 175, 80, 1);
  transform: rotate(30deg) scale(1.1);
}

/* 设置面板样式 */
.settings-panel {
  position: fixed;
  right: -300px;
  top: 0;
  width: 280px;
  height: 100vh;
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease;
  z-index: 999;
  color: white;
  overflow-y: auto;
}

.settings-panel.show {
  right: 0;
}

.settings-panel h3 {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.setting-group {
  margin-bottom: 15px;
}

.setting-group label {
  display: block;
  margin-bottom: 5px;
}

.setting-group select {
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
}

.save-btn {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
  transition: background 0.3s;
}

.save-btn:hover {
  background: #45a049;
}

/* 暗黑模式切换开关 */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: #4CAF50;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* 背景主题 */
body.default-bg {
  background-image: url('https://images.unsplash.com/photo-1518655048521-f130df041f66?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
}

body.minecraft-bg {
  background-image: url('https://images.unsplash.com/photo-1607513746994-51f730a44832?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
}

body.nether-bg {
  background-image: url('https://static.wikia.nocookie.net/minecraft_gamepedia/images/7/7a/Nether_wart_block.png');
}

body.end-bg {
  background-image: url('https://static.wikia.nocookie.net/minecraft_gamepedia/images/1/13/End_stone.png');
}

body.village-bg {
  background-image: url('https://static.wikia.nocookie.net/minecraft_gamepedia/images/9/9e/Oak_Planks.png');
}

/* 暗黑模式 */
body.dark-mode {
  color: #f0f0f0;
}

body.dark-mode .card {
  background-color: rgba(40, 40, 40, 0.9);
  color: #f0f0f0;
}

body.dark-mode #content-container {
  background-color: rgba(30, 30, 30, 0.8);
}
/* 背景样式 - 固定不滚动 */
body {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  transition: background-image 0.5s ease;
}

/* 默认背景 */
body.default-bg {
  background-image: url('https://images.unsplash.com/photo-1518655048521-f130df041f66?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
}

/* Minecraft风格背景 */
body.minecraft-bg {
  background-image: url('https://images.unsplash.com/photo-1627855437693-dcc7b0c4ba7b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
}

body.nether-bg {
  background-image: url('https://static.wikia.nocookie.net/minecraft_gamepedia/images/7/7a/Nether_wart_block.png/revision/latest?cb=20200317213912');
}

body.end-bg {
  background-image: url('https://static.wikia.nocookie.net/minecraft_gamepedia/images/1/13/End_stone.png/revision/latest?cb=20200317213603');
}

body.village-bg {
  background-image: url('https://static.wikia.nocookie.net/minecraft_gamepedia/images/9/9e/Oak_Planks.png/revision/latest?cb=20200317213818');
}

/* 确保内容区域半透明 */
#content-container {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  min-height: 70vh;
}

/* 暗黑模式下的内容区域 */
body.dark-mode #content-container {
  background-color: rgba(30, 30, 30, 0.8);
}
/* 添加以下样式到 styles.css */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.2);
}

.auth-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 5px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  font-size: 14px;
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.logout-btn, .profile-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}