* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
  }
  
  :root {
    --box-bg: rgba(20, 20, 20, 0.6);
    --border-color: #222;
    --text-color: #fff;
    --heart-color: #ff2a6d;
    --primary-color: #ffffff;
  }
  
  body {
    background-color: #0f0f0f;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    min-height: 100vh;
    position: relative;
    color: var(--text-color);
    overflow-x: hidden;
    padding-top: 30px;
  }
  
  #particles-js {
    width: 100%;
    height: 100%;
    background-position: 50% 50%;
    position: fixed;
    top: 0px;
    z-index: -1;
  }
  
  .page-title {
    text-align: center;
    font-size: 4.5rem;
    font-weight: normal;
    color: white;
    margin: 0 0 20px 0;
  }
  
  .search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
  }
  
  #search-box {
    background-color: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(80, 80, 80, 0.3);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    width: 200px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    outline: none;
  }
  
  #search-box:hover, #search-box:focus {
    width: 300px;
    background-color: rgba(40, 40, 40, 0.8);
    border-color: rgba(120, 120, 120, 0.5);
  }
  
  #search-box::placeholder {
    color: rgba(255, 255, 255, 0.5);
  }
  
  .categories-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    max-width: 1200px;
    padding: 0 15px;
  }
  
  .category-btn {
    background-color: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(80, 80, 80, 0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
  }
  
  .category-btn:hover {
    background-color: rgba(40, 40, 40, 0.8);
  }
  
  .category-btn.active {
    background-color: rgba(40, 40, 40, 0.9);
    border-color: rgba(120, 120, 120, 0.5);
  }
  
  .media-type-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 20px;
  }
  
  .media-tab {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 15px;
    transition: all 0.2s ease;
    position: relative;
  }
  
  .media-tab::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.2s ease;
  }
  
  .media-tab.active {
    color: white;
  }
  
  .media-tab.active::after {
    width: 100%;
  }
  
  .media-tab:hover {
    color: white;
  }
  
  #media-content {
    position: relative;
    width: 100%;
    height: 100%;
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding-bottom: 20px;
    max-width: 1200px;
  }
  
  .item {
    width: 180px;
    height: 270px;
    margin: 12px;
    display: flex;
    border-radius: 10px;
    transition: all 0.5s;
    perspective: 1000px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
  }
  
  .item-link {
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .item img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
  }
  
  .item:hover {
    cursor: pointer;
    transform: rotate(-10deg) scale(1.3);
    box-shadow: 0 0 1vw #181818;
    z-index: 10;
  }
  
  .media-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 70%, rgba(0,0,0,0) 100%);
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 0 0 10px 10px;
  }
  
  .item:hover .media-info {
    opacity: 1;
  }
  
  .media-title {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .media-year {
    font-size: 0.8rem;
    opacity: 0.8;
  }
  
  .progress-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
  }
  
  .progress-bar {
    height: 100%;
    background-color: white;
    transition: width 0.2s ease;
  }
  
  .tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-family: sans-serif;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 9999;
    backdrop-filter: blur(2px);
  }
  
  .tooltip.show {
    opacity: 1;
  }
  
  .loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2rem;
    color: white;
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 15px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  .pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0 60px;
    gap: 20px;
    width: 100%;
    max-width: 500px;
  }
  
  .pagination-btn {
    background-color: rgba(40, 40, 40, 0.6);
    color: white;
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .pagination-btn:hover:not(:disabled) {
    background-color: rgba(60, 60, 60, 0.6);
    border-color: rgba(120, 120, 120, 0.5);
  }
  
  .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .page-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
  }
  
  #current-page {
    background-color: rgba(40, 40, 40, 0.6);
    color: white;
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 8px;
    width: 50px;
    text-align: center;
    padding: 4px;
    font-size: 0.9rem;
  }
  
  .player-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 1000;
    display: none;
  }
  
  .player-iframe {
    width: 100%;
    height: 100%;
    border: none;
  }
  
  .close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: transparent;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s;
  }
  
  .close-button:hover {
    color: rgba(255, 255, 255, 0.8);
  }
  
  .close-button svg {
    width: 24px;
    height: 24px;
  }
  
  .tv-episode-selector {
    position: fixed;
    top: 15px;
    left: 15px;
    background-color: rgba(20, 20, 20, 0.8);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px;
    display: none;
    gap: 12px;
    z-index: 1001;
    box-shadow: 0 0 0 1px rgba(80, 80, 80, 0.2), 
               0 4px 12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    max-width: 90%;
    flex-direction: column;
  }
  
  .selector-controls {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .episode-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  .season-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  .selector-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2px;
  }
  
  .custom-select {
    position: relative;
    min-width: 180px;
    z-index: 1002;
  }
  
  .custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(40, 40, 40, 0.6);
    color: white;
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
  }
  
  .custom-select-trigger:hover {
    background-color: rgba(60, 60, 60, 0.6);
    border-color: rgba(120, 120, 120, 0.5);
  }
  
  .custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(30, 30, 30, 0.95);
    border-radius: 10px;
    margin-top: 8px;
    max-height: 0;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  
  .custom-select.open .custom-select-options {
    max-height: 200px;
    opacity: 1;
    visibility: visible;
  }
  
  .custom-option {
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .custom-option:hover {
    background-color: rgba(60, 60, 60, 0.6);
  }
  
  .custom-option.selected {
    background-color: rgba(80, 80, 80, 0.3);
  }
  
  .select-arrow {
    transition: transform 0.3s;
  }
  
  .custom-select.open .select-arrow {
    transform: rotate(180deg);
  }
  
  .play-next-button {
    background-color: rgba(40, 40, 40, 0.6);
    color: white;
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
  }
  
  .play-next-button:hover {
    background-color: rgba(60, 60, 60, 0.6);
    border-color: rgba(120, 120, 120, 0.5);
  }
  
  .play-next-button svg {
    width: 16px;
    height: 16px;
  }
  
  .server-controls {
    margin-top: 4px;
    display: flex;
    gap: 8px;
    width: 100%;
  }
  
  .server-switch {
    padding: 6px 12px;
    background-color: rgba(40, 40, 40, 0.6);
    border: 1px solid rgba(80, 80, 80, 0.3);
    color: white;
    font-size: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    flex: 1;
  }
  
  .server-switch:hover {
    background-color: rgba(60, 60, 60, 0.6);
    border-color: rgba(120, 120, 120, 0.5);
  }
  
  .server-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 6px 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
  }
  
  .current-server {
    padding: 2px 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.7rem;
    color: white;
  }
  
  .recently-watched {
    position: relative;
    z-index: 2;
    font-size: 0.7rem;
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 8px;
    position: absolute;
    top: 5px;
    right: 5px;
  }
  
  .progress-percentage {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 8px;
    z-index: 3;
  }
  
  .ad-container {
    background-color: rgba(20, 20, 20, 0.4);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .ad-vertical-left {
    width: 160px;
    height: 300px;
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
  }
  
  .ad-vertical-right {
    width: 160px;
    height: 300px;
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
  }
  
  .ad-horizontal-top {
    width: 728px;
    height: 90px;
    margin: 0 auto 30px;
  }
  
  .ad-horizontal-bottom {
    width: 468px;
    height: 60px;
    margin: 30px auto;
  }
  
  .adsterra-ref {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    background-color: rgba(20, 20, 20, 0.4);
    padding: 5px;
    border-radius: 5px;
  }
  
  .adsterra-ref:hover {
    opacity: 1;
  }
  
  .adsterra-ref img {
    border-radius: 5px;
  }
  
  .dock {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 20px;
    background-color: rgba(20, 20, 20, 0.8);
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    border-radius: 18px;
    box-shadow: 0 0 0 1px rgba(80, 80, 80, 0.2), 
               0 4px 12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
  }
  
  .dock-icons {
    display: flex;
    align-items: center;
    gap: 22px;
  }
  
  .nav-link {
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s;
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 8px;
    text-decoration: none;
  }
  
  .nav-link:hover {
    transform: scale(1.15);
    opacity: 1;
  }
  
  .nav-link.active {
    opacity: 1;
  }
  
  .nav-link svg {
    width: 24px;
    height: 24px;
  }
  
  .nav-link::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background-color: rgba(40, 40, 40, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    z-index: 99;
    pointer-events: none;
    font-family: 'Poppins', sans-serif;
    font-weight: normal;
  }
  
  .nav-link:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  
  .content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
  }
  
  @media screen and (max-width: 1024px) {
    .ad-vertical-left, .ad-vertical-right {
      display: none;
    }
  }
  
  @media screen and (max-width: 768px) {
    .page-title {
      font-size: 3rem;
      margin: 0 0 20px 0;
    }
    
    .categories-container {
      gap: 8px;
    }
    
    .category-btn {
      font-size: 0.8rem;
      padding: 6px 12px;
    }
    
    #search-box {
      width: 150px;
    }
    
    #search-box:hover, #search-box:focus {
      width: 220px;
    }
    
    #media-content .item {
      width: 140px;
      height: 210px;
      margin: 8px;
    }
    
    .ad-horizontal-top {
      width: 468px;
      height: 60px;
    }
    
    .tv-episode-selector {
      padding: 10px;
      gap: 8px;
    }
    
    .custom-select {
      min-width: unset;
      width: 100%;
    }
    
    .selector-controls {
      flex-direction: column;
      gap: 8px;
    }
    
    .pagination-container {
      gap: 10px;
    }
    
    .pagination-btn {
      padding: 6px 10px;
      font-size: 0.8rem;
    }
    
    .page-info {
      font-size: 0.8rem;
    }
    
    #current-page {
      width: 40px;
    }
  }
  
  @media screen and (max-width: 500px) {
    .ad-horizontal-top, .ad-horizontal-bottom {
      width: 320px;
      height: 50px;
    }
    
    .adsterra-ref {
      bottom: 90px;
    }
    
    .pagination-container {
      max-width: 100%;
      padding: 0 15px;
    }
  }