.dashboard-container {
    width: 100%;
    padding: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    margin-left: auto;
}

#username-display {
    margin-right: 15px;
    color: white;
}

#logout-button {
    padding: 8px 15px;
    font-size: 14px;
}

.dashboard-top-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 20px;
}

.channel-selection-container {
    flex: 2;
    margin-bottom: 0; /* Override the previous margin */
}

.tag-management-container {
    flex: 1;
    min-width: 250px;
    height: fit-content;
}

.channel-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.channel-input-row label {
    font-weight: bold;
    color: var(--text-color);
}

.channel-input-row input {
    flex: 1;
    max-width: 300px;
}

.channel-info-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.channel-buttons-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.fetch-button {
    background-color: var(--banner-bg);
    color: white;
    padding: 8px 15px;
}

.clear-button {
    background-color: #f0f0f0;
    padding: 8px 15px;
}

#fetch-remaining {
    color: #666;
    font-size: 14px;
}

.status-message {
    margin-top: 10px;
    font-size: 14px;
}

.videos-table-container {
    display: flex;
    flex-direction: column;
    background-color: #FFF5EE;
    border-radius: 4px;
    padding: 15px;
    overflow-x: auto;
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
}

.videos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.videos-table th {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    background-color: #f9f9f9;
}

.videos-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.videos-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.copy-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    margin-left: 5px;
    font-size: 12px;
    color: var(--banner-bg);
    padding: 2px 5px;
}

.status-summarized {
    color: #155724;
}

.status-not-summarized {
    color: #721c24;
}

.loading-message, .no-videos-message {
    text-align: center;
    padding: 20px;
    color: var(--text-color);
}

.hidden {
    display: none;
}

.videos-table-container {
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
}

#loading-more-row td {
    text-align: center;
    padding: 15px;
    background-color: #f9f9f9;
    font-style: italic;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 20px;
    width: 100%;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--banner-bg);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-more-container {
    text-align: center;
    padding: 15px;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
    height: 80px; /* Give it enough height to be visible */
    position: relative; /* Ensure it's properly positioned */
    background-color: rgba(249, 249, 249, 0.7); /* Slightly transparent background */
    border-radius: 4px;
}

/* When hidden, don't use display: none as that prevents intersection observer from working */
#loading-more-container.hidden {
    display: none;
}

.select-channel-message {
    text-align: center;
    padding: 20px;
    color: var(--text-color);
    font-size: 16px;
}

.loading-message, .no-videos-message, .select-channel-message {
    text-align: center;
    padding: 20px;
    color: var(--text-color);
}

.tag-management-container {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f7e7dc;
    border-radius: 4px;
}

.tag-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.tag-input-row input {
    flex: 1;
    max-width: 300px;
}

.active-tags-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

#active-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    background-color: var(--banner-bg);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
}

.tag-remove {
    margin-left: 5px;
    cursor: pointer;
    color: #ffcccc;
    font-weight: bold;
}

.tag-remove:hover {
    color: white;
}

@media (max-width: 900px) {
    .dashboard-top-row {
        flex-direction: column;
    }
    
    .channel-selection-container,
    .tag-management-container {
        width: 100%;
    }
    
    .channel-selection-container {
        margin-bottom: 20px;
    }
}

.copy-button:disabled {
    background-color: transparent;
    color: #676767; /* Green color to indicate success */
    cursor: not-allowed;
    opacity: 0.8;
}