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

/* ==========================================================================
   全局字体映射声明（@font-face）
   将 GDI 风格字体族名映射到系统本地字体名，确保 SVG 预览在所有页面正确渲染。
   如需支持更多字体，在此处按相同格式追加 @font-face 规则即可，无需修改代码。
   ========================================================================== */

/* 阿里巴巴普惠体 3.0 */
@font-face {
  font-family: "阿里巴巴普惠体 3.0 35 Thin";
  src: local("阿里巴巴普惠体 3.0 35 Thin"),
       local("AlibabaPuHuiTi-3-35-Thin"),
       local("阿里巴巴普惠体 3 35 Thin"),
       local("Alibaba PuHuiTi 3.0 35 Thin"),
       local("Alibaba PuHuiTi 3.0");
}
@font-face {
  font-family: "阿里巴巴普惠体 3.0 45 Light";
  src: local("阿里巴巴普惠体 3.0 45 Light"),
       local("AlibabaPuHuiTi-3-45-Light"),
       local("阿里巴巴普惠体 3 45 Light"),
       local("Alibaba PuHuiTi 3.0 45 Light"),
       local("Alibaba PuHuiTi 3.0");
}
@font-face {
  font-family: "阿里巴巴普惠体 3.0 55 Regular";
  src: local("阿里巴巴普惠体 3.0 55 Regular"),
       local("AlibabaPuHuiTi-3-55-Regular"),
       local("阿里巴巴普惠体 3 55 Regular"),
       local("Alibaba PuHuiTi 3.0 55 Regular"),
       local("Alibaba PuHuiTi 3.0");
}
@font-face {
  font-family: "阿里巴巴普惠体 3.0 65 Medium";
  src: local("阿里巴巴普惠体 3.0 65 Medium"),
       local("AlibabaPuHuiTi-3-65-Medium"),
       local("阿里巴巴普惠体 3 65 Medium"),
       local("Alibaba PuHuiTi 3.0 65 Medium"),
       local("Alibaba PuHuiTi 3.0");
}
@font-face {
  font-family: "阿里巴巴普惠体 3.0 75 SemiBold";
  src: local("阿里巴巴普惠体 3.0 75 SemiBold"),
       local("AlibabaPuHuiTi-3-75-SemiBold"),
       local("阿里巴巴普惠体 3 75 SemiBold"),
       local("Alibaba PuHuiTi 3.0 75 SemiBold"),
       local("Alibaba PuHuiTi 3.0");
}
@font-face {
  font-family: "阿里巴巴普惠体 3.0 95 ExtraBold";
  src: local("阿里巴巴普惠体 3.0 95 ExtraBold"),
       local("AlibabaPuHuiTi-3-95-ExtraBold"),
       local("阿里巴巴普惠体 3 95 ExtraBold"),
       local("Alibaba PuHuiTi 3.0 95 ExtraBold"),
       local("Alibaba PuHuiTi 3.0");
}
@font-face {
  font-family: "阿里巴巴普惠体 3.0 105 Heavy";
  src: local("阿里巴巴普惠体 3.0 105 Heavy"),
       local("AlibabaPuHuiTi-3-105-Heavy"),
       local("阿里巴巴普惠体 3 105 Heavy"),
       local("Alibaba PuHuiTi 3.0 105 Heavy"),
       local("Alibaba PuHuiTi 3.0");
}
@font-face {
  font-family: "阿里巴巴普惠体 3.0 115 Black";
  src: local("阿里巴巴普惠体 3.0 115 Black"),
       local("AlibabaPuHuiTi-3-115-Black"),
       local("阿里巴巴普惠体 3 115 Black"),
       local("Alibaba PuHuiTi 3.0 115 Black"),
       local("Alibaba PuHuiTi 3.0");
}

/* Noto Sans SC */
@font-face {
  font-family: "Noto Sans SC Thin";
  src: local("Noto Sans SC Thin"), local("NotoSansSC-Thin");
}
@font-face {
  font-family: "Noto Sans SC Light";
  src: local("Noto Sans SC Light"), local("NotoSansSC-Light");
}
@font-face {
  font-family: "Noto Sans SC Regular";
  src: local("Noto Sans SC Regular"), local("NotoSansSC-Regular"), local("Noto Sans SC");
}
@font-face {
  font-family: "Noto Sans SC Medium";
  src: local("Noto Sans SC Medium"), local("NotoSansSC-Medium");
}
@font-face {
  font-family: "Noto Sans SC Bold";
  src: local("Noto Sans SC Bold"), local("NotoSansSC-Bold");
}
@font-face {
  font-family: "Noto Sans SC Black";
  src: local("Noto Sans SC Black"), local("NotoSansSC-Black");
}

/* ==========================================================================
   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;
  padding-right: 50px !important; /* 为关闭按钮预留空间 */
  word-wrap: break-word; /* 长文本自动换行 */
  word-break: break-word; /* 确保长文本换行 */
}

/* 确保关闭按钮正常显示 */
#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 {
  border-left: 4px solid #28a745;
  color: #155724;
}

.alert-danger {
  border-left: 4px solid #dc3545;
  color: #721c24;
}

.alert-warning {
  border-left: 4px solid #ffc107;
  color: #856404;
}

.alert-info {
  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;
    border-radius: 20px; /* 移动端稍微减小圆角 */
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
  
  /* 🆕 导航菜单移动端优化 */
  .navbar-nav {
    width: 100%;
  }
  
  .navbar-nav .nav-link {
    padding: 12px 16px !important;
    margin: 4px 0;
  }
  
  /* 🆕 表单控件移动端优化 */
  .form-control {
    border-radius: 20px; /* 移动端稍微减小圆角 */
    font-size: 16px; /* 防止iOS自动缩放 */
  }
  
  /* 🆕 用户下拉菜单移动端优化 */
  .user-dropdown-menu {
    position: fixed !important;
    top: 70px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-width: 100% !important;
  }
  
  /* 🆕 页脚移动端优化 */
  .main-footer {
    padding: 30px 0 20px !important;
  }
  
  .footer-link {
    padding: 8px 0;
    font-size: 14px;
  }
  
  .social-link {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* 按钮小屏幕优化 */
  .btn {
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 18px; /* 小屏幕更小的圆角 */
  }
  
  .btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
  }
  
  /* 🆕 表单控件小屏幕优化 */
  .form-control {
    padding: 10px 18px;
    font-size: 16px; /* 保持16px防止iOS缩放 */
    border-radius: 18px;
  }
  
  .form-label {
    font-size: 14px;
  }
  
  /* 🆕 导航品牌小屏幕优化 */
  .navbar-brand {
    font-size: 1rem;
  }
  
  .brand-icon {
    font-size: 1.2rem;
  }
  
  .brand-text {
    font-size: 0.9rem;
  }
  
  /* 🆕 页脚小屏幕优化 */
  .footer-title {
    font-size: 1rem;
    margin-bottom: 15px;
  }
  
  .social-link {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}

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

.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);
  }
}

/* 全局自定义滚动条样式 */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #b91c1c;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #991b1b;
}