:root {
  --brand-orange: #ff9800;
  --brand-green: #4caf50;
  --brand-blue: #2196f3;
  --text-dark: #2c3e50;
  --text-muted: #7f8c8d;
  --bg-body: #f4f7fa;
  --card-bg: #ffffff;
  --border-soft: #edf2f7;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dark);
  background-color: var(--bg-body);
}

a {
  text-decoration: none;
  color: var(--brand-green);
  transition: var(--transition);
}

a:hover {
  color: #35a045;
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

.tips-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

.tips-header {
  text-align: center;
  padding: 40px 20px 30px;
}

.tips-logo {
  height: 32px;
  margin-bottom: 16px;
}

.tips-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.tips-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.tips-nav {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tips-nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 4px;
    justify-content: center;
}

.tips-nav-tab {
  flex-shrink: 0;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-muted);
  background: transparent;
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.tips-nav-tab:hover {
  background: rgba(76, 175, 80, 0.08);
  color: var(--brand-green);
  text-decoration: none;
}

.tips-nav-tab.active {
  background: var(--brand-green);
  color: white;
  font-weight: 600;
  border-color: var(--brand-green);
}

.tips-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.tips-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-soft);
  transition: var(--transition);
  cursor: pointer;
}

.tips-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--brand-green);
}

.tips-card-id {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(76, 175, 80, 0.1);
  color: var(--brand-green);
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 12px;
}

.tips-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.6;
}

.tips-card:hover .tips-card-title {
  color: var(--brand-green);
}

.tips-card-link:hover {
  text-decoration: none;
}

.tips-detail {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-soft);
}

.tips-detail-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-soft);
}

.tips-detail-id {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, var(--brand-green), #45a049);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 16px;
}

.tips-detail-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.5;
}

.tips-detail-body {
  color: var(--text-dark);
  font-size: 15px;
  line-height: 2;
}

.tips-detail-body p {
  margin-bottom: 16px;
}

.tips-detail-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--brand-green);
}

.tips-detail-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.tips-detail-body ol li {
  list-style: decimal;
  margin-bottom: 12px;
  padding-left: 8px;
}

.tips-detail-body ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.tips-detail-body ul li {
  list-style: disc;
  margin-bottom: 8px;
  padding-left: 8px;
}

.tips-detail-body strong {
  color: var(--text-dark);
  font-weight: 600;
}

.tips-detail-body .formulae {
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(76, 175, 80, 0.08);
}

.tips-detail-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}

.tips-detail-footer .tips-detail-box {
  padding: 16px 20px;
  background: rgba(76, 175, 80, 0.05);
  border-radius: 8px;
  margin-bottom: 16px;
}

.tips-detail-footer .tips-detail-box p {
  margin-bottom: 8px;
  color: var(--text-dark);
}

.tips-detail-footer .tips-detail-box p:last-child {
  margin-bottom: 0;
}

.tips-detail-footer .tips-detail-box a {
  word-break: break-all;
  color: var(--brand-green);
}

.tips-action {
  margin-top: 24px;
  text-align: center;
}

.tips-action a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: 25px;
  color: var(--text-muted);
  font-size: 14px;
  transition: var(--transition);
}

.tips-action a:hover {
  background: var(--brand-green);
  color: white;
  border-color: var(--brand-green);
  text-decoration: none;
}

.tips-related {
  margin-top: 32px;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border-soft);
}

.tips-related-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.tips-related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.tips-related-item {
  padding: 12px 16px;
  background: rgba(76, 175, 80, 0.03);
  border-radius: 8px;
  transition: var(--transition);
}

.tips-related-item:hover {
  background: rgba(76, 175, 80, 0.08);
}

.tips-related-item a {
  display: block;
  color: var(--text-dark);
  font-size: 14px;
}

.tips-related-item a:hover {
  color: var(--brand-green);
  text-decoration: none;
}

.tips-footer {
  margin-top: 60px;
  text-align: center;
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border-soft);
}

.tips-footer a {
  color: var(--text-muted);
}

.tips-footer a:hover {
  color: var(--brand-green);
}

@media (max-width: 760px) {
  .tips-container {
    padding: 16px;
  }

  .tips-header {
    padding: 30px 10px 20px;
  }

  .tips-title {
    font-size: 20px;
  }

  .tips-nav {
    padding: 16px 12px;
    border-radius: 12px;
  }

  .tips-nav-tabs {
    justify-content: flex-start;
  }

  .tips-nav-tab {
    padding: 8px 12px;
    font-size: 13px;
    flex: 0 0 auto;
  }

  .tips-content {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tips-card {
    padding: 16px;
  }

  .tips-detail {
    padding: 20px 16px;
    border-radius: 12px;
  }

  .tips-detail-title {
    font-size: 18px;
  }

  .tips-detail-body {
    font-size: 14px;
    line-height: 1.8;
  }

  .tips-related-list {
    grid-template-columns: 1fr;
  }

  .tips-action a {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #12141a;
    --card-bg: #1c1f26;
    --bg-gray: #252932;
    --text-dark: #e2e8f0;
    --text-muted: #94a3b8;
    --border-soft: #2d333f;
    --brand-green: #4ade80;
    --brand-green-light: rgba(74, 222, 128, 0.15);
    --brand-blue: #60a5fa;
    --brand-orange: #fbbf24;
  }

  .tips-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  }

  .tips-detail {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .tips-nav-tab {
    color: var(--text-muted);
  }

  .tips-nav-tab.active {
    background: var(--brand-green);
    color: #000;
    border-color: var(--brand-green);
  }

  .tips-detail-body .formulae {
    background: rgba(74, 222, 128, 0.15);
    color: var(--text-dark);
  }

  .tips-detail-footer .tips-detail-box {
    background: rgba(74, 222, 128, 0.1);
  }

  .tips-related-item {
    background: rgba(74, 222, 128, 0.08);
  }

  .tips-related-item:hover {
    background: rgba(74, 222, 128, 0.15);
  }

  .tips-action a {
    background: var(--card-bg);
    border-color: var(--border-soft);
  }

  .tips-action a:hover {
    background: var(--brand-green);
    color: #000;
  }

  .search .search-input .search-button {
    color: #000;
  }
}

/* ==================== 全站一级导航栏（与 hp/styles/app.css 一致） ==================== */
.head-mobile {
    display: flex;
    flex-direction: column;
    padding: 0 8px;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-soft);
}

.logo-wrapper {
    padding: 6px 8px;
    text-align: center;
    text-decoration: none;
}

.logo-wrapper .logo {
    height: 23px;
}

.logo-slogan {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
    display: none;
}

.search {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
}

.search .search-input {
    width: 100%;
    height: 28px;
    background-color: var(--card-bg);
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    padding: 0 10px;
    box-sizing: border-box;
    position: relative;
}

.search .search-input input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-dark);
    background-color: transparent;
    padding-left: 20px;
    padding-right: 60px;
    height: 100%;
}

.search .search-input input::placeholder {
    color: var(--text-muted);
}

.search .search-input .search-button {
    width: 60px;
    height: 28px;
    background-color: var(--brand-green);
    border-radius: 24px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    line-height: 28px;
    position: absolute;
    right: 0;
    top: 0;
}

.search .search-input .search-icon {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
}

.search .login {
    white-space: nowrap;
    font-size: 14px;
    text-align: center;
    line-height: 28px;
    right: 0;
    top: 0;
    height: 28px;
    cursor: pointer;
    color: var(--text-dark);
    margin-left: 20px;
    padding-right: 10px;
    text-decoration: none;
}

.search .login:hover {
    color: var(--brand-green);
}

/* 导航栏激活状态 */
.navi-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    min-height: 34px;
    margin-top: 8px;
}

.navi-bar-item {
    text-align: center;
    line-height: 100%;
    height: 100%;
    min-height: 34px;
    font-size: 12px;
    color: var(--text-dark);
    /* 不允许换行 */
    white-space: nowrap;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.navi-bar-item a {
    text-decoration: none;
    color: inherit;
}

.navi-bar-item.active {
    color: var(--brand-green);
}

.navi-bar-item.active::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background-color: #35B058;
    position: absolute;
    bottom: 0;
}

/* PC端自适应布局（与 hp/styles/app.pc.css 一致） */
@media (min-width: 768px) {
    .head-mobile {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        height: 60px;
    }

    .logo-wrapper {
        display: flex;
        align-items: center;
        margin-bottom: 0px;
        gap: 12px;
        order: 1;
    }

    .logo-wrapper .logo {
        width: auto;
        max-width: 200px;
    }

    .head-mobile .navi-bar {
        flex: 1;
        margin-top: 0;
        max-width: 646px;
        order: 2;
    }

    .head-mobile .search {
        order: 3;
        min-width: 140px;
        margin-top: 0px;
    }

    .search .search-input {
        width: auto;
    }

    .navi-bar-item {
        font-size: 14px;
    }
}

/* 屏幕宽度大于1300px时显示slogan */
@media (min-width: 1300px) {
    .logo-slogan {
        display: block;
        color: #828282;
        margin-left: 10px;
        position: relative;
        margin-top: 0;
        font-size: 14px;
        white-space: nowrap;
    }

    .logo-slogan::before {
        content: '';
        display: block;
        width: 1px;
        height: 17px;
        background-color: #BDBDBD;
        position: absolute;
        left: -10px;
        top: 2px;
    }
}

/* 深色模式导航栏 */
@media (prefers-color-scheme: dark) {
  .search .search-input {
    background-color: var(--bg-gray);
    border-color: var(--border-soft);
  }

  .search .search-input input {
    color: var(--text-dark);
  }

  .search .search-input input::placeholder {
    color: var(--text-muted);
  }

  .logo-slogan {
    color: var(--text-muted);
  }
}

/* ==================== 统一内联样式类 ==================== */
/* 提示框容器样式 */
.tips-detail-box {
  margin: 20px 0;
}

/* 绿色主题提示框 */
.tips-box-green h4 {
  color: var(--brand-green);
  padding-left: 12px;
  border-left: 3px solid var(--brand-green);
  margin-bottom: 12px;
}

/* 蓝色主题提示框 */
.tips-box-blue h4 {
  color: #5D97FE;
  padding-left: 12px;
  border-left: 3px solid #5D97FE;
  margin-bottom: 12px;
}

/* 橙色主题提示框 */
.tips-box-orange h4 {
  color: #FF6C48;
  padding-left: 12px;
  border-left: 3px solid #FF6C48;
  margin-bottom: 12px;
}

/* 紫色主题提示框 */
.tips-box-purple h4 {
  color: #9A5DFE;
  padding-left: 12px;
  border-left: 3px solid #9A5DFE;
  margin-bottom: 12px;
}

/* 暖橙背景提示框 */
.tips-box-warm h4 {
  color: #FF6C48;
  padding-left: 12px;
  border-left: 3px solid #FF9900;
  margin-bottom: 12px;
}

/* 步骤框样式 */
.tips-step-box {
  margin: 10px 0;
}

/* 小标题颜色 */
.tips-title-green { color: var(--brand-green); }
.tips-title-blue { color: #5D97FE; }
.tips-title-orange { color: #FF6C48; }
.tips-title-purple { color: #9A5DFE; }

/* 内联文字样式 */
.tips-text-muted {
  font-size: 12px;
  color: var(--text-muted);
}

.tips-text-small {
  font-size: 12px;
}

.tips-text-center {
  text-align: center;
}

.tips-text-large {
  font-size: 18px;
}

.tips-text-bold {
  font-weight: bold;
}

/* 公式/代码样式 */
.tips-formula {
  text-align: center;
  padding: 10px;
  margin: 10px 0;
}

/* 工具类 */
.tips-mt-5 { margin-top: 5px; }
.tips-mt-6 { margin-top: 6px; }
.tips-mt-10 { margin-top: 10px; }
.tips-p-0 { padding: 0; }

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  .tips-box-gray {
    background: rgba(45, 51, 63, 0.3);
  }
  
  .tips-box-blue h4 {
    color: #8AB4FF;
    border-color: #8AB4FF;
  }
  
  .tips-box-orange h4 {
    color: #FF8F6E;
    border-color: #FF8F6E;
  }
  
  .tips-box-purple h4 {
    color: #B594FF;
    border-color: #B594FF;
  }
  
  .tips-box-warm h4 {
    color: #FF8F6E;
    border-color: #FF8F6E;
  }
}

/* d505简化步骤样式 */
.tips-step-block {
  margin: 16px 0;
}

.tips-step-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-green);
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--brand-green);
}

.tips-step-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dark);
}

.tips-step-body p {
  margin: 8px 0;
}

.tips-link-btn {
  display: block;
  margin-top: 16px;
  padding: 12px 20px;
  background: var(--brand-green);
  color: #fff !important;
  border-radius: 8px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.tips-copy-btn {
  display: block;
  margin-top: 10px;
  padding: 10px 20px;
  background: transparent;
  color: var(--brand-green) !important;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  border: 1px solid var(--brand-green);
  cursor: pointer;
}

.tips-link-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

.tips-toast {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  z-index: 9999;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .tips-link-btn {
    color: #000 !important;
  }
  
  .tips-toast {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
  }
}

/* 表格样式 */
.tips-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.tips-table th,
.tips-table td {
  padding: 12px;
  border: 1px solid #dee2e6;
  text-align: center;
}

.tips-table thead tr {
  background: #f8f9fa;
}

.tips-rating-s { color: #00C157; font-weight: bold; }
.tips-rating-a { color: #9A5DFE; font-weight: bold; }
.tips-rating-b { color: #5D97FE; font-weight: bold; }
.tips-rating-c { color: #FF6C48; font-weight: bold; }
.tips-rating-d { color: #FFA049; font-weight: bold; }
.tips-rating-lg { font-size: 24px; }

@media (prefers-color-scheme: dark) {
  .tips-table th,
  .tips-table td {
    border-color: #334155;
  }
  
  .tips-table thead tr {
    background: #1e293b;
  }
  
  .tips-rating-s { color: #4ade80; }
  .tips-rating-a { color: #a78bfa; }
  .tips-rating-b { color: #60a5fa; }
  .tips-rating-c { color: #f87171; }
  .tips-rating-d { color: #fbbf24; }
}
