<style>
/* 移动端适配 CSS */
@media screen and (max-width: 768px) {
  /* 基础重置 */
  * {
    box-sizing: border-box;
    max-width: 100%;
  }
  
  body {
    font-size: 14px;
    overflow-x: hidden;
  }
  
  /* 隐藏鼠标特效canvas在移动端 */
  #canvas {
    display: none;
  }
  
  /* 头部适配 */
  .top-header {
    padding: 8px 10px;
  }
  
  .header-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 5px;
  }
  
  .logo-section {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .site-logo {
    font-size: 18px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .slogan {
    font-size: 12px;
    text-align: center;
  }
  
  .mobile-menu-btn {
    display: block;
    position: absolute;
    right: 15px;
    top: 15px;
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .nav-section {
    display: none;
    width: 100%;
    flex-direction: column;
    margin-top: 10px;
  }
  
  .nav-section.active {
    display: flex;
  }
  
  .nav-link {
    width: 100%;
    margin: 5px 0;
    padding: 8px 12px;
    text-align: center;
    font-size: 14px;
  }
  
  .login-section {
    position: absolute;
    right: 60px;
    top: 15px;
  }
  
  .login-btn, .register-btn {
    padding: 4px 8px;
    font-size: 12px;
    margin: 0 2px;
  }
  
  /* 主内容区域适配 */
  .content {
    padding: 10px;
  }
  
  .jumbotron {
    padding: 15px 10px;
  }
  
  /* 视频区域适配 */
  .video-section {
    flex-direction: column;
    padding: 10px;
  }
  
  .video-left, .video-right {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .video-left h2, .video-right h2 {
    font-size: 18px;
    margin-bottom: 10px;
  }
  
  .video-left p, .video-right p {
    font-size: 13px;
    line-height: 1.4;
    margin: 5px 0;
  }
  
  .video-center {
    width: 100%;
    margin: 10px 0;
  }
  
  .video-container {
    height: 200px;
  }
  
  .feature-tags {
    flex-wrap: wrap;
    margin-top: 10px;
  }
  
  .feature-tag {
    width: 100%;
    margin: 5px 0;
    padding: 8px;
    font-size: 14px;
  }
  
  /* 激活码系统适配 */
  .activation-code-system {
    padding: 15px 10px;
  }
  
  .system-header a {
    font-size: 20px !important;
    padding: 10px 20px !important;
    text-align: center;
    display: block !important;
    white-space: normal !important;
    line-height: 1.3;
  }
  
  .code-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
  }
  
  .code-stat-card {
    padding: 12px 8px;
  }
  
  .code-stat-number {
    font-size: 22px;
  }
  
  .code-stat-label {
    font-size: 12px;
  }
  
  .scripts-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .script-card {
    padding: 15px;
  }
  
  .script-name {
    font-size: 16px;
  }
  
  .script-description {
    font-size: 13px;
    margin: 8px 0;
  }
  
  .script-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  /* 抽奖系统适配 */
  .lottery-system {
    padding: 15px 10px;
  }
  
  .lottery-header h2 {
    font-size: 20px;
  }
  
  .lottery-header p {
    font-size: 14px;
  }
  
  .lottery-container {
    flex-direction: column;
  }
  
  .lottery-info-section {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .lottery-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
  }
  
  .lottery-stat {
    padding: 12px;
  }
  
  .probability-section {
    padding: 15px;
  }
  
  .probability-title {
    font-size: 16px;
  }
  
  .probability-item {
    font-size: 13px;
    padding: 6px 10px;
  }
  
  .lottery-wheel-section {
    width: 100%;
  }
  
  .wheel-container {
    width: 280px;
    height: 280px;
    margin: 0 auto 20px;
  }
  
  .wheel-canvas {
    width: 280px !important;
    height: 280px !important;
  }
  
  .lottery-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
  }
  
  /* 按钮区域适配 */
  .button-sections {
    padding: 15px 10px;
  }
  
  .button-section {
    margin-bottom: 25px;
  }
  
  .section-title {
    font-size: 18px;
    margin-bottom: 12px;
  }
  
  .button-group {
    flex-direction: column;
    gap: 8px;
  }
  
  .button {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    margin: 5px 0;
  }
  
  /* 规则说明适配 */
  .rules {
    padding: 20px 10px;
  }
  
  .rules-title {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  .rules-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .rule-item {
    padding: 12px;
  }
  
  .rule-number {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  
  .rule-content h3 {
    font-size: 16px;
  }
  
  .rule-content p {
    font-size: 14px;
  }
  
  /* 弹窗适配 */
  .modal {
    width: 90%;
    max-width: 350px;
    padding: 20px;
    margin: 20px;
  }
  
  .modal-title {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  .activation-code {
    padding: 12px;
    margin: 12px 0;
  }
  
  .code-text {
    font-size: 16px;
    padding: 8px;
    word-break: break-all;
  }
  
  .modal-info {
    padding: 15px 10px;
  }
  
  .info-row {
    margin: 8px 0;
    font-size: 14px;
  }
  
  .modal-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .modal-btn {
    width: 100%;
    margin: 5px 0;
  }
  
  /* 抽奖结果弹窗适配 */
  .lottery-result-content {
    width: 90%;
    max-width: 320px;
    padding: 20px;
  }
  
  .result-title {
    font-size: 20px;
  }
  
  .result-icon {
    font-size: 40px;
    margin: 15px 0;
  }
  
  .result-prize {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  .result-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .result-btn {
    width: 100%;
  }
  
  /* 页脚适配 */
  center {
    font-size: 14px !important;
    padding: 10px;
  }
  
  /* 隐藏不必要的元素 */
  .particles {
    display: none;
  }
}

/* 超小屏幕适配 */
@media screen and (max-width: 480px) {
  .site-logo {
    font-size: 16px;
  }
  
  .video-container {
    height: 180px;
  }
  
  .system-header a {
    font-size: 18px !important;
    padding: 8px 15px !important;
  }
  
  .code-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .wheel-container {
    width: 250px;
    height: 250px;
  }
  
  .wheel-canvas {
    width: 250px !important;
    height: 250px !important;
  }
  
  .button {
    font-size: 13px;
    padding: 10px;
  }
}

/* 添加移动端触摸优化 */
@media (hover: none) and (pointer: coarse) {
  .button, .nav-link, .feature-tag, .modal-btn, .result-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  input, select, textarea {
    font-size: 16px;
  }
}

/* 防止文字溢出 */
h1, h2, h3, h4, h5, h6, p, span, a, div {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 优化表格和列表显示 */
table {
  width: 100% !important;
  display: block;
  overflow-x: auto;
}

img, video {
  max-width: 100%;
  height: auto;
}

/* 禁用长按菜单 */
* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* 允许必要的文本选择 */
input, textarea, .code-text {
  -webkit-user-select: text;
  user-select: text;
}
</style>