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

#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;
      transform: rotate(0deg) translate(0, -1px);
}

.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 {
  inline-size: calc(100% - 1rem);
  margin-block-start: calc(env(safe-area-inset-top) + 1rem);
  max-block-size: calc(100% - env(safe-area-inset-top) - 1rem);
}

.v-dialog--fullscreen > .v-overlay__content{
  inline-size: 100%;
  margin-block-start: env(safe-area-inset-top);
  max-block-size: calc(100% - env(safe-area-inset-top));
}

/* 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;
}

.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{
  /* stylelint-disable-next-line property-no-vendor-prefix */
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background-color: rgb(var(--v-theme-surface), 0.9) !important;
}

.v-overlay__content .v-card:not(.bg-primary){
  /* stylelint-disable-next-line property-no-vendor-prefix */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background-color: rgb(var(--v-theme-surface), 0.95) !important;

  .v-list, .v-table {
    /* stylelint-disable-next-line property-no-vendor-prefix */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    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;
}
