/* Dark Theme Color Overrides */
html {
    background: #1a1a1a;
}

body {
    background: #1a1a1a;
    color: #e0e0e0;
}

main {
    background: #1a1a1a;
}

header {
    background: #2d2d2d !important;
    backdrop-filter: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

header h1 a {
    color: #e0e0e0;
}

.header-tagline {
    color: #b0b0b0;
}

header nav a {
    color: #b0b0b0;
}

header nav a:hover {
    color: #4a9eff;
    background: rgba(74,158,255,0.1);
}

header nav a::after {
    background: #4a9eff;
}

.mobile-menu-toggle {
    color: #e0e0e0;
}

.hero-section {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

.hero-search-input {
    background: rgba(45,45,45,0.95);
    color: #e0e0e0;
    border-color: rgba(255,255,255,0.2);
}

.hero-search-input:focus {
    background: #2d2d2d;
    border-color: #4a9eff;
}

.hero-search-button {
    background: #4a9eff;
}

.hero-search-button:hover {
    background: #7bb3ff;
}

.featured-tools-section,
.latest-articles-section,
.categories-section,
.why-choose-section,
.all-tools-section {
    background: #1a1a1a; /* Dark background for content sections */
}

.section-title {
    color: #e0e0e0;
}

.featured-tool-card,
.article-card,
.category-card,
.enhanced-tool-card {
    background: #2d2d2d;
    border-color: #3d3d3d;
}

.featured-tool-card:hover,
.article-card:hover,
.category-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.tool-card-header h3,
.article-card h3 a,
.category-card h3 {
    color: #e0e0e0;
}

.tool-card-description,
.article-card .article-excerpt,
.category-description,
.tool-card-desc {
    color: #b0b0b0;
}

.section-link {
    color: #4a9eff;
}

.section-link:hover {
    color: #7bb3ff;
}

.category-link {
    color: #4a9eff;
}

.category-link:hover {
    color: #7bb3ff;
}

.category-title {
    color: #e0e0e0;
    border-bottom-color: #4a9eff;
}

.enhanced-tool-card {
    border-color: #3d3d3d;
    background: #2d2d2d;
}

.enhanced-tool-card:hover {
    border-color: #4a9eff;
}

/* 工具图标样式 - 图标颜色为白色，背景由getToolIconBackground函数控制 */
.tool-card-icon,
.featured-tool-icon {
    color: white !important;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tool-card-icon svg,
.featured-tool-icon svg {
    width: 40px;
    height: 40px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.tool-card-top h3 {
    color: #e0e0e0;
}

.tool-card-desc {
    color: #b0b0b0;
}

.tool-card-action {
    color: #4a9eff;
}

.enhanced-tool-card:hover .tool-card-action {
    color: #7bb3ff;
}

.tools-count-info {
    color: #b0b0b0;
}

.tools-count-info strong {
    color: #e0e0e0;
}

footer {
    background: #1a1a1a;
    border-top: 1px solid #3d3d3d;
}

.contact-card {
    background: #2d2d2d;
    border-color: #3d3d3d;
}

.contact-card h1 {
    color: #e0e0e0;
}

.contact-intro {
    color: #b0b0b0;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
    background: #1a1a1a;
    border-color: #3d3d3d;
    color: #e0e0e0;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: #4a9eff;
}

.contact-other h3 {
    color: #e0e0e0;
}

.contact-other p {
    color: #b0b0b0;
}

.contact-other a {
    color: #4a9eff;
}

.search-section,
.search-results {
    background: #2d2d2d;
}

.search-section h1 {
    color: #e0e0e0;
}

.results-count {
    color: #b0b0b0;
}

.results-section h2 {
    color: #e0e0e0;
    border-bottom-color: #4a9eff;
}

.article-item {
    border-bottom-color: #3d3d3d;
}

.article-item:hover {
    background-color: #2d2d2d;
}

.article-item h3 a {
    color: #e0e0e0;
}

.article-item h3 a:hover {
    color: #4a9eff;
}

.read-more {
    color: #4a9eff;
}

.read-more:hover {
    color: #7bb3ff;
}

.page-link {
    background: #2d2d2d;
    border-color: #3d3d3d;
    color: #e0e0e0;
}

.page-link:hover {
    background: #4a9eff;
    border-color: #4a9eff;
    color: white;
}

.page-current {
    background: #4a9eff;
    border-color: #4a9eff;
}

a:focus,
button:focus,
input:focus,
textarea:focus {
    outline-color: #4a9eff;
}

.skip-link {
    background: #4a9eff;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline-color: #4a9eff;
}

/* Category-specific colors (dark theme adjusted) */
.tool-category-encrypt,
.tool-category-dev {
    background: #064e3b;
    color: #6ee7b7;
}
.tool-category-text {
    background: #1e3a8a;
    color: #93c5fd;
}
.tool-category-image {
    background: #78350f;
    color: #fde68a;
}
.tool-category-time {
    background: #7c2d12;
    color: #fed7aa;
}
.tool-category-everyday,
.tool-category-convert {
    background: #831843;
    color: #f9a8d4;
}
.tool-category-encode,
.tool-category-format {
    background: #312e81;
    color: #c7d2fe;
}
.tool-category-network,
.tool-category-design {
    background: #581c87;
    color: #e9d5ff;
}
.tool-category-test,
.tool-category-generate,
.tool-category-other {
    background: #374151;
    color: #d1d5db;
}

/* Articles page styles */
.articles-header {
    background: #2d2d2d;
}
.articles-header h1 {
    color: #e0e0e0;
}
.articles-list {
    background: #2d2d2d;
}
.article-item {
    border-bottom-color: #3d3d3d;
}
.article-item:hover {
    background-color: #1a1a1a;
}
.article-item h3 a {
    color: #e0e0e0;
}
.article-item h3 a:hover {
    color: #4a9eff;
}
.article-meta {
    color: #b0b0b0;
}
.read-more {
    color: #4a9eff;
}
.read-more:hover {
    color: #7bb3ff;
}

/* 404 page styles */
.error-404 h1 {
    color: #4a9eff;
}
.error-404 h2 {
    color: #e0e0e0;
}
.error-404 p {
    color: #b0b0b0;
}
.error-404 .btn {
    background: #4a9eff;
}
.error-404 .btn:hover {
    background: #7bb3ff;
}
.error-404 .btn-secondary {
    background: #5a6268;
}
.error-404 .btn-secondary:hover {
    background: #6c757d;
}
.no-results {
    color: #b0b0b0;
}

/* Article content styles */
.article-container {
    background: #2d2d2d;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.article-container h1 {
    color: #e0e0e0;
}
.article-meta {
    color: #b0b0b0;
}
.article-body {
    color: #e0e0e0;
}
.article-body h2, .article-body h3 {
    color: #e0e0e0;
}
.article-body a {
    color: #4a9eff;
}
.article-body a:hover {
    color: #7bb3ff;
}

.article-content .article-meta {
    color: #b0b0b0;
}

.article-content .article-body {
    color: #e0e0e0;
}

/* 广告容器样式 */
.ads-container {
    margin: 2rem auto;
    padding: 1rem;
    text-align: center;
    max-width: 1200px;
}

.ads-header {
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
    padding: 1rem 0;
}

.ads-content-top {
    padding: 2rem 0;
    background: #1a1a1a;
}

.ads-content-bottom {
    padding: 2rem 0;
    background: #1a1a1a;
}

.ads-footer {
    background: #2d2d2d;
    border-top: 1px solid #3d3d3d;
    padding: 1.5rem 0;
}

.ads-container iframe,
.ads-container img {
    max-width: 100%;
    height: auto;
}

.ads-container .ad-code {
    display: inline-block;
}
