/* Tony's Blog - layui theme (rebuilt) */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f4f5f7;
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #333;
}
a { color: #01AAED; text-decoration: none; }
a:hover { color: #009688; }

/* header */
.header {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
}
.header h1.logo { margin: 0 30px 0 0; font-size: 20px; }
.header h1.logo a { display: block; }
.tony-blog-logo { height: 52px; }
.header .nav { margin-left: 10px; }
.header .nav a {
  color: #555;
  margin-right: 22px;
  font-size: 15px;
  line-height: 52px;
}
.header .nav a:hover { color: #01AAED; }
.header .layui-nav.header-down-nav { display: none; background: transparent; padding: 0; }
.menu-btn { display: none; cursor: pointer; }
.menu { width: 22px; height: 2px; background: #555; position: relative; }
.menu:before, .menu:after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: #555; }
.menu:before { top: -6px; }
.menu:after { top: 6px; }

@keyframes tonyNavSlide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (max-width: 768px) {
  .header { flex-wrap: wrap; }
  .menu-btn { display: block; padding: 14px 0; order: 1; margin-left: auto; }
  .header h1.logo { order: 0; }
  .header .nav { display: none; }
  .header .layui-nav.header-down-nav { display: none; order: 2; width: 100%; animation: tonyNavSlide .2s ease; }
  .header .layui-nav.header-down-nav li { display: block; }
  .header .layui-nav.header-down-nav li a { color: #555; line-height: 2.2; }
}

/* banner */
.banner {
  position: relative;
  width: 100%;
  min-height: 220px;
  background: url("/default/images/banner.jpg") center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}
.banner .title {
  color: #fff;
  font-size: 28px;
  letter-spacing: 1px;
  line-height: 1.45;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
  text-align: center;
  padding: 0 16px;
}
@media (max-width: 768px) {
  .banner { min-height: 160px; }
  .banner .title { font-size: 20px; }
}
.banner .text-inner p { margin: 4px 0; }
.banner .tony-article-cate, .banner .tony-article-tag { font-size: 13px; }
.banner .tony-article-cate a, .banner .tony-article-tag a { color: #fff; margin-right: 8px; }
.tony-banner-cate { font-size: 20px; }

/* content layout */
.content {
  width: 100%;
  max-width: 1200px;
  margin: 24px auto;
}
.cont { width: 100%; }

/* article list */
.list-item .item { margin-bottom: 16px; }
.list-item .item .layui-fluid
{
  margin-left: -15px !important;
}
.item-cont { 
  background: #fff;
  border-radius: 4px;
  padding: 18px 22px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
  transition: box-shadow .28s ease;
}
.item-cont:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, .09); }
.item-cont h3 { margin: 0 0 8px; font-size: 18px; }
.item-cont a h3 { color: #333; }
.item-cont a:hover h3 { color: #01AAED; }
.new-icon { height: 20px; line-height: 20px; padding: 0 8px; font-size: 12px; margin-left: 6px; }
.item-cont p { margin: 6px 0; color: #666; font-size: 14px; }
.item-cont .layui-badge-rim a { color: #555; }

/* article meta: category badge keeps accent, date/reads become plain text + icon */
.tony-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tony-meta-cate { background: #fff; border: 1px solid rgba(1, 170, 237, .55); border-radius: 3px; }
.tony-meta-cate a { color: #01AAED; font-weight: 500; }
.tony-meta-text { color: #999; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.tony-meta-text .layui-icon { font-size: 13px; color: #bbb; }

#tonyPage { margin: 24px 0; }

/* right panels */
.tony-right-panel { background: #fff; border-radius: 4px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(15, 23, 42, .06); }
.tony-right-panel .layui-card-header { font-weight: 600; font-size: 15px; padding: 16px 15px 12px; border-bottom: 1px solid #f0f0f0; }
.tony-right-panel .layui-card-body { padding: 12px 15px; }

/* sidebar tag cloud: airy pills */
.tony-article-tags { display: flex; flex-wrap: wrap; }
.tony-article-tags .layui-badge-rim {
  margin: 4px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: #f8f9fb;
  color: #01AAED;
  font-size: 12px;
  line-height: 1.4;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.tony-article-tags .layui-badge-rim a { color: #01AAED; }
.tony-article-tags .layui-badge-rim:hover { background: #01AAED; }
.tony-article-tags .layui-badge-rim:hover a { color: #fff; }

/* hot articles: ranked list */
.tony-hot-articles { list-style: none; margin: 0; padding: 0; }
.tony-hot-articles li { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px dashed #eee; font-size: 13px; overflow: hidden; }
.tony-hot-articles li:last-child { border-bottom: 0; }
.tony-hot-rank {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: #eef1f5;
  color: #98a4b3;
  font-size: 12px; font-style: normal; font-weight: 700;
  margin-top: 1px;
}
.tony-hot-rank.top3 { background: linear-gradient(135deg, #ff7d4d, #f5484d); color: #fff; box-shadow: 0 2px 6px rgba(245, 72, 77, .35); }
.tony-hot-articles li a { flex: 1 1 auto; min-width: 0; }
.tony-hot-views { flex: 0 0 auto; color: #b6bfc9; font-size: 12px; margin-top: 2px; }
.author-avatar { width: 88px; height: 88px; border-radius: 50%; display: block; margin: 8px auto; object-fit: cover; }
.tony-link span { margin-right: 6px; }
.tony-link a { color: #fff; }
.tony-apply-friendLink a { color: #fff; }

/* article detail */
.tony-article-content .item-box { background: #fff; border-radius: 4px; padding: 20px 26px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.markdown-body { line-height: 1.8; word-break: break-word; }
.markdown-body img { max-width: 100%; }
.markdown-body pre { background: #f6f8fa; padding: 12px; border-radius: 4px; overflow: auto; }

/* footer */
.footer-wrap { margin-top: 36px; border-top: 1px solid #eee; padding: 24px 0 30px; }
.tony-copyright { text-align: center; color: #999; font-size: 13px; line-height: 1.9; }
.tony-copyright a { color: #999; }
.tony-copyright strong a { color: #666; }

/* accessibility: visible keyboard focus */
a:focus-visible {
  outline: 2px solid #01AAED;
  outline-offset: 2px;
  border-radius: 2px;
}

/* comment plugin input readability */
#tony-comment textarea { font-size: 14px; }
#tony-comment textarea::placeholder { color: #999; }

/* float helpers */
.tony-img-circle { border-radius: 50%; }

/* ============================================================
   UI enhancement layer - smooth transitions & polish
   (appended; safe to remove, does not alter replica styles)
   ============================================================ */
:root {
    --tony-primary: #01aaed;
    --tony-primary-dark: #0293cc;
    --tony-shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
    --tony-shadow-md: 0 6px 18px rgba(15, 23, 42, .09);
    --tony-shadow-lg: 0 14px 34px rgba(15, 23, 42, .14);
}

/* page entrance */
body { animation: tonyPageIn .2s ease both; }
@keyframes tonyPageIn { from { opacity: 0; } to { opacity: 1; } }

/* links */
a { transition: color .18s ease, opacity .18s ease; }

/* cards & panels */
.tony-article-content .item-box,
.item-cont .layui-table,
.tony-right-panel {
    transition: box-shadow .28s ease, transform .28s ease;
}
.tony-right-panel:hover {
    box-shadow: var(--tony-shadow-md);
    transform: translateY(-2px);
}
.tony-article-content .item-box { border-radius: 8px; box-shadow: var(--tony-shadow-sm); }
.tony-article-content .item-box:hover { box-shadow: var(--tony-shadow-md); }

/* buttons */
.layui-btn {
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background-color .18s ease !important;
}
.layui-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(1, 170, 237, .35); filter: brightness(1.05); }
.layui-btn:active { transform: translateY(0) scale(.97); box-shadow: 0 1px 4px rgba(1, 170, 237, .3); }
.layui-btn.layui-btn-danger:hover { box-shadow: 0 5px 14px rgba(255, 87, 87, .35); }
.layui-btn.layui-btn-normal:hover { box-shadow: 0 5px 14px rgba(1, 187, 173, .35); }

/* article images */
.markdown-body img {
    border-radius: 8px;
    transition: transform .3s ease, box-shadow .3s ease;
}
.markdown-body img:hover { transform: scale(1.015); box-shadow: var(--tony-shadow-md); }

/* markdown code blocks */
.markdown-body pre {
    border: 1px solid rgba(15, 23, 42, .06);
    transition: box-shadow .25s ease, border-color .25s ease;
}
.markdown-body pre:hover { border-color: rgba(1, 170, 237, .35); box-shadow: var(--tony-shadow-sm); }
.markdown-body code { border-radius: 4px; }

/* sidebar hot list */
.tony-hot-articles li a { transition: padding-left .22s ease, color .22s ease; }
.tony-hot-articles li a:hover { padding-left: 6px; }

/* author avatar */
.author-avatar {
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease;
}
.author-avatar:hover { transform: scale(1.06) rotate(2deg); box-shadow: var(--tony-shadow-md); }

/* tags */
.tony-tag-list a, .layui-badge {
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.tony-tag-list a:hover { transform: translateY(-2px); box-shadow: var(--tony-shadow-sm); }

/* pagination (layui laypage) */
.layui-laypage a, .layui-laypage span {
    transition: all .18s ease !important;
    border-radius: 5px !important;
    margin: 0 2px !important;
}
.layui-laypage a:hover { transform: translateY(-1px); }

/* tables */
.layui-table { transition: box-shadow .25s ease; }
.layui-table tbody tr { transition: background-color .18s ease; }
.layui-table tbody tr:hover { background-color: #f6fbff !important; }

/* forms */
.layui-input, .layui-textarea, .layui-select {
    transition: border-color .2s ease, box-shadow .2s ease !important;
}
.layui-input:focus, .layui-textarea:focus {
    border-color: var(--tony-primary) !important;
    box-shadow: 0 0 0 3px rgba(1, 170, 237, .12) !important;
}

/* header nav */
.header { transition: box-shadow .25s ease; }
.header .layui-nav .layui-nav-item a { transition: color .2s ease, background-color .2s ease; }

/* banner title glow */
.banner .title { text-shadow: 0 2px 12px rgba(0, 0, 0, .18); }

/* footer links */
.tony-copyright a { transition: color .18s ease; }
.tony-copyright a:hover { color: var(--tony-primary); }

/* scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .35); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, .55); }

/* comment block */
.tony-comment { animation: tonyFadeUp .4s ease both; }
@keyframes tonyFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    body, .tony-comment, .header .layui-nav.header-down-nav { animation: none; }
    * { transition: none !important; }
}

/* ============================================================
   性能优化 —— 图标字体 font-display: swap
   覆盖 layui 默认字体声明，文字在字体下载期间立即以回退字形显示，
   避免图标字体阻塞首屏文本渲染（改善 FCP，约 985ms 潜在节省）。
   main.css 在所有布局中均晚于 layui.css 加载，故此处声明优先生效。
   ============================================================ */
@font-face {
    font-family: 'layui-icon';
    src: url('/layui/layui/font/iconfont.woff2') format('woff2'),
         url('/layui/layui/font/iconfont.woff') format('woff'),
         url('/layui/layui/font/iconfont.ttf') format('truetype');
    font-display: swap;
}
