/**
 * 订阅框 PC 端优化样式
 * 优化 PC 端订阅框的布局和交互
 */

/* PC 端订阅框优化 */
@media (min-width: 769px) {
  .nl-sub {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 12px !important;
    max-width: 560px !important;
    margin: 0 auto !important;
    justify-content: center !important;
  }

  /* 订阅资讯标题 */
  .nl-sub > span:first-child {
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 4px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
  }

  /* 邮箱输入框 */
  .nl-sub #nlEmail {
    flex: 1 !important;
    width: auto !important;
    min-width: 280px !important;
    max-width: 360px !important;
    height: 44px !important;
    padding: 0 16px !important;
    font-size: 14px !important;
    border-radius: 8px 0 0 8px !important;
    border-right: none !important;
    transition: all 0.3s ease !important;
  }

  .nl-sub #nlEmail:focus {
    outline: none !important;
    border-color: rgba(0, 212, 255, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15) !important;
  }

  .nl-sub #nlEmail::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
  }

  /* 订阅按钮 */
  .nl-sub button[onclick*="subscribeNL"] {
    width: auto !important;
    min-width: 120px !important;
    height: 44px !important;
    padding: 0 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 0 8px 8px 0 !important;
    background: linear-gradient(135deg, #1e6fff 0%, #00d4ff 100%) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .nl-sub button[onclick*="subscribeNL"]:hover {
    background: linear-gradient(135deg, #0056e0 0%, #00b8e6 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(30, 111, 255, 0.4) !important;
  }

  .nl-sub button[onclick*="subscribeNL"]:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(30, 111, 255, 0.3) !important;
  }

  /* 按钮加载状态 */
  .nl-sub button[onclick*="subscribeNL"].loading {
    pointer-events: none !important;
    opacity: 0.8 !important;
  }

  .nl-sub button[onclick*="subscribeNL"].loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 16px !important;
    height: 16px !important;
    margin: -8px 0 0 -8px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-top-color: #fff !important;
    border-radius: 50% !important;
    animation: nl-spin 0.8s linear infinite !important;
  }

  @keyframes nl-spin {
    to { transform: rotate(360deg); }
  }

  /* 消息提示 */
  .nl-sub #nlMsg {
    width: 100% !important;
    text-align: center !important;
    margin-top: 8px !important;
    font-size: 13px !important;
    min-height: 18px !important;
    transition: color 0.3s ease !important;
  }

  /* 成功状态 */
  .nl-sub #nlMsg.success {
    color: #10b981 !important;
  }

  /* 错误状态 */
  .nl-sub #nlMsg.error {
    color: #ff6b6b !important;
  }
}

/* 移动端保持原样，但优化一些细节 */
@media (max-width: 768px) {
  .nl-sub #nlEmail {
    height: 42px !important;
  }

  .nl-sub button[onclick*="subscribeNL"] {
    height: 42px !important;
    background: linear-gradient(135deg, #1e6fff 0%, #00d4ff 100%) !important;
  }
}
