body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 20px;
        background-color: #f5f5f5;
      }
      h1,
      h2,
      h3 {
        color: #333;
      }

      /* Tab Styles */
      .tab-container {
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin-bottom: 20px;
      }

      .tab-nav {
        display: flex;
        border-bottom: 1px solid #eee;
      }

      .tab-button {
        padding: 15px 25px;
        background: none;
        border: none;
        cursor: pointer;
        font-size: 16px;
        color: #666;
        border-bottom: 3px solid transparent;
        transition: all 0.3s ease;
      }

      .tab-button.active {
        color: #4caf50;
        border-bottom-color: #4caf50;
        background-color: #f8f9fa;
      }

      .tab-button:hover {
        background-color: #f8f9fa;
        color: #4caf50;
      }

      .tab-content {
        display: none;
        padding: 20px;
      }
      .quality-item, .season-item, .episode-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    position: relative;
}

.quality-item h5, .season-item h5, .episode-item h5 {
    margin: 0 0 10px 0;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-item-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
}

.remove-item-btn:hover {
    background-color: #c82333;
}

.episodes-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.episode-qualities-container {
    margin-top: 10px;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin: 5px 5px 0 0;
}

.collapsible {
    cursor: pointer;
    user-select: none;
}

.collapsible:hover {
    background-color: #e9ecef;
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-content.active {
    max-height: 1000px;
}

      .tab-content.active {
        display: block;
      }
      .content-management {
        background-color: white;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      }

      .content-controls {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
        padding: 15px;
        background-color: #f8f9fa;
        border-radius: 6px;
      }

      .content-type-selector {
        display: flex;
        gap: 20px;
        align-items: center;
      }

      .content-type-selector label {
        display: flex;
        align-items: center;
        gap: 5px;
        cursor: pointer;
        font-weight: bold;
      }

      .content-search {
        display: flex;
        gap: 10px;
        align-items: center;
      }

      .content-search input {
        flex: 1;
        max-width: 300px;
      }

      #content-editor {
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 20px;
        background-color: #fafafa;
      }

      .content-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #eee;
      }

      .form-section {
        margin-bottom: 25px;
        padding: 15px;
        background-color: white;
        border-radius: 6px;
        border-left: 4px solid #4caf50;
      }

      .form-section h4 {
        margin: 0 0 15px 0;
        color: #333;
        font-size: 16px;
      }

      .form-row {
        display: flex;
        gap: 15px;
        margin-bottom: 15px;
      }

      .form-row .form-group {
        flex: 1;
      }

      .form-group textarea {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
        box-sizing: border-box;
        resize: vertical;
        font-family: inherit;
      }

      .save-btn {
        background-color: #28a745;
        padding: 10px 20px;
        font-size: 16px;
      }

      .save-btn:hover {
        background-color: #218838;
      }

      /* Responsive design for content management */
      @media screen and (max-width: 768px) {
        .form-row {
          flex-direction: column;
        }

        .content-search {
          flex-direction: column;
          align-items: stretch;
        }

        .content-header {
          flex-direction: column;
          gap: 10px;
          align-items: stretch;
        }
      }

      /* Existing styles for trending content */
      .container {
        display: flex;
        flex-direction: row;
        gap: 20px;
        margin-bottom: 20px;
      }
      .section {
        flex: 1;
        background-color: white;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        min-width: 0;
      }
      .search-box {
        margin-bottom: 15px;
        display: flex;
        align-items: center;
      }
      input {
        padding: 10px;
        width: 100%;
        border: 1px solid #ddd;
        border-radius: 4px 0 0 4px;
        box-sizing: border-box;
        font-size: 16px;
      }
      .search-button {
        padding: 10px 15px;
        background-color: #4caf50;
        color: white;
        border: none;
        border-radius: 0 4px 4px 0;
        cursor: pointer;
        height: 42px;
      }
      .search-button:hover {
        background-color: #45a049;
      }
      button {
        padding: 12px 24px;
        background-color: #4caf50;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 16px;
        transition: background-color 0.3s;
      }
      button:hover {
        background-color: #45a049;
      }
      button:disabled {
        background-color: #cccccc;
        cursor: not-allowed;
      }
      .results {
        max-height: 300px;
        overflow-y: auto;
        margin-bottom: 20px;
        border: 1px solid #eee;
        border-radius: 4px;
      }
      .result-item {
        padding: 10px;
        border-bottom: 1px solid #eee;
        cursor: pointer;
        display: flex;
        align-items: center;
        transition: background-color 0.2s;
      }
      .result-item:hover {
        background-color: #f0f8ff;
      }
      .result-item:last-child {
        border-bottom: none;
      }
      .result-item img {
        width: 50px;
        height: 75px;
        object-fit: cover;
        margin-right: 10px;
        border-radius: 3px;
      }
      .selected-items {
        margin-top: 20px;
      }
      .trending-item {
        display: flex;
        align-items: center;
        padding: 10px;
        background-color: #f9f9f9;
        margin-bottom: 5px;
        border-radius: 4px;
        transition: transform 0.2s;
      }
      .trending-item:hover {
        transform: translateX(2px);
      }
      .trending-item img {
        width: 40px;
        height: 60px;
        object-fit: cover;
        margin-right: 10px;
        border-radius: 3px;
      }
      .trending-item .remove {
        margin-left: auto;
        color: #e74c3c;
        cursor: pointer;
        font-size: 18px;
        padding: 5px;
        transition: transform 0.2s;
      }
      .trending-item .remove:hover {
        transform: scale(1.2);
      }
      .status {
        margin-top: 20px;
        padding: 15px;
        border-radius: 4px;
        text-align: center;
        transition: opacity 0.3s;
      }
      .success {
        background-color: #dff0d8;
        color: #3c763d;
        border-left: 4px solid #3c763d;
      }
      .error {
        background-color: #f2dede;
        color: #a94442;
        border-left: 4px solid #a94442;
      }

      /* User Management Styles */
      .user-management {
        background-color: white;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      }

      .user-controls {
        display: flex;
        gap: 15px;
        margin-bottom: 20px;
        align-items: center;
      }

      .user-search {
        flex: 1;
        max-width: 400px;
      }

      .user-search input {
        border-radius: 4px;
        border: 1px solid #ddd;
      }

      .users-table {
        width: 100%;
        border-collapse: collapse;
        background-color: white;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      }

      .users-table th,
      .users-table td {
        padding: 12px;
        text-align: left;
        border-bottom: 1px solid #eee;
      }

      .users-table th {
        background-color: #f8f9fa;
        font-weight: bold;
        color: #333;
      }

      .users-table tr:hover {
        background-color: #f8f9fa;
      }

      .user-actions {
        display: flex;
        gap: 8px;
      }

      .btn-small {
        padding: 5px 10px;
        font-size: 12px;
        border-radius: 3px;
      }

      .btn-edit {
        background-color: #ffc107;
        color: #333;
      }

      .btn-edit:hover {
        background-color: #e0a800;
      }

      .btn-delete {
        background-color: #dc3545;
      }

      .btn-delete:hover {
        background-color: #c82333;
      }

      .user-status {
        padding: 3px 8px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: bold;
      }

      .status-active {
        background-color: #d4edda;
        color: #155724;
      }

      .status-inactive {
        background-color: #f8d7da;
        color: #721c24;
      }

      /* Modal Styles */
      .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
      }

      .modal-content {
        background-color: white;
        margin: 5% auto;
        padding: 20px;
        border-radius: 8px;
        width: 90%;
        max-width: 500px;
        position: relative;
      }

      .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid #eee;
      }

      .modal-close {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #999;
        padding: 0;
        width: auto;
      }

      .modal-close:hover {
        color: #333;
      }

      .form-group {
        margin-bottom: 15px;
      }

      .form-group label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
        color: #333;
      }

      .form-group input,
      .form-group select {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
        box-sizing: border-box;
      }

      .form-group input:focus,
      .form-group select:focus {
        outline: none;
        border-color: #4caf50;
        box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
      }

      .form-actions {
        display: flex;
        gap: 10px;
        justify-content: flex-end;
        margin-top: 20px;
      }

      .btn-cancel {
        background-color: #6c757d;
      }

      .btn-cancel:hover {
        background-color: #5a6268;
      }

      /* Loading spinner */
      .spinner {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 3px solid rgba(0, 0, 0, 0.1);
        border-radius: 50%;
        border-top-color: #4caf50;
        animation: spin 1s ease-in-out infinite;
        margin-right: 10px;
      }
      @keyframes spin {
        to {
          transform: rotate(360deg);
        }
      }
      .loading-text {
        padding: 20px;
        text-align: center;
        color: #666;
      }

      /* Responsive styles */
      @media screen and (max-width: 768px) {
        .container {
          flex-direction: column;
        }
        .section {
          margin-bottom: 20px;
        }
        button {
          width: 100%;
        }
        .tab-nav {
          flex-direction: column;
        }
        .user-controls {
          flex-direction: column;
          align-items: stretch;
        }
        .users-table {
          font-size: 12px;
        }
        .users-table th,
        .users-table td {
          padding: 8px 4px;
        }
      }

      .section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
      }

      .refresh-btn {
        background-color: #4caf50;
        color: white;
        border: none;
        border-radius: 4px;
        padding: 5px 10px;
        font-size: 14px;
        cursor: pointer;
        transition: background-color 0.3s;
      }

      .refresh-btn:hover {
        background-color: #45a049;
      }

      .refresh-btn i {
        margin-right: 5px;
      }

      .trending-item {
        position: relative;
      }

      .trending-controls {
        display: flex;
        gap: 5px;
        margin-left: auto;
      }

      .trending-controls button {
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        transition: transform 0.2s;
        color: #e74c3c;
        font-size: 18px;
      }

      .trending-controls button:hover {
        transform: scale(1.2);
      }

      /* Notification styles remain the same */
      .notifications-container {
        position: fixed;
        top: 20px;
        right: 20px;
        width: 300px;
        max-width: 80%;
        z-index: 1000;
      }

      .notification {
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        margin-bottom: 10px;
        overflow: hidden;
        transform: translateX(120%);
        animation: slide-in 0.3s forwards;
        position: relative;
      }

      .notification.removing {
        animation: slide-out 0.3s forwards;
      }

      @keyframes slide-in {
        100% {
          transform: translateX(0);
        }
      }

      @keyframes slide-out {
        100% {
          transform: translateX(120%);
        }
      }

      .notification-content {
        display: flex;
        align-items: center;
        padding: 12px 15px;
      }

      .notification-icon {
        margin-right: 15px;
        font-size: 20px;
      }

      .notification-message {
        flex: 1;
        font-size: 14px;
      }

      .notification-close {
        cursor: pointer;
        padding: 5px;
        margin-left: 10px;
        color: #aaa;
        transition: color 0.2s;
      }

      .notification-close:hover {
        color: #555;
      }

      .notification-progress {
        height: 3px;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.1);
      }

      .notification-progress-bar {
        height: 100%;
        width: 100%;
        transform-origin: left;
        animation: progress 5s linear forwards;
      }

      @keyframes progress {
        0% {
          transform: scaleX(1);
        }
        100% {
          transform: scaleX(0);
        }
      }

      .notification.success .notification-icon {
        color: #4caf50;
      }

      .notification.error .notification-icon {
        color: #f44336;
      }

      .notification.info .notification-icon {
        color: #2196f3;
      }

      .notification.success .notification-progress-bar {
        background-color: #4caf50;
      }

      .notification.error .notification-progress-bar {
        background-color: #f44336;
      }

      .notification.info .notification-progress-bar {
        background-color: #2196f3;
      }
      .episode-qualities-container {
    margin-top: 10px;
    padding: 15px;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    max-height: 400px; /* Limit height */
    overflow-y: auto; /* Add vertical scroll */
}

.episode-qualities-container h6 {
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-weight: bold;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
}

/* Make collapsible content scrollable when needed */
.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-content.active {
    max-height: 600px; /* Increased max height */
    overflow-y: auto; /* Add scroll when content exceeds max height */
}

/* Better spacing for episode items */
.episode-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    position: relative;
}

.episode-item .collapsible-content {
    padding-top: 10px;
}

/* Improved quality item styling within episodes */
.episode-qualities-container .quality-item {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 4px;
}

.episode-qualities-container .quality-item:last-child {
    margin-bottom: 0;
}

/* Season container improvements */
.seasons-container {
    max-height: 70vh; /* Limit overall height */
    overflow-y: auto; /* Add scroll for seasons */
    padding-right: 10px; /* Space for scrollbar */
}

/* Custom scrollbar styling */
.episode-qualities-container::-webkit-scrollbar,
.seasons-container::-webkit-scrollbar,
.collapsible-content::-webkit-scrollbar {
    width: 8px;
}

.episode-qualities-container::-webkit-scrollbar-track,
.seasons-container::-webkit-scrollbar-track,
.collapsible-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.episode-qualities-container::-webkit-scrollbar-thumb,
.seasons-container::-webkit-scrollbar-thumb,
.collapsible-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.episode-qualities-container::-webkit-scrollbar-thumb:hover,
.seasons-container::-webkit-scrollbar-thumb:hover,
.collapsible-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Better responsive design for quality forms */
@media screen and (max-width: 768px) {
    .episode-qualities-container {
        max-height: 300px; /* Smaller height on mobile */
        padding: 10px;
    }
    
    .seasons-container {
        max-height: 50vh; /* Adjust for mobile */
    }
    
    .collapsible-content.active {
        max-height: 400px; /* Smaller max height on mobile */
    }
}

/* Add visual indicators for scrollable content */
.episode-qualities-container::before {
    content: "";
    position: sticky;
    top: 35px;
    height: 2px;
    background: linear-gradient(to right, #4CAF50, transparent);
    display: block;
    margin-bottom: 10px;
}

/* Improved button spacing in episode quality sections */
.episode-qualities-container .btn-small {
    margin: 5px 5px 10px 0;
}

/* Better visibility for nested content */
.season-item > .collapsible-content > .episodes-container {
    background-color: #ffffff;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
    border: 1px solid #e9ecef;
}

/* Improved form layout within scrollable areas */
.episode-qualities-container .form-row {
    margin-bottom: 10px;
}

.episode-qualities-container .form-group {
    margin-bottom: 8px;
}

.episode-qualities-container .form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 3px;
}

.episode-qualities-container .form-group input,
.episode-qualities-container .form-group textarea,
.episode-qualities-container .form-group select {
    font-size: 13px;
    padding: 6px 8px;
}