/* ==========================================================================
   LuckWebUI - 幸运标签编辑器全局样式
   充满正能量的温馨设计系统
   ========================================================================== */

/* ==========================================================================
   LuckWebUI Security Layer - CSS Hidden Authentication Keys
   ========================================================================== */
.luckwebui-env-auth::before {
    content: "LUCKWEBUI_2024_SECURE_ENV";
    display: none;
    position: absolute;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.luckwebui-validation-marker {
    --luckwebui-auth-key: "ENV_VALIDATED";
    --luckwebui-instance-id: "INSTANCE_ACTIVE";
    --luckwebui-security-level: "TRIPLE_LAYER";
    display: none;
}

.luckwebui-timestamp-validator {
    --luckwebui-load-time: "DYNAMIC_TIMESTAMP";
    visibility: hidden;
    height: 0;
    width: 0;
    overflow: hidden;
}
/* ========================================================================== */

/* 基础设置 */
html {
  font-size: 14px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
  margin-bottom: 0;
}

/* 主要内容区域 */
.main-content {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   导航栏样式
   ========================================================================== */

.main-header .navbar {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.5rem;
  color: #b91c1c !important;
  text-decoration: none;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  color: #ad1457 !important;
  transform: scale(1.05);
}

.brand-icon {
  font-size: 1.8rem;
  animation: gentle-bounce 3s ease-in-out infinite;
}

@keyframes gentle-bounce {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-3px); }
}

.brand-text {
  background: linear-gradient(45deg, #f8bbd9, #b91c1c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* 导航链接 */
.navbar-nav .nav-link {
  color: #555 !important;
  font-weight: 500;
  padding: 8px 16px !important;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: #b91c1c !important;
  background: rgba(248, 187, 217, 0.15);
  transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
  color: #b91c1c !important;
  background: rgba(248, 187, 217, 0.2);
}

/* 用户菜单 */
.user-menu {
  display: flex;
  align-items: center;
  color: #555 !important;
  text-decoration: none;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f8bbd9, #b91c1c);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.user-avatar .avatar-text {
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.user-menu:hover .user-avatar {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(248, 187, 217, 0.4);
}

.user-dropdown-menu {
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  margin-top: 10px;
}

.user-dropdown-menu .dropdown-item {
  padding: 12px 20px;
  border-radius: 10px;
  margin: 5px 10px;
  transition: all 0.3s ease;
}

.user-dropdown-menu .dropdown-item:hover {
  background: rgba(248, 187, 217, 0.15);
  transform: translateX(5px);
}

/* ==========================================================================
   按钮样式系统
   ========================================================================== */

.btn {
  border-radius: 25px;
  font-weight: 500;
  padding: 8px 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(45deg, #f8bbd9, #b91c1c);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(248, 187, 217, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(45deg, #f06292, #ad1457);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(248, 187, 217, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline-primary {
  border: 2px solid #b91c1c;
  color: #b91c1c;
  background: transparent;
}

.btn-outline-primary:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(248, 187, 217, 0.4);
}

/* 按钮波纹效果 */
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.5s ease;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn > * {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   表单样式
   ========================================================================== */

.form-control {
  border: 2px solid #e9ecef;
  border-radius: 25px;
  padding: 12px 20px;
  transition: all 0.3s ease;
  background: #fff;
}

.form-control:focus {
  border-color: #f8bbd9;
  box-shadow: 0 0 0 0.2rem rgba(248, 187, 217, 0.25);
  transform: translateY(-1px);
}

.form-control::placeholder {
  color: #adb5bd;
  opacity: 0.8;
}

.form-label {
  color: #495057;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-check-input:checked {
  background-color: #b91c1c;
  border-color: #b91c1c;
}

.form-check-input:focus {
  border-color: #f8bbd9;
  box-shadow: 0 0 0 0.25rem rgba(248, 187, 217, 0.25);
}

/* ==========================================================================
   页脚样式
   ========================================================================== */

.main-footer {
  background: linear-gradient(135deg, #2c3e50 0%, #3c4859 100%) !important;
  margin-top: auto;
}

.footer-title {
  color: #fff;
  font-size: 1.1rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 5px 0;
  display: block;
}

.footer-link:hover {
  color: #fff;
  transform: translateX(5px);
  text-decoration: none;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: #b91c1c;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(248, 187, 217, 0.4);
}

/* ==========================================================================
   返回顶部按钮
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f8bbd9, #b91c1c);
  border: none;
  color: white;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: linear-gradient(45deg, #f06292, #ad1457);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(248, 187, 217, 0.5);
}

/* ==========================================================================
   全局消息提示
   ========================================================================== */

/* 全局消息容器 - 简单有效 */
#globalMessageContainer {
  max-width: 400px;
  width: auto;
}

/* Toast消息基础样式 - 保持简洁 */
#globalMessageContainer .alert {
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
  font-size: 14px;
  max-width: 100%;
  min-width: 300px;
}

/* 确保关闭按钮正常显示 */
#globalMessageContainer .alert-dismissible .btn-close {
  font-size: 14px;
  opacity: 0.6;
  width: 20px;
  height: 20px;
}

#globalMessageContainer .alert-dismissible .btn-close:hover {
  opacity: 1;
}

/* 移动设备优化 */
@media (max-width: 576px) {
  #globalMessageContainer {
    max-width: 350px;
  }
  
  #globalMessageContainer .alert {
    min-width: 280px;
    font-size: 13px;
  }
}

.alert-success {
  background: linear-gradient(45deg, rgba(40, 167, 69, 0.1), rgba(32, 201, 151, 0.1));
  border-left: 4px solid #28a745;
  color: #155724;
}

.alert-danger {
  background: linear-gradient(45deg, rgba(220, 53, 69, 0.1), rgba(232, 62, 140, 0.1));
  border-left: 4px solid #dc3545;
  color: #721c24;
}

.alert-warning {
  background: linear-gradient(45deg, rgba(255, 193, 7, 0.1), rgba(253, 126, 20, 0.1));
  border-left: 4px solid #ffc107;
  color: #856404;
}

.alert-info {
  background: linear-gradient(45deg, rgba(23, 162, 184, 0.1), rgba(111, 66, 193, 0.1));
  border-left: 4px solid #17a2b8;
  color: #0c5460;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==========================================================================
   响应式设计
   ========================================================================== */

@media (max-width: 768px) {
  body {
    padding-top: 80px;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .brand-icon {
    font-size: 1.4rem;
  }
  
  .btn {
    padding: 10px 20px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
  }
}

/* ==========================================================================
   工具类
   ========================================================================== */

.text-gradient {
  color: #b91c1c;
}

/* 修复emoji图标在渐变文本中的显示问题 */
.welcome-icon {
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  background-clip: initial !important;
  color: initial !important;
}

.bg-gradient-primary {
  background: linear-gradient(45deg, #f8bbd9, #b91c1c) !important;
}

.shadow-soft {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
}

.rounded-xl {
  border-radius: 1rem !important;
}

/* ==========================================================================
   动画效果
   ========================================================================== */

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

.fade-in-up {
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}