@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  ul, ol {
    list-style: revert;
  }
}

.post-content {
  line-height: 1.625;
  color: #424242;
}

.post-content table {
	border-width: 1px;
	border-color: #666666;
	border-collapse: collapse;
}

.post-content table th {
	border-width: 1px;
	padding: 8px;
	border-style: solid;
  background-color: #dedede;
	border-color: #666666;
}

.dark .post-content table th {
	background-color: #374151;
}
.post-content table td {
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #666666;
}

.post-content h2 {
  font-size: 140%;
}

.post-content h3 {
  font-size: 120%;
}

.post-content h2,
.post-content h3 {
  margin: 2rem 0 0.3rem;
  font-weight: 700;
}

.post-content h2:target,
.post-content h3:target {
  padding-top: 5rem;
}

.post-content ul,
.post-content ol {
  padding: 0.5rem 0 1rem 1.5rem;
}

.post-content ul.list-none {
  padding: 0 0 0 1rem;
}

.post-content ul ul {
  list-style-type: circle;
  padding-left: 1.5rem;
}

.post-content ul ul ul {
  list-style-type: square;
  margin-bottom: 0px;
}

.post-content ul.list-none {
  list-style-type: none;
}

.post-content p code,
.post-content li code {
  background-color: #f0f3f3;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  color: #805ad5;
}

.post-content p {
  margin: 0.5rem 0 1rem;
}

.post-content img {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  margin: 1.5rem auto;
  transition: all 0.3s ease-in-out;
}

/* 智能图片样式类 */
.post-content img.wide-image {
  max-width: 100%;
  height: auto;
  display: block;
}

.post-content img.narrow-image {
  max-width: 60%;
  height: auto;
  display: block;
}

.post-content img.tall-image {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .post-content img.narrow-image {
    max-width: 80%;
  }
}

@media (max-width: 480px) {
  .post-content img.narrow-image {
    max-width: 90%;
  }
}

.post-content a {
  color: #0e7490;
  text-decoration: none;
  font-weight: 500;
  box-shadow: inset 0 -0.125em 0 0 #fff,
    inset 0 -0.375em 0 0 rgb(165 243 252 / 40%);
}

.post-content a:hover {
  color: #0b4657;
}

.dark .post-content a:hover {
  color: #0e7490;
}

.dark .post-content a {
  color: #2fbfe7;
  box-shadow: inset 0 -0.125em 0 0 #000,
    inset 0 -0.375em 0 0 rgb(165 243 252 / 40%);
}

.post-content blockquote {
  color: #9e9e9e;
  padding-left: 1rem;
  border-left-width: 4px;
  border-color: #9e9e9e;
  font-style: italic;
}

.post-content pre,
.post-content .highlight {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.875rem;
}

::selection {
  background: #e9d8fd;
  color: #202684;
  /* WebKit/Blink Browsers */
}

::-moz-selection {
  background: #e9d8fd;
  color: #202684;
  /* Gecko Browsers */
}

a:focus {
  outline: none;
  background: #e9d8fd;
}

.dark a:focus {
  outline: none;
  background: #000000;
}

/* 侧边导航 */

#menu-content > ul {
  padding: none;
}

#TableOfContents > ul {
  list-style-type: none;
  padding-left: 0;
}

#TableOfContents li {
  padding-top: 0.5em;
}

#TableOfContents > ul > li ul {
  list-style-type: none;
  padding-left: 1.5em;
}

#TableOfContents a {
  transition: all 0.2s ease !important;
}
#TableOfContents a:hover {
  color: #1a202c !important;
  transform: translateX(2px) !important;
}

.dark #TableOfContents a:hover {
  color: #fdfdfd !important;
  transform: translateX(2px) !important;
}

.my-iconfont {
  font-family: "iconfont" !important;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 阅读全文按钮样式 - 兼容Tailwind CSS v2 */
.read-more-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease-in-out;
  transform: translateY(0);
  border: 1px solid transparent;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* 白色模式样式 */
.read-more-btn {
  background-color: #2563eb;
  color: white;
  border-color: #2563eb;
}

.read-more-btn:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.read-more-btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.read-more-btn:active {
  transform: translateY(0);
}

/* 暗色模式样式 */
.dark .read-more-btn {
  background-color: #f59e0b;
  color: #111827;
  border-color: #f59e0b;
  box-shadow: 0 1px 3px 0 rgba(245, 158, 11, 0.3), 0 1px 2px 0 rgba(245, 158, 11, 0.2);
}

.dark .read-more-btn:hover {
  background-color: #d97706;
  border-color: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.4), 0 4px 6px -2px rgba(245, 158, 11, 0.3);
}

.dark .read-more-btn:focus {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

/* 响应式调整 */
@media (max-width: 640px) {
  .read-more-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.8rem;
  }
}


