/* 全局样式文件 */
/* 包含整个应用的通用样式 */

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #e0e0e0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  background-attachment: fixed;
}

/* 隐藏滚动条 */
body::-webkit-scrollbar {
  display: none;
}

/* 主容器 */
#app {
  min-height: 100vh;
  background: rgba(30, 30, 46, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin: 15px;
  padding: 15px;
  margin-bottom: 70px; /* 为底部导航栏留出空间 */
}

/* 底部导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(30, 30, 46, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  z-index: 9999;
  margin: 0 15px;
  border-radius: 12px 12px 0 0;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #888888;
  font-size: 12px;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 8px;
}

.nav-item.active {
  color: #667eea;
  font-weight: 600;
}

.nav-item:hover {
  background: rgba(102, 126, 234, 0.2);
}

.nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

/* 通用按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #e083eb 0%, #e5475c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #33d96b 0%, #28e9c7 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  color: white;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #ff5b5b 0%, #ff7e43 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.btn-block {
  display: block;
  width: 100%;
}

/* 通用卡片样式 */
.card {
  background: rgba(40, 40, 60, 0.8);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  padding: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #ffffff;
}

/* 通用表单样式 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #bbbbbb;
  font-size: 16px;
}

.form-control {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  line-height: 1.5;
  color: #e0e0e0;
  background: rgba(50, 50, 70, 0.8);
  background-clip: padding-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-control:focus {
  border-color: #667eea;
  outline: 0;
  box-shadow: 0 6px 8px rgba(102, 126, 234, 0.3);
  background: rgba(60, 60, 80, 1);
}

.form-control::placeholder {
  color: #888888;
}

/* 滑动验证码样式 */
.slide-captcha-container {
  width: 100%;
  margin: 10px 0;
}

.slide-captcha {
  position: relative;
  width: 100%;
  height: 40px;
  background: #2d2d44;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.slide-captcha-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: #4caf50;
  transition: width 0.3s;
}

.slide-captcha-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 100%;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #666666;
  user-select: none;
}

.slide-captcha-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: #cccccc;
  pointer-events: none;
}

.slide-captcha-success {
  background: #4caf50 !important;
}

.slide-captcha-success .slide-captcha-text {
  color: #ffffff;
}

/* 通用工具类 */
.text-center {
  text-align: center;
}

.text-muted {
  color: #888888;
}

.text-success {
  color: #43e97b;
}

.text-danger {
  color: #ff6b6b;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.d-flex {
  display: flex;
}

.justify-content-between {
  justify-content: space-between;
}

.align-items-center {
  align-items: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
  #app {
    margin: 10px;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 70px; /* 为底部导航栏留出空间 */
  }
  
  .bottom-nav {
    margin: 0 10px;
    border-radius: 10px 10px 0 0;
  }
  
  .nav-item {
    font-size: 10px;
    padding: 6px 12px;
  }
  
  .nav-icon {
    font-size: 18px;
  }
}