/*
 * Modown visual polish
 * Presentation-only overrides for the public theme, account center and login page.
 */

:root {
  --ui-radius: 14px;
  --ui-radius-sm: 10px;
  --ui-surface: #fff;
  --ui-surface-soft: #f7f9fc;
  --ui-border: #e8edf3;
  --ui-text: #263142;
  --ui-muted: #7a8494;
  --ui-shadow: 0 8px 28px rgba(31, 45, 61, 0.06);
  --ui-shadow-hover: 0 14px 34px rgba(31, 45, 61, 0.11);
}

body {
  background-color: #f5f7fa;
  color: var(--ui-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::-webkit-scrollbar-thumb {
  background-color: #c4ccd7;
  border-radius: 999px;
}

.header {
  background-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 18px rgba(31, 45, 61, 0.05);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
}

.header.scrolled {
  box-shadow: 0 8px 24px rgba(31, 45, 61, 0.08);
}

.nav-main .sub-menu,
.nav-right .sub-menu,
.nav-search-form .search-form .search-cats,
.search-wrap .search-form .search-cats,
.banner .search-form .search-cats,
.banner-archive .search-form .search-cats {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-hover);
}

.nav-main .sub-menu a,
.nav-right .sub-menu a {
  border-radius: 8px;
}

.nav-main .sub-menu a:hover,
.nav-right .sub-menu li.item a:hover {
  background-color: var(--ui-surface-soft);
}

.nav-right .nav-login a.reg,
.btn,
.pagination-trigger a,
.home-blogs .more a,
.widget-erphpdown .down,
.widget-question-new a {
  border-radius: var(--ui-radius-sm);
  box-shadow: 0 6px 16px rgba(31, 45, 61, 0.1);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.nav-right .nav-login a.reg:hover,
.btn:hover,
.pagination-trigger a:hover,
.home-blogs .more a:hover,
.widget-erphpdown .down:hover,
.widget-question-new a:hover {
  box-shadow: 0 9px 22px rgba(31, 45, 61, 0.14);
  transform: translateY(-1px);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea,
select {
  border-radius: var(--ui-radius-sm);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  border-color: var(--theme-color);
  box-shadow: 0 0 0 3px rgba(255, 95, 51, 0.12);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-color) 14%, transparent);
}

.search-wrap-container {
  border: 1px solid var(--ui-border);
  border-top: 0;
  border-radius: 0 0 var(--ui-radius) var(--ui-radius);
  box-shadow: var(--ui-shadow);
}

.search-wrap .search-input,
.banner .search-form .search-input,
.banner-archive .search-form .search-input,
.banner-search .search-form .search-input,
.slider-bottom-search .search-input {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: 0 8px 24px rgba(31, 45, 61, 0.08);
}

.filters,
.lists,
.grids .list,
.grids .grid,
.grids .audio,
.article-header-box,
.single-content,
.article-nav,
.single-related,
.sidebar .widget,
.home-caticons,
.home-widgets .hf-widget {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
}

.grids .grid,
.grids .list,
.home-cathumbs .items .item {
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.grids .grid:hover,
.grids .list:hover,
.home-cathumbs .items .item:hover {
  border-color: #dce3ec;
  box-shadow: var(--ui-shadow-hover);
  transform: translateY(-3px);
}

.grids .grid .img,
.grids .grid .thumb,
.grids .grid .grid-video,
.grids .list .thumb,
.lists .list .img,
.lists .list img,
.swiper-container,
.swiper-container .swiper-slide img,
.slider-right img,
.slider-right2 img,
.home-cathumbs .items .item,
.home-cathumbs .items .item img {
  border-radius: var(--ui-radius);
}

.grids .grid .img,
.grids .grid .thumb,
.grids .grid .grid-video {
  border-radius: var(--ui-radius) var(--ui-radius) 0 0;
}

.filters {
  padding: 18px 20px;
}

.filter a {
  border-radius: 8px;
  transition: color .18s ease, background-color .18s ease;
}

.filter a:hover {
  background-color: var(--ui-surface-soft);
  color: var(--theme-color);
}

.filter a.active {
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(255, 95, 51, 0.16);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--theme-color) 20%, transparent);
}

.grids .grid .img .img-cat,
.lists .list .img .img-cat,
.grids .list .img .img-cat,
.grids .grid .grid-meta .price .fee,
.lists .list .list-meta .price .fee,
.article-tags a,
.widget-tags .items a {
  border-radius: 999px;
}

.grids .grid h3 a,
.lists .list h3 a,
.article-title {
  color: var(--ui-text);
}

.grids .grid .grid-meta,
.lists .list .list-meta,
.article-meta,
.breadcrumbs,
.archive-desc {
  color: var(--ui-muted);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  background: var(--ui-surface-soft);
  border-left: 3px solid var(--theme-color);
  border-radius: 0 var(--ui-radius-sm) var(--ui-radius-sm) 0;
  padding: 10px 14px;
}

.article-content blockquote {
  background: var(--ui-surface-soft);
  border-left: 3px solid var(--theme-color);
  border-radius: 0 var(--ui-radius-sm) var(--ui-radius-sm) 0;
  color: #697386;
}

.article-content code {
  background: #eef2f6;
  border-radius: 6px;
}

.article-content pre {
  background: #222b38;
  border-radius: var(--ui-radius-sm);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.article-content img,
.article-content .gallery-item img,
.article-content table,
.article-copyright,
.comment-signarea,
.widget-commentlist .sidebar-comments-comment {
  border-radius: var(--ui-radius-sm);
}

.article-copyright,
.comment-signarea,
.widget-commentlist .sidebar-comments-comment,
.widget-erphpdown .custom-metas,
.widget-erphpdown .erphpdown-child {
  background-color: var(--ui-surface-soft);
}

.pagination ul > li > a,
.pagination ul > li > span,
.comments-pagination a,
.comments-pagination span,
.article-paging .post-page-numbers {
  border-radius: 9px;
  background-color: #edf1f5;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

.pagination ul > li > a:hover,
.comments-pagination a:hover,
.article-paging .post-page-numbers:hover {
  color: var(--theme-color);
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(31, 45, 61, .09);
  transform: translateY(-1px);
}

.layui-layer,
.fancybox-content,
.article-act > .popup {
  border-radius: var(--ui-radius);
  box-shadow: 0 20px 60px rgba(31, 45, 61, .2);
}

.layui-layer-btn a {
  border-radius: 8px;
}

/* Erphpdown blocks as rendered inside the Modown theme. */
.erphpdown,
.erphpdown-box,
.erphpdown-box-default,
.article-content .erphpdown-content-vip {
  background: var(--ui-surface-soft) !important;
  border: 1px solid #f0c8bd !important;
  border-color: color-mix(in srgb, var(--theme-color) 34%, var(--ui-border)) !important;
  border-radius: var(--ui-radius) !important;
}

.erphpdown .erphpdown-child,
.erphpdown-box .erphpdown-child,
.erphpdown-box-default .erphpdown-child,
.erphpdown-box-default .custom-metas {
  background: #fff;
  border-color: var(--ui-border) !important;
  border-radius: var(--ui-radius-sm);
}

.erphpdown .erphpdown-buy,
.erphpdown .erphpdown-buy-index,
.erphpdown .erphpdown-vip,
.erphpdown .erphpdown-down,
.erphpdown .erphp-login-must,
.erphpdown-content-vip .erphpdown-buy,
.erphpdown-content-vip .erphpdown-buy-index,
.erphpdown-content-vip .erphpdown-vip,
.erphpdown-content-vip .erphpdown-see-btn,
.erphpdown-box .down,
.erphpdown-box .vip a,
.erphpdown-box-default .down,
.erphpdown-box-default .vip a {
  border-radius: var(--ui-radius-sm);
  box-shadow: 0 6px 16px rgba(31, 45, 61, .11);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.erphpdown .erphpdown-buy:hover,
.erphpdown .erphpdown-buy-index:hover,
.erphpdown .erphpdown-vip:hover,
.erphpdown .erphpdown-down:hover,
.erphpdown .erphp-login-must:hover,
.erphpdown-content-vip .erphpdown-buy:hover,
.erphpdown-content-vip .erphpdown-buy-index:hover,
.erphpdown-content-vip .erphpdown-vip:hover,
.erphpdown-content-vip .erphpdown-see-btn:hover,
.erphpdown-box .down:hover,
.erphpdown-box .vip a:hover,
.erphpdown-box-default .down:hover,
.erphpdown-box-default .vip a:hover {
  box-shadow: 0 9px 22px rgba(31, 45, 61, .15);
  transform: translateY(-1px);
}

/* Account center */
.container-user {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: #fff;
  box-shadow: var(--ui-shadow);
  overflow: hidden;
}

.userside {
  background: var(--ui-surface-soft);
  border-right: 1px solid var(--ui-border);
}

.usermenu li a {
  border-radius: 9px;
  margin-bottom: 4px;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

.usermenu li a:hover {
  background: #eef2f7;
  transform: translateX(2px);
}

.usermenu li.active a {
  background: #fff;
  box-shadow: 0 4px 14px rgba(31, 45, 61, .07);
}

.usercheck,
.user-meta .form-control,
.charge .charge-header .item,
#charge-form .item .prices,
#charge-form .input-recharge,
#charge-form2 .input-recharge,
#charge-form .btn-recharge,
#charge-form2 .btn-card,
.charge-gift,
.user-force-bind,
.user-wap-box1,
.user-wap-box2 .item,
.user-wap-box22,
.user-wap-box4 {
  border-radius: var(--ui-radius-sm);
}

.charge .charge-header .item,
.vip-items .item,
.vip-item,
.user-wap-box1,
.user-wap-box2 .item,
.user-wap-box22,
.user-wap-box4 {
  border: 1px solid var(--ui-border);
  box-shadow: 0 8px 24px rgba(31, 45, 61, .06);
}

.vip-items .item,
.vip-item {
  border-radius: var(--ui-radius);
}

.vip-items .item .title,
.vip-item h6 {
  border-radius: var(--ui-radius) var(--ui-radius) 0 0;
}

.table > thead > tr > th {
  background: var(--ui-surface-soft);
  border-bottom-color: var(--ui-border);
  color: #525f70;
}

.table > tbody > tr > td,
.user-postlist li,
.user-commentlist li {
  border-color: var(--ui-border);
}

/* Login and registration */
.loginbox {
  border: 1px solid rgba(230, 235, 242, .95);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(31, 45, 61, .12);
}

.loginbox.has-left .loginimage {
  border-radius: 24px 0 0 24px;
}

.loginbox h2 {
  color: var(--ui-text);
  font-weight: 600;
}

.loginbox h2 img {
  border-radius: 16px;
}

.loginbox .input-item {
  margin-bottom: 12px;
}

.loginbox .input-item .input-control {
  background: #f8fafc;
  border-color: #e6ebf2;
  border-radius: 11px;
}

.loginbox .input-item .input-control:focus {
  background: #fff;
}

.loginbox .input-submit .submit {
  border-radius: 11px;
  box-shadow: 0 8px 20px rgba(255, 95, 51, .18);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--theme-color) 24%, transparent);
}

.loginbox .input-submit .submit:hover {
  transform: translateY(-1px);
}

.return-home {
  background: rgba(255, 255, 255, .86);
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(31, 45, 61, .08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

body.night .loginbox {
  border-color: #343b45;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

@media (max-width: 768px) {
  :root {
    --ui-radius: 12px;
    --ui-radius-sm: 9px;
  }

  .filters,
  .lists,
  .single-content,
  .article-header-box,
  .article-nav,
  .single-related,
  .sidebar .widget {
    box-shadow: 0 5px 18px rgba(31, 45, 61, .05);
  }

  .container-user {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .userside {
    border-right: 0;
  }
}

@media (max-width: 640px) {
  .loginbox {
    min-height: 100%;
    padding-left: 22px;
    padding-right: 22px;
    border: 0;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grids .grid,
  .grids .list,
  .btn,
  .pagination-trigger a,
  .home-blogs .more a {
    transition: none;
  }
}
