// Write your overrides
@tailwind base;
@tailwind components;
@tailwind utilities;


html.v-overlay-scroll-blocked {
  position: fixed;
}

html.v-overlay-scroll-blocked body {
  --v-body-scroll-y: 0px !important;
}

@media (width <= 768px){
  html.v-overlay-scroll-blocked {
    position: relative;
  }
}

@mixin hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
  
  &::-webkit-scrollbar {
    display: none;
  }
}

@media (width <= 768px) {
  html,body {
    @include hide-scrollbar;
  }
}

#nprogress .bar {
  background: rgb(var(--v-theme-primary)) !important;
  inset-block-start: env(safe-area-inset-top) !important;
}

#nprogress .peg {
  box-shadow: 0 0 10px rgb(var(--v-theme-primary)), 0 0 5px rgb(var(--v-theme-primary)) !important;
  inline-size: 5px;
      transform: rotate(0deg) translate(0, 0);
}

.v-toast--bottom {
  z-index: 2500;
  margin-block-end: env(safe-area-inset-bottom);
}

.v-toast--top {
  z-index: 2500;
  margin-block-start: env(safe-area-inset-top);
}

.v-dialog > .v-overlay__content {
  margin-block: env(safe-area-inset-top) env(safe-area-inset-bottom);
}

.v-bottom-sheet > .v-bottom-sheet__content.v-overlay__content > .v-card {
  padding-block-end: env(safe-area-inset-bottom);
}

.v-dialog--fullscreen > .v-overlay__content > .v-card {
  padding-block-end: calc(env(safe-area-inset-top) + env(safe-area-inset-bottom));
}

/* router view transition fade-slide */
.fade-slide-leave-active,
.fade-slide-enter-active {
  transition: all 0.6s;
}

.fade-slide-enter-from {
  opacity: 0;
  transform: translateY(-45px);
}

.fade-slide-leave-to {
  opacity: 0;
  transform: translateY(45px);
}

.grid-info-card {
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  padding-block-end: 1rem;
}

.text-moviepilot {
  background-clip: text;
  background-image: linear-gradient(to bottom right,var(--tw-gradient-stops));
  color: transparent;

  --tw-gradient-from: #818cf8;
  --tw-gradient-stops: var(--tw-gradient-from),var(--tw-gradient-to);
  --tw-gradient-to: #c084fc;
}

.slider-header {
  position: relative;
  display: flex;
  margin-block: 1.5rem 1rem;
}

.slider-title {
  display: inline-flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.75rem;
}

@media (width >= 640px){
  .slider-title {
      overflow: hidden;
      font-size: 1.5rem;
      line-height: 2.25rem;
      text-overflow: ellipsis;
      white-space: nowrap;
  }
}

// 美化滚动条
::-webkit-scrollbar {
  block-size: 8px;
  inline-size: 8px;
}

::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgb(var(--v-theme-perfect-scrollbar-thumb));
  box-shadow: inset 0 0 10px rgba(0,0,0,20%);

  @media(hover){
    &:hover{
      background: #a1a1a1;
    }
  }
}

.v-alert--variant-elevated, .v-alert--variant-flat {
  background: rgb(var(--v-table-header-background));
  color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
}

.backdrop-blur {
  --tw-backdrop-blur: blur(8px)!important;

  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important;
}

.v-toolbar{
  background: rgb(var(--v-table-header-background));
}

.v-toast {
  z-index: 2500 !important;
 }

 .v-divider {
  border-color: rgba(var(--v-theme-on-background), var(--v-selected-opacity));
  opacity:0.75;
 }

 .apexcharts-title-text {
  color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity)) !important;
 }

 .grid-site-card {
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  padding-block-end: 1rem;
}

.grid-media-card {
  grid-template-columns: repeat(auto-fill, minmax(9.375rem, 1fr));
}

.grid-backdrop-card {
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  padding-block-end: 1rem;
}

.grid-torrent-card {
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  padding-block-end: 1rem;
}

.grid-plugin-card {
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  padding-block-end: 1rem;
}

.grid-downloading-card {
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  padding-block-end: 1rem;
}

.grid-directory-card {
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  padding-block-end: 1rem;
}


.grid-filterrule-card {
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  padding-block-end: 1rem;
}

.grid-customrule-card {
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  padding-block-end: 1rem;
}

.grid-subscribe-card {
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  padding-block-end: 1rem;
}

.grid-user-card {
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  padding-block-end: 1rem;
}

@media (width <= 600px) {
  .user-list-container {
    padding: 12px;
  }

  .grid-user-card {
    gap: 1rem;
    grid-template-columns: 1fr;
  }
}

@media (width >= 601px) and (width <= 960px) {
  .grid-user-card{
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (width >= 961px) {
  .grid-user-card {
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

.grid-app-card {
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  padding-block-end: 1rem;
}

.v-tabs:not(.v-tabs-pill).v-tabs--horizontal {
  border-block-end: 1px solid rgba(var(--v-border-color), var(--v-border-opacity));
}

.v-fab__container {
  padding-block-end: env(safe-area-inset-bottom);
}

.v-overlay__content .v-list{
  background-color: rgb(var(--v-theme-surface)) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  padding: 4px !important;
  margin: 0 !important;
}

.v-overlay__content .v-card:not(.bg-primary){
  background-color: rgb(var(--v-theme-surface)) !important;
  border-radius: 8px !important;
  box-shadow: none !important;

  .v-list, .v-table {
    background-color: transparent !important;
  }
}

.text-shadow {
  text-shadow: 1px 1px #777;
}

.card-cover-blurred::before {
  position: absolute;
  /* stylelint-disable-next-line property-no-vendor-prefix */
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  background: rgba(29, 39, 59, 48%);
  content: '';
  inset: 0;
}

/* 菜单项样式 */
.v-list-item {
  border-radius: 4px !important;
  margin: 2px 0 !important;
  transition: background-color 0.15s ease;
}

.v-list-item:hover {
  background-color: rgba(var(--v-theme-on-surface), 0.04) !important;
}

/* 下拉菜单整体样式 */
.v-menu > .v-overlay__content {
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(var(--v-theme-on-surface), 0.08) !important;
  overflow: hidden;
}

/* 通知弹窗样式 */
.notification-menu .v-overlay__content {
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(var(--v-theme-on-surface), 0.08) !important;
  overflow: hidden;
}

/* 主题切换菜单样式 */
.theme-menu .v-overlay__content {
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(var(--v-theme-on-surface), 0.08) !important;
}

/* 用户菜单样式 */
.user-menu .v-overlay__content {
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(var(--v-theme-on-surface), 0.08) !important;
}

/* 菜单按钮交互效果 */
.v-btn.v-btn--icon {
  transition: opacity 0.15s ease;
}

.v-btn.v-btn--icon:hover {
  opacity: 0.85;
}

/* 菜单弹出动画优化 */
.v-overlay__content {
  transition: opacity 0.2s ease !important;
}

/* 菜单卡片和列表 */
.v-overlay__content .v-list{
  background-color: rgb(var(--v-theme-surface)) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  padding: 4px !important;
  margin: 0 !important;
}

.v-overlay__content .v-card:not(.bg-primary){
  background-color: rgb(var(--v-theme-surface)) !important;
  border-radius: 8px !important;
  box-shadow: none !important;

  .v-list, .v-table {
    background-color: transparent !important;
  }
}
