/*
Theme Name: ToolSoftHub
Description: A modern WordPress theme for software reviews and insights
Version: 1.0
Author: Your Name
Text Domain: toolsofthub
*/

/* Custom CSS Variables */
:root {
  --primary: #165DFF;
  --secondary: #722ED1;
  --accent: #0FC6C2;
  --dark: #1D2129;
  --dark-gray: #4E5969;
  --light-gray: #C9CDD4;
  --extra-light: #F2F3F5;
  --primary-color: #165DFF;
  --secondary-color: #0F4CD1;
  --text-dark: #1D2129;
  --text-gray: #4E5969;
  --text-light: #6B7280;
  --bg-light: #F8FAFC;
  --border-color: #E2E8F0;
}

/* 最高优先级图片阴影重置 - 必须在所有其他样式之前 */
* img,
* img *,
* img::before,
* img::after,
* [class*="shadow"] img,
* img[class*="shadow"],
* .entry-content img,
* .wp-block-post-content img,
* .wp-block-image img,
* .wp-block-gallery img,
* .wp-block-gallery .blocks-gallery-item img,
* .wp-block-image,
* .wp-block-gallery,
* .wp-block-gallery .blocks-gallery-item {
    box-shadow: none !important;
    filter: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* 确保Tailwind CSS的阴影类不会影响图片 */
.shadow img,
.shadow-sm img,
.shadow-md img,
.shadow-lg img,
.shadow-xl img,
.shadow-2xl img,
img.shadow,
img.shadow-sm,
img.shadow-md,
img.shadow-lg,
img.shadow-xl,
img.shadow-2xl {
    box-shadow: none !important;
    filter: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* 覆盖所有可能的WordPress和Tailwind样式 */
body img,
html img,
#content img,
.main img,
.entry img,
.post img,
.page img,
article img,
section img,
div img {
    box-shadow: none !important;
    filter: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* Custom Styles */
.content-auto {
  content-visibility: auto;
}

.text-balance {
  text-wrap: balance;
}

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(-4px);
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: rgba(22, 93, 255, 0.9);
}

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background-color: rgba(22, 93, 255, 0.1);
}

.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--dark-gray);
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  left: 0;
  bottom: -4px;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.hero-gradient {
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.05) 0%, rgba(114, 46, 209, 0.05) 100%);
}

.category-card {
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(22, 93, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-card:hover::before {
  opacity: 1;
}

/* WordPress Specific Styles */
.wp-block-image img {
  max-width: 100%;
  height: auto;
  box-shadow: none !important;
}

.aligncenter {
  text-align: center;
}

.alignleft {
  float: left;
  margin-right: 1rem;
}

.alignright {
  float: right;
  margin-left: 1rem;
}

/* Animation */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.category-btn.bg-primary {
  background-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px 0 rgba(22,93,255,0.10);
}

.category-btn.category-active {
  background: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px 0 rgba(22,93,255,0.10);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main.main-content-padding {
  flex: 1 0 auto;
  min-height: 0;
  padding-bottom: 3rem;
}
footer {
  flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
  html.dark, body.dark {
    background: #18181b;
    color: #f3f4f6;
  }
}
html.dark body, body.dark {
  background: #18181b;
  color: #f3f4f6;
}
html.dark .bg-white, body.dark .bg-white {
  background: #23232b !important;
  color: #f3f4f6 !important;
}
html.dark .text-dark, body.dark .text-dark {
  color: #f3f4f6 !important;
}
html.dark .text-dark-gray, body.dark .text-dark-gray {
  color: #b0b3b8 !important;
}
html.dark .shadow-xl, body.dark .shadow-xl {
  box-shadow: 0 4px 32px 0 rgba(0,0,0,0.7) !important;
}
html.dark .btn-primary, body.dark .btn-primary {
  background: #2563eb !important;
  color: #fff !important;
}
html.dark .bg-gray-50, body.dark .bg-gray-50 {
  background: #23232b !important;
}

/* GDPR Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 1rem;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    backdrop-filter: blur(10px);
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cookie-consent-text p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: #3b82f6;
    color: white;
}

.cookie-btn-accept:hover {
    background: #2563eb;
}

.cookie-btn-settings {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-settings:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cookie-btn-reject {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Cookie Settings Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: white;
    border-radius: 0.75rem;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.cookie-modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.cookie-modal-header p {
    color: #6b7280;
    font-size: 0.875rem;
}

.cookie-modal-body {
    padding: 1.5rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.cookie-category-title {
    font-weight: 600;
    color: #1f2937;
}

.cookie-category-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.cookie-toggle {
    position: relative;
    width: 3rem;
    height: 1.5rem;
    background: #d1d5db;
    border-radius: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-toggle.active {
    background: #3b82f6;
}

.cookie-toggle-slider {
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1.25rem;
    height: 1.25rem;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.cookie-toggle.active .cookie-toggle-slider {
    transform: translateX(1.5rem);
}

.cookie-modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-consent-buttons {
        justify-content: center;
    }
    
    .cookie-modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
}

/* 强优先级优化文章内容区块的基础排版和美化，防止被全局reset覆盖 */
.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.entry-content blockquote,
.entry-content table {
  margin-bottom: 1.25em !important;
}

.entry-content ul,
.entry-content ol {
  padding-left: 2em !important;
}

.entry-content li {
  margin-bottom: 0.5em !important;
}

.entry-content table {
  border-collapse: collapse !important;
  width: 100% !important;
}

.entry-content th,
.entry-content td {
  border: 1px solid #ddd !important;
  padding: 0.5em !important;
}

.entry-content blockquote {
  border-left: 4px solid var(--primary, #165DFF) !important;
  padding-left: 1em !important;
  color: #555 !important;
  background: #f9f9f9 !important;
}

/* 确保文章内容与编辑器完全一致的样式 */
.entry-content,
.wp-block-post-content {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  color: #1D2129 !important;
}

/* 标题样式 */
.entry-content h1,
.wp-block-post-content h1 {
  font-size: 2.25rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  color: #1D2129 !important;
}

.entry-content h2,
.wp-block-post-content h2 {
  font-size: 1.875rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin-top: 1.75rem !important;
  margin-bottom: 0.75rem !important;
  color: #1D2129 !important;
}

.entry-content h3,
.wp-block-post-content h3 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.5rem !important;
  color: #1D2129 !important;
}

.entry-content h4,
.wp-block-post-content h4 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0.5rem !important;
  color: #1D2129 !important;
}

.entry-content h5,
.wp-block-post-content h5 {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  margin-top: 1rem !important;
  margin-bottom: 0.5rem !important;
  color: #1D2129 !important;
}

.entry-content h6,
.wp-block-post-content h6 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  margin-top: 1rem !important;
  margin-bottom: 0.5rem !important;
  color: #1D2129 !important;
}

/* 段落样式 */
.entry-content p,
.wp-block-post-content p {
  margin-bottom: 1.5em !important;
  margin-top: 0 !important;
  line-height: 1.6 !important;
  font-size: 16px !important;
}

/* 列表样式 */
.entry-content ul,
.wp-block-post-content ul {
  margin-bottom: 1.5em !important;
  margin-top: 0 !important;
  padding-left: 2em !important;
  list-style-type: disc !important;
}

.entry-content ol,
.wp-block-post-content ol {
  margin-bottom: 1.5em !important;
  margin-top: 0 !important;
  padding-left: 2em !important;
  list-style-type: decimal !important;
}

.entry-content li,
.wp-block-post-content li {
  margin-bottom: 0.5em !important;
  line-height: 1.6 !important;
}

/* 链接样式 */
.entry-content a,
.wp-block-post-content a {
  color: #165DFF !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 2px !important;
  transition: color 0.2s ease !important;
}

.entry-content a:hover,
.wp-block-post-content a:hover {
  color: #0F4CD1 !important;
  text-decoration-thickness: 2px !important;
}

/* 图片样式 */
.entry-content img,
.wp-block-post-content img,
.wp-block-image img,
.wp-block-gallery .blocks-gallery-item img,
img,
.wp-block-image,
.wp-block-gallery .blocks-gallery-item {
  box-shadow: none !important;
  filter: none !important;
  background: none !important;
}

/* 确保所有图片都没有阴影，包括Tailwind CSS的阴影类 */
.entry-content img.shadow,
.entry-content img.shadow-sm,
.entry-content img.shadow-md,
.entry-content img.shadow-lg,
.entry-content img.shadow-xl,
.entry-content img.shadow-2xl,
.wp-block-post-content img.shadow,
.wp-block-post-content img.shadow-sm,
.wp-block-post-content img.shadow-md,
.wp-block-post-content img.shadow-lg,
.wp-block-post-content img.shadow-xl,
.wp-block-post-content img.shadow-2xl,
.wp-block-image img.shadow,
.wp-block-image img.shadow-sm,
.wp-block-image img.shadow-md,
.wp-block-image img.shadow-lg,
.wp-block-image img.shadow-xl,
.wp-block-image img.shadow-2xl,
.wp-block-gallery .blocks-gallery-item img.shadow,
.wp-block-gallery .blocks-gallery-item img.shadow-sm,
.wp-block-gallery .blocks-gallery-item img.shadow-md,
.wp-block-gallery .blocks-gallery-item img.shadow-lg,
.wp-block-gallery .blocks-gallery-item img.shadow-xl,
.wp-block-gallery .blocks-gallery-item img.shadow-2xl {
  box-shadow: none !important;
}

/* 确保图片容器也没有阴影 */
.entry-content .wp-block-image.shadow,
.entry-content .wp-block-image.shadow-sm,
.entry-content .wp-block-image.shadow-md,
.entry-content .wp-block-image.shadow-lg,
.entry-content .wp-block-image.shadow-xl,
.entry-content .wp-block-image.shadow-2xl,
.wp-block-post-content .wp-block-image.shadow,
.wp-block-post-content .wp-block-image.shadow-sm,
.wp-block-post-content .wp-block-image.shadow-md,
.wp-block-post-content .wp-block-image.shadow-lg,
.wp-block-post-content .wp-block-image.shadow-xl,
.wp-block-post-content .wp-block-image.shadow-2xl {
  box-shadow: none !important;
}

/* 代码样式 */
.entry-content code,
.wp-block-post-content code {
  background-color: #F1F5F9 !important;
  color: #E11D48 !important;
  padding: 0.125em 0.25em !important;
  border-radius: 4px !important;
  font-size: 0.875em !important;
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace !important;
}

.entry-content pre,
.wp-block-post-content pre {
  background-color: #1E293B !important;
  color: #E2E8F0 !important;
  padding: 1.5em !important;
  border-radius: 8px !important;
  overflow-x: auto !important;
  margin: 1.5em 0 !important;
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace !important;
  font-size: 0.875em !important;
  line-height: 1.5 !important;
}

.entry-content pre code,
.wp-block-post-content pre code {
  background-color: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* 表格样式 */
.entry-content table,
.wp-block-post-content table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1.5em 0 !important;
  font-size: 0.875em !important;
}

.entry-content th,
.entry-content td,
.wp-block-post-content th,
.wp-block-post-content td {
  padding: 0.75em !important;
  text-align: left !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

.entry-content th,
.wp-block-post-content th {
  background-color: #F8FAFC !important;
  font-weight: 600 !important;
  color: #1D2129 !important;
}

.entry-content tr:hover,
.wp-block-post-content tr:hover {
  background-color: #F8FAFC !important;
}

/* 引用块样式 */
.entry-content blockquote,
.wp-block-post-content blockquote {
  margin: 1.5em 0 !important;
  padding: 1em 1.5em !important;
  border-left: 4px solid #165DFF !important;
  background-color: #F8FAFC !important;
  border-radius: 0 8px 8px 0 !important;
  font-style: italic !important;
  color: #4E5969 !important;
}

.entry-content blockquote p,
.wp-block-post-content blockquote p {
  margin-bottom: 0.5em !important;
}

.entry-content blockquote p:last-child,
.wp-block-post-content blockquote p:last-child {
  margin-bottom: 0 !important;
}

/* 分隔线样式 */
.entry-content hr,
.wp-block-post-content hr {
  border: none !important;
  border-top: 1px solid #E2E8F0 !important;
  margin: 2em 0 !important;
}

/* Gutenberg 块样式 */
.wp-block-paragraph {
  margin-bottom: 1.5em !important;
  margin-top: 0 !important;
}

.wp-block-heading {
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
}

.wp-block-heading:first-child {
  margin-top: 0 !important;
}

.wp-block-image {
  margin: 1.5em 0 !important;
}

.wp-block-image figcaption {
  text-align: center !important;
  font-size: 0.875em !important;
  color: #6B7280 !important;
  margin-top: 0.5em !important;
  font-style: italic !important;
}

.wp-block-quote {
  margin: 1.5em 0 !important;
  padding: 1em 1.5em !important;
  border-left: 4px solid #165DFF !important;
  background-color: #F8FAFC !important;
  border-radius: 0 8px 8px 0 !important;
  font-style: italic !important;
  color: #4E5969 !important;
}

.wp-block-code {
  background-color: #1E293B !important;
  color: #E2E8F0 !important;
  padding: 1.5em !important;
  border-radius: 8px !important;
  overflow-x: auto !important;
  margin: 1.5em 0 !important;
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace !important;
  font-size: 0.875em !important;
  line-height: 1.5 !important;
}

.wp-block-list {
  margin-bottom: 1.5em !important;
  margin-top: 0 !important;
}

.wp-block-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1.5em 0 !important;
  font-size: 0.875em !important;
}

.wp-block-button {
  margin: 1.5em 0 !important;
}

.wp-block-button__link {
  display: inline-block !important;
  background-color: #165DFF !important;
  color: white !important;
  padding: 0.75em 1.5em !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: background-color 0.2s ease !important;
}

.wp-block-button__link:hover {
  background-color: #0F4CD1 !important;
  color: white !important;
  text-decoration: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .entry-content,
  .wp-block-post-content {
    font-size: 15px !important;
  }
  
  .entry-content h1,
  .wp-block-post-content h1 {
    font-size: 1.875rem !important;
  }
  
  .entry-content h2,
  .wp-block-post-content h2 {
    font-size: 1.5rem !important;
  }
  
  .entry-content h3,
  .wp-block-post-content h3 {
    font-size: 1.25rem !important;
  }
} 