:root {
  --brand-orange: #ed6c00;
  --brand-orange-hover: #c05500;
  --link-hover-color: #505050; /* 品牌铁灰，内敛低调 */
  --brand-gray: #727171;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #eeeeee;
  --bg-light: #f5f5f4; /* 方案A：暖白/米灰，柔和护眼 */
  --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;
}

.hero-search-form .btn-search {
  height: 44px;
  border-radius: 22px;
  padding: 0 24px;
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.hero-search-box .btn-search:hover {
    background-color: var(--brand-orange-hover);
}

/* 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(--brand-orange);
    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: #fff9f5;
    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(--brand-orange);
    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; }
