:root {
  --brand-orange: #ed6c00;
  --brand-orange-hover: #c05500;
  --link-hover-color: #505050; /* 品牌铁灰，内敛低调 */
  --brand-gray: #727171;
  --text-primary: #2c3e50;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #e0e0e0;
  --bg-light: #F8FAFC; /* 统一背景色 */
  --radius-lg: 12px;
  --radius-md: 8px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --navbar-shadow: 0 2px 4px rgba(0,0,0,0.04); /* 导航栏专用投影 */
  --transition-base: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    color: var(--text-primary);
    background-color: var(--bg-light); /* 应用全局灰色背景 */
}

/* Hero Section */
.home-hero {
  background: linear-gradient(180deg, rgba(255,255,255,0.75) 0%, rgba(245,245,244,0) 100%);
  padding: 3.75rem 1rem;
  margin-bottom: 0.5rem;
  border-bottom: none; /* 移除分割线 */
  position: relative;
  overflow: hidden;
  box-shadow: none; /* 移除阴影 */
}

.home-hero h1 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 1rem;
}

.home-hero .lead {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem auto;
}

/* Search Box in Hero */
.hero-search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.hero-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 28px;
  border: 1px solid #ddd;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: var(--transition-base);
}

.hero-search-form:focus-within {
  border-color: var(--brand-orange);
  box-shadow: 0 4px 16px rgba(237, 108, 0, 0.15);
}

.hero-search-form .hero-search-input {
  flex: 1;
  height: 44px;
  padding-left: 14px;
  border: 0;
  border-radius: 22px;
  box-shadow: none;
  font-size: 1.05rem;
}

.hero-search-form .hero-search-input:focus {
  outline: none;
  box-shadow: none;
}

/* Section Title */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1rem;
    border-left: 4px solid var(--text-primary);
    line-height: 1.2;
}

/* Tool Cards */
.tool-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: #fff;
  transition: var(--transition-base);
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.tool-card .card-body {
    padding: 2rem;
    flex: 1;
}

.tool-card .tool-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.tool-card .tool-icon-wrapper {
    width: 56px;
    height: 56px;
    background: #f0f2f5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.tool-card .tool-icon {
/*    width: 32px;
    height: 32px;*/
    object-fit: contain;
}

.tool-card .tool-info {
    flex: 1;
}

.tool-card .tool-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    display: block;
}

.tool-card .card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
}

.tool-card .card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.tool-card:hover .card-title a {
  color: var(--link-hover-color);
}

.tool-card .card-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Card Footer Actions */
.tool-card .card-actions {
    padding: 1rem 2rem;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-card .card-link-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tool-card .btn-enter {
    color: var(--brand-orange);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.tool-card .btn-enter i {
    margin-left: 4px;
    transition: transform 0.2s;
}

.tool-card:hover .btn-enter {
    color: var(--link-hover-color);
}

.tool-card:hover .btn-enter i {
    transform: translateX(4px);
}

/* Stretched Link for full card clickability */
.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

/* Ads Section */
.home-ads {
    margin-top: 0.5rem;
    padding-top: 0;
    margin-bottom: 1.5rem;
}

.home-ads .home-ad-img {
  display: block;
  width: 100%;
  max-width: 360px;
  height: 112px;
  object-fit: cover;
  margin: 0 auto;
}

.home-ads .home-ad-meta {
  margin-top: 0.5rem;
}

.home-ads .home-ad-badge {
  background: #f8f9fa;
  font-weight: normal;
}

@media (max-width: 576px) {
  .home-hero {
    padding: 3rem 1rem;
  }

  .hero-search-form {
    flex-direction: column;
    align-items: stretch;
    border-radius: 16px;
    padding: 10px;
  }

  .hero-search-form .hero-search-input {
    width: 100%;
  }

  .hero-search-form .btn-search {
    width: 100%;
  }

  .home-ads .home-ad-img {
    max-width: none;
    height: 96px;
  }
}

/* Animation utilities */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Helper */
.border-ccc { border-color: var(--border-color) !important; }


/* HSCN Home – Hero */
.home-hero--hscn,
.home-hero--hsus,
.home-hero--hsjp,
.home-hero--gkdm {
    --hero-accent: var(--brand-orange);
    --hero-accent-spot: rgba(255, 255, 255, 0.5);
    --hero-accent-glow: rgba(0, 0, 0, 0.03);
    --hero-accent-border-weak: rgba(0, 0, 0, 0.08);
    --hero-accent-weak: rgba(0, 0, 0, 0.03);
    --hero-accent-focus: rgba(237, 108, 0, 0.16);
    --hero-accent-pill-border: rgba(0, 0, 0, 0.15);
    --hero-accent-pill-bg: rgba(0, 0, 0, 0.05);
    --hero-accent-focus-ring: rgba(237, 108, 0, 0.14);
    --hero-accent-text: var(--text-primary);

    position: relative;
    padding: 4.5rem 0 3.5rem;
    margin-bottom: 0;
    background: var(--bg-light);
    overflow: hidden;
}

.home-hero--hscn::before,
.home-hero--hsus::before,
.home-hero--hsjp::before,
.home-hero--gkdm::before,
.home-hero--hscn::after,
.home-hero--hsus::after,
.home-hero--hsjp::after,
.home-hero--gkdm::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(0.2px);
    opacity: 0.9;
    pointer-events: none;
}

.home-hero--hscn::before,
.home-hero--hsus::before,
.home-hero--hsjp::before,
.home-hero--gkdm::before {
    width: 520px;
    height: 520px;
    left: -220px;
    top: -220px;
    background: radial-gradient(circle at 30% 30%, var(--hero-accent-glow), rgba(0, 0, 0, 0.00) 65%);
}

.home-hero--hscn::after,
.home-hero--hsus::after,
.home-hero--hsjp::after,
.home-hero--gkdm::after {
    width: 460px;
    height: 460px;
    right: -220px;
    top: -260px;
    background: radial-gradient(circle at 35% 35%, rgba(44, 62, 80, 0.18), rgba(44, 62, 80, 0.00) 65%);
}

.home-hero--hscn h1,
.home-hero--hsus h1,
.home-hero--hsjp h1,
.home-hero--gkdm h1 {
    letter-spacing: 0.5px;
}

.home-hero--hscn .lead,
.home-hero--hsus .lead,
.home-hero--hsjp .lead,
.home-hero--gkdm .lead {
    margin-left: 0;
    margin-right: 0;
    max-width: 42rem;
}

.home-hero--hscn .hero-points,
.home-hero--hsus .hero-points,
.home-hero--hsjp .hero-points,
.home-hero--gkdm .hero-points {
    gap: 0.5rem;
}

.home-hero--hscn .hero-point,
.home-hero--hsus .hero-point,
.home-hero--hsjp .hero-point,
.home-hero--gkdm .hero-point {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--hero-accent-border-weak);
    background: var(--hero-accent-weak);
    color: var(--hero-accent-text);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.home-hero--hscn .hero-search-box,
.home-hero--hsus .hero-search-box,
.home-hero--hsjp .hero-search-box,
.home-hero--gkdm .hero-search-box {
    max-width: 560px;
}

.home-hero--hscn .hero-search-card,
.home-hero--hsus .hero-search-card,
.home-hero--hsjp .hero-search-card,
.home-hero--gkdm .hero-search-card {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 18px;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    backdrop-filter: blur(6px);
    padding: 18px;
}

.home-hero--hscn .hero-search-form,
.home-hero--hsus .hero-search-form,
.home-hero--hsjp .hero-search-form,
.home-hero--gkdm .hero-search-form {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.home-hero--hscn .hero-search-row,
.home-hero--hsus .hero-search-row,
.home-hero--hsjp .hero-search-row,
.home-hero--gkdm .hero-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: 28px;
    border: 1px solid #e6e6e6;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: var(--transition-base);
}

.home-hero--hscn .hero-search-row:focus-within,
.home-hero--hsus .hero-search-row:focus-within,
.home-hero--hsjp .hero-search-row:focus-within,
.home-hero--gkdm .hero-search-row:focus-within {
    border-color: var(--hero-accent);
    box-shadow: 0 8px 22px var(--hero-accent-focus);
}

.home-hero--hscn .hero-search-input,
.home-hero--hsus .hero-search-input,
.home-hero--hsjp .hero-search-input,
.home-hero--gkdm .hero-search-input {
    flex: 1;
    height: 48px;
    border: 0;
    border-radius: 22px;
    box-shadow: none;
    padding-left: 14px;
    font-size: 1.05rem;
    background: transparent;
}

.home-hero--hscn .hero-search-input:focus,
.home-hero--hsus .hero-search-input:focus,
.home-hero--hsjp .hero-search-input:focus,
.home-hero--gkdm .hero-search-input:focus {
    outline: none;
    box-shadow: none;
}

.home-hero--hscn .hero-search-options {
    margin-top: 12px;
}

.home-hero--hscn .hero-search-hint,
.home-hero--hsus .hero-search-hint,
.home-hero--hsjp .hero-search-hint,
.home-hero--gkdm .hero-search-hint {
    margin-top: 10px;
    font-size: 0.85rem;
}

/* Hero radio pills */
.home-hero--hscn .hero-radio-group .custom-control {
    padding-left: 0;
    margin-right: 0.5rem;
    min-height: auto;
    display: inline-flex;
    align-items: center;
}

.home-hero--hscn .hero-radio-group .custom-control-label::before,
.home-hero--hscn .hero-radio-group .custom-control-label::after {
    display: none;
}

.home-hero--hscn .hero-radio-group .custom-control-label {
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.90);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    transition: var(--transition-base);
}

.home-hero--hscn .hero-radio-group .custom-control-input:checked ~ .custom-control-label {
    border-color: var(--hero-accent-pill-border);
    background: var(--hero-accent-pill-bg);
    color: var(--hero-accent-text);
}

.home-hero--hscn .hero-radio-group .custom-control-input:focus ~ .custom-control-label {
    box-shadow: 0 0 0 0.2rem var(--hero-accent-focus-ring);
}

@media (max-width: 576px) {
    .home-hero--hscn,
    .home-hero--hsus,
    .home-hero--hsjp,
    .home-hero--gkdm {
        padding: 3.25rem 0 2.5rem;
    }

    .home-hero--hscn .hero-search-card,
    .home-hero--hsus .hero-search-card,
    .home-hero--hsjp .hero-search-card,
    .home-hero--gkdm .hero-search-card {
        padding: 14px;
        border-radius: 16px;
    }

    .home-hero--hscn .hero-search-row,
    .home-hero--hsus .hero-search-row,
    .home-hero--hsjp .hero-search-row,
    .home-hero--gkdm .hero-search-row {
        flex-direction: column;
        align-items: stretch;
        border-radius: 16px;
        padding: 10px;
    }

    .home-hero--hscn .btn-search,
    .home-hero--hsus .btn-search,
    .home-hero--hsjp .btn-search,
    .home-hero--gkdm .btn-search {
        width: 100%;
    }

    .home-hero--hscn .hero-radio-group {
        justify-content: center !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .home-hero--hscn .hero-radio-group .custom-control {
        margin-right: 0;
    }
}

.home-hero--gkdm {
    --hero-accent: #1c84c6;
    --hero-accent-spot: rgba(28, 132, 198, 0.10);
    --hero-accent-glow: rgba(28, 132, 198, 0.20);
    --hero-accent-border-weak: rgba(28, 132, 198, 0.18);
    --hero-accent-weak: rgba(28, 132, 198, 0.08);
    --hero-accent-focus: rgba(28, 132, 198, 0.16);
    --hero-accent-pill-border: rgba(28, 132, 198, 0.35);
    --hero-accent-pill-bg: rgba(28, 132, 198, 0.12);
    --hero-accent-focus-ring: rgba(28, 132, 198, 0.14);
    --hero-accent-text: #083a63;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
}
.nav-tabs .nav-link.active {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: transparent;
}
.nav-tabs .nav-link:hover:not(.active) {
    border-color: #eee;
    color: var(--link-hover-color);
}
.table thead th {
    border-top: none;
    background-color: #f8f9fa;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
}
.code-link {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.code-link:hover {
    color: var(--brand-orange);
    text-decoration: none;
}

.gkdm-home .shipping-line-card {
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.gkdm-home .shipping-line-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #ddd;
    background-color: #f8f9fa;
}

.gkdm-home .shipping-line-link {
    display: block;
    padding: 15px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.gkdm-home .shipping-line-link:hover {
    text-decoration: none;
    color: #0056b3;
}


:root{--gkdm-accent:#007bff}
.gkdm-search-page .result-count{color:#6c757d;font-size:1rem}
.gkdm-search-page .info-card-body{padding:0}

/* Improved Table Spacing */
.gkdm-search-page .table td, .gkdm-search-page .table th {
    vertical-align: middle;
    padding: 12px 10px;
    border-top: 1px solid #dee2e6;
}
.gkdm-search-page .table thead th {
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
}

.gkdm-search-page .port-code{font-weight:700;white-space:nowrap; color: #343a40;}
.gkdm-search-page .port-cname{margin-left:.5rem;color:#495057;}
.gkdm-search-page .kw-highlight{color:#dc3545;font-weight:600}

/* Copy Button as Icon */
.gkdm-search-page .btn-copy {
    margin-left: 10px;
    font-size: 0.95rem;
    color: #adb5bd;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}
.gkdm-search-page .btn-copy:hover {
    color: #007bff;
    transform: scale(1.1);
}

/* Action Button */
.gkdm-search-page .btn-action {
    color: #adb5bd;
}
.gkdm-search-page .btn-action:hover {
    color: #007bff;
    background: transparent;
}

/* Columns */
.gkdm-search-page .gkdm-col-ename{min-width:260px;overflow-wrap:anywhere;word-break:break-word}
.gkdm-search-page .gkdm-col-line{min-width:160px;overflow-wrap:anywhere;word-break:break-word}
.gkdm-search-page .gkdm-col-country{width:110px;white-space:nowrap}
.gkdm-search-page .gkdm-col-action{width:80px;white-space:nowrap;text-align:center}

/* Search Box Styles */
.search-box-wrapper {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 4px;
    display: flex;
}
.search-input {
    width: 320px !important;
    height: 44px;
    border: 1px solid #e9ecef;
    border-right: none;
    font-size: 0.95rem;
}
.search-input:focus {
    box-shadow: none;
    border-color: #80bdff;
    z-index: 2;
}

/* Hover Effects */
.gkdm-search-page .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,.015);
}
.gkdm-search-page .table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.04);
}


.code-hero-content h1 {
    letter-spacing: 1px;
    color: var(--brand-orange);
    font-size: 3rem;
    font-weight: 700;
}


.info-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    height: 100%;
    overflow: hidden;
}

.info-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: #fcfcfc;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-card-body {
    padding: 0;
}

/* Table styles specific to detail cards */
.detail-table {
    width: 100%;
    margin-bottom: 0;
}

.detail-table td {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.detail-table tr:last-child td {
    border-bottom: none;
}

.detail-table .label-cell {
    width: 35%;
    color: var(--text-secondary);
    font-weight: 500;
    background-color: #fafafa;
}

.detail-table .value-cell {
    color: var(--text-primary);
    font-weight: 500;
}

.rate-value {
    color: #000;
    font-weight: 700;
    font-size: 1.1em;
}

/* Agreement Tax Table */
.agreement-table-wrapper {
    overflow-x: auto;
}

.agreement-table th {
    background-color: #fafafa;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
    padding: 0.75rem;
    white-space: nowrap;
}

.agreement-table td {
    text-align: center;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.chapter-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #fff4e6;
    color: var(--brand-orange);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.req-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
}
